ActGood.php 488 B

1234567891011121314151617181920212223242526
  1. <?php
  2. declare (strict_types = 1);
  3. namespace app\txx\model;
  4. use think\Exception;use think\Model;
  5. /**
  6. * @mixin \think\Model
  7. */
  8. class ActGood extends Model
  9. {
  10. //
  11. static function ActAdd(array $Good, string $actCode,array $userinfo=[]){
  12. if (empty($Good)) throw new Exception("参与活动商品不能为空",1006);
  13. self::startTrans();
  14. $data=[];
  15. foreach ($Good as $item ){
  16. $temp=[
  17. "actCode"=>$actCode,
  18. "yz_good_id"=>$item['id'],
  19. ];
  20. }
  21. }
  22. }