wugg 8 місяців тому
батько
коміт
014ae10963

+ 6 - 1
app/admin/controller/Sale.php

@@ -260,6 +260,7 @@ class Sale extends Base
                 'diff_weight' => 0,
                 'diff_fee' => 0,
                 "workNo" => $workNo,
+                "user_order"=>$this->post['useid']??0,
                 'open_type'=>$ct['open_type'],
                 "addtime" => date("Y-m-d H:i:s"),
                 "updatetime" => date("Y-m-d H:i:s"),
@@ -1093,6 +1094,7 @@ class Sale extends Base
                 'diff_weight' => 0,
                 'open_type'=>$zxinfo['open_type'],
                 'diff_fee' => 0,
+                'user_order'=>$this->post['useid']??0,
                 "addtime" => date("Y-m-d H:i:s"),
                 "updatetime" => date("Y-m-d H:i:s"),
                 'total_price' => round($sale_price * $good_num, 2),
@@ -1461,6 +1463,7 @@ class Sale extends Base
                 $good['arrtime'] = $arrtime;
                 $good['rm'] = $rm;
                 $good['ri'] = $ri;
+                $good['user_order']=$this->post['useid']??0;
                 $good['manager'] = $manager;
                 $good['managerid'] = $managerid;
                 $good['send_num'] = 0;
@@ -1684,6 +1687,7 @@ class Sale extends Base
             "proof_id" => 0,
             "order_type" => 3,//咨询商品
             "order_source" => 3,//项目
+            'user_order'=>$data['useid']??0,
             'good_weight' => $goodinfo['good_weight'],
             'gold_price' => $goodinfo['gold_price'],
             'cost_price' => $goodinfo['sale_cost_fee'],
@@ -2032,13 +2036,14 @@ class Sale extends Base
             "supplierName" => $data['companyName'],
             "supName" => $good['supplierName'],
             "supNo" => $good['supplierNo'],
+            'user_order'=>$data['useid']??0,
             "is_del" => 0,
             "zxNo" => $data["pgNo"],
             "platform_order" => "",
             "platform_id" => $data['platform_id'],
             "remark" => "",
             "is_stock" => $good['is_stock'],
-             'open_type'=>$good['open_type'],
+            'open_type'=>$good['open_type'],
             "is_activity" => 0,
             "activity_code" => '',
             "proof_id" => 0,

+ 4 - 3
app/command/SplitSale.php

@@ -207,8 +207,6 @@ class SplitSale extends Command
                 $output->writeln('事务回滚:' . $e->getMessage() . '||' . $e->getFile() . '||' . $e->getLine());
             }
 
-           Cache::store('redis')->dec($key);
-
         } catch (\Exception $exception) {
             $output->writeln('脚本执行出错,' . $exception->getMessage() . '||' . $exception->getFile() . '||' . $exception->getLine());
         }
@@ -271,8 +269,9 @@ class SplitSale extends Command
                 'apply_name' => $sale['apply_name'] ?? '',
                 'order_type' => $sale['order_type'] ?? 0,
                 'order_source' => $this->order_source,
-                'platform_id' => $sale['platform_name'] ?? '',
+                'platform_id' => $sale['platform_id'] ?? '',
                 'platform_type' => $sale['use_type'] ?? '',
+                "platform_name"=>$sale['platform_name']??"",
                 'good_code' => $sale['good_code'] ?? '',
                 'cat_id' => $sale['cat_id'] ?? 0,
                 'cat_name' => json_encode($this->_get_cat_list($sale['cat_id']), JSON_UNESCAPED_UNICODE),
@@ -374,6 +373,8 @@ class SplitSale extends Command
                 'cgder_id' => $sale['cgderid'] ?? 0,
                 'depart' => isset($sale['cgderid']) ? get_company_name_by_uid($sale['cgderid']) : '',
                  'qrdNo' => $orderCode,
+                'platform_id' => $sale['platform_id'] ?? '',
+                'platform_name'=>$sale['platform_name']??'',
                 'spuCode' => $cgd['spuCode'] ?? $sale['good_code'],
                 'good_name' => $sale['good_name'],
                 'skuCode' => $cgd['skuCode'] ?? '',

+ 3 - 2
app/txx/controller/Base.php

@@ -3,12 +3,13 @@ declare (strict_types = 1);
 
 namespace app\txx\controller;
 
-use app\BaseController;use think\App;
+use app\BaseController;
+use think\App;
 use think\exception\HttpResponseException;
 use think\Response;
 
 
-class Base extends BaseController
+class Base extends \app\admin\controller\Base
 {
 	public $white=[];
 	public function __construct(App $app) {

+ 3 - 3
app/txx/controller/Good.php

@@ -6,7 +6,7 @@ namespace app\txx\controller;
 use app\BaseController;
 use app\txx\model\Act;
 use app\txx\model\ActGood;
-use app\txx\model\YzGood;
+use app\txx\model\ActGoodurl;use app\txx\model\YzGood;
 use app\txx\model\PlatformYouzan;
 use think\App;
 use think\Exception;
@@ -516,16 +516,16 @@ class Good extends BaseController
 		    $unit = Db::name("unit")->where(["id" => array_column($list, 'good_unit')])->column('unit', 'id');
 		    if($this->request->isCx==1){
 			    $all_platform =Db::name("platform")->field('id,platform_name')->where(["id" =>array_column($list, 'platform_code')])->column('platform_name', 'id');
-//			    $all_supplier = Db::name("supplier")->where(["code" =>array_column($list, 'supplierNo')])->column("name","code");
 			    $itemid_all =Db::connect("mysql_sys")->name("account_item")->where(["account_id"=>array_column($list,
 				    'purchase_id')])->column("itemid",'account_id');
 		    }
+		    $actUrl = ActGoodurl::where(["is_del"=>0,"act_good_id"=>array_column($list, 'platform_youzan_id')])->column("act_good_url","act_good_id");
         foreach ($list as $value) {
             $value["brand_name"] = $all_brand[$value['brand_id']]??"";
             $value['unit'] = $unit[$value['good_unit']]??"";
-//		    $value['exam_status'] = $value['exam_status']==6?1:0;
             $value['origin_price'] =isset($yzadd[$value['skuCode']])? $yzadd[$value['skuCode']]['origin']??"":"";
             $value['good_url'] =isset($yzadd[$value['skuCode']])? $yzadd[$value['skuCode']]['detail_url']??"":"";
+            $value['act_good_url']= $actUrl[$value['platform_youzan_id']]??"";
 
             $spec = Db::name("good_spec")->where(["spuCode" => $value['spuCode'], "is_del" => 0])->select()->toArray();
             $speclist = [];