wugg 2 年之前
父节点
当前提交
dcdfab56cd

+ 1 - 1
app/admin/controller/Brand.php

@@ -163,7 +163,7 @@ class Brand extends Base
         $json = json_encode($temp,JSON_UNESCAPED_UNICODE);
         $jsp = json_encode($info,JSON_UNESCAPED_UNICODE);
         $item = Db::name("brand")->save($data);
-        ChangeLog::logAdd(6,$info['id'],$jsp,$json,$this->post['token'],$this->post);
+        ChangeLog::logAdd(6,$info['id'],$jsp,$json,['id' => $this->uid, 'nickname' => $this->uname]);
         if($item){
             return error_show(0,"更新成功");
         }else{

+ 1 - 1
app/admin/controller/Cat.php

@@ -374,7 +374,7 @@ class Cat extends Base
             if ($strinfo) {
                 $order = ['order_code' => $id, 'status' => $status, 'action_remark' => '', 'action_type' => 'edit'];
                 ActionLog::logAdd(['id'=>$createrid,'nickname'=>$creater], $order, 'sxd', $status, $order);
-                ChangeLog::logAdd(7, $idinfo['id'], $jsp, $json, ['id'=>$createrid,'nickname'=>$creater], $this->post);
+                ChangeLog::logAdd(7, $idinfo['id'], $jsp, $json, ['id'=>$createrid,'nickname'=>$creater]);
                 $spc = [];
                 $vp = Db::name('cat_spec')->where(['cat_id' => $idinfo['id'], 'is_del' => 0])->find();
                 $str = '';

+ 10 - 53
app/admin/controller/Consult.php

@@ -1633,7 +1633,8 @@ class Consult extends Base
     //议价审核
     /**
      * status:
-     * 0待审核 1业务主管审核通过 2 业务税率未通过 3 业务驳回 4 专员通过 5 专员驳回 6 财务通过 7 财务税率未通过 8财务驳回 9 boss通过 10 boss 税率越线通过 11 驳回
+     * 0待审核 1业务主管审核通过 2 业务税率未通过 3 业务驳回 4 专员通过 5 专员驳回 6 财务通过 7 财务税率未通过 8财务驳回 9 boss通过 10 boss 税率越线通过 11 驳回 12取消
+     * change 0待审核 1业务主管审核通过 2 业务驳回 3 业务通过 4 业务主管越线通过 5取消议价
      */
     public function bargain_status(){
         $bargainNo = isset($this->post['bargainNo'])&& $this->post['bargainNo']!=""?trim($this->post['bargainNo']):"";
@@ -1644,7 +1645,7 @@ class Consult extends Base
         if($info==false){
             return error_show(1004,"未找到议价数据");
         }
-        if($info['status']==12){
+        if($info['status']==5){
            return error_show(1004,"议价单已取消");
         }
         $bids=Db::name("consult_bids")->where(["bidNo"=>$info["bidsNo"],"is_del"=>0])->find();
@@ -1662,7 +1663,7 @@ class Consult extends Base
         if($status===''){
             return error_show(1005,"参数status不能为空");
         }
-//        $catinfo = Db::name("cat")->where(["id"=>$bids['cat_id']])->find();
+//  $catinfo = Db::name("cat")->where(["id"=>$bids['cat_id']])->find();
 
         $tmp = Db::name('consult_order')
             ->field('id,companyNo,platform_code')
@@ -1673,82 +1674,38 @@ class Consult extends Base
 
         $budget = isset($catinfo['order_rate']) ? $catinfo['order_rate']:0;
         $rate = isset($catinfo['rate']) ? $catinfo['rate']/100:0; //业务主管利率
-        $money_rate = isset($catinfo['money_rate']) ? $catinfo['money_rate']:0;//财务主管利率
-        $lower_rate = isset($catinfo['lower_rate']) ? $catinfo['lower_rate']:0;//boss主管利率
+//        $money_rate = isset($catinfo['money_rate']) ? $catinfo['money_rate']:0;//财务主管利率
+//        $lower_rate = isset($catinfo['lower_rate']) ? $catinfo['lower_rate']:0;//boss主管利率
         if($bids['is_gold_price']==1){
             $gold = Db::name("gold_price1")->where(["type"=>$bids['metal_id'],"is_del"=>0,"status"=>1])->order("addtime desc")
                 ->find();
-//            $saleprice = $open_fee/$zxinfo['num'] + $weight* $gold["price"] + $cost_fee/(1-$budget)* $weight+$pakge_fee+$mark_fee+$cert_fee+$nake_fee;
             //$saleprice(最终售价) = (开模费/购买数量 + 商品重量* 最新金价 + 工艺费* 商品重量+包装费+加标费+证书费+产品裸价)/(1-成本售价/100);
             $total_fe= $bids['demo_fee'] / $coninfo['num']+$bids['delivery_fee']+$bids['open_fee'] / $coninfo['num'] +
                 $bids['good_weight']*$gold["price"] +$bids['cost_fee']*$bids['good_weight'] + $bids['pakge_fee'] +$bids['mark_fee'] + $bids['cert_fee'] + $bids['nake_fee'];
             $saleprice =$total_fe / (1 - $budget);
             $rate_price = $total_fe / (1 - $rate);
-            $money_price =$total_fe / (1 - $money_rate);
-            $lower_price =$total_fe / (1 - $lower_rate);
         }else{
             $total_fe= $bids['demo_fee']/$coninfo['num']+$bids['delivery_fee']+$bids['open_fee'] /
                 $coninfo['num']+$bids['cost_fee']*$bids['good_weight']+$bids['pakge_fee'] +$bids['mark_fee']+  $bids['cert_fee'] +  $bids['nake_fee'];
             if($bids['nake_fee']!=0){
-                $saleprice = ($total_fe)/ (1 - $budget);
                 $rate_price = ($total_fe)/ (1 - $rate);
-                $money_price =($total_fe)/ (1 - $money_rate);
-                $lower_price = ($total_fe) / (1 - $lower_rate);
 
             }else{
-                $saleprice = $total_fe / (1 - $budget);
                 $rate_price =$total_fe/ (1 - $rate);
-                $money_price =$total_fe / (1 - $money_rate);
-                $lower_price = $total_fe/ (1 - $lower_rate);
-
             }
 
         }
         $ra_status = $info['status'];
         if($status==1){
-            if($info['status']==0){
-                if($info['after_price']<$rate_price){
-                    $info['status']=2;
-                }else{
-                    $info['status']=1;
-                }
-            }elseif($info['status']==2){
-               $info['status']=4;
-            }elseif($info['status']==4||$info['status']==5){
-                if($info['after_price']<$money_price){
-                    $info['status']=7;
+			    if($info['after_price']<$rate_price){
+                    $info['status']=4;
                 }else{
-                    $info['status']=6;
-                }
-            }elseif($info['status']==7){
-                $info['lower_price'] =$lower_price;
-                if($info['after_price']<$lower_price){
-                    $info['status']=10;
-                }else{
-                    $info['status']=9;
+                    $info['status']=3;
                 }
-            }
         }else{
-            if($info['status']==0){
-                    $info['status']=3;
-            }elseif($info['status']==2){
-                $info['status']=4;
-            }elseif($info['status']==4||$info['status']==5){
-              $info['status']=8;
-            }elseif($info['status']==7){
-                $info['lower_price'] =$lower_price;
-                $info['status']=11;
-            }
+        	 $info['status']=$status;
         }
         $remark = isset($this->post['remark'])&& $this->post['remark']!=""?trim($this->post['remark']):"";
-//        $token = isset($this->post['token'])&& $this->post['token']!='' ? trim($this->post['token']):"";
-//        if($token==''){
-//            return error_show(105,"参数token不能为空");
-//        }
-//        $user =GetUserInfo($token);
-//        if(empty($user)||$user['code']!=0){
-//            return error_show(1002,"用户数据不存在");
-//        }
         $createrid= $this->uid;//isset($user["data"]['id']) ?  $user["data"]['id'] : "";
         $creater= $this->uname;//isset($user["data"]['nickname']) ?  $user["data"]['nickname'] : "";
         Db::startTrans();

+ 0 - 15
app/admin/controller/Good.php

@@ -65,10 +65,6 @@ class Good extends Base
         if($supplierNo!==""){
             $where[]=['a.supplierNo',"like","%$supplierNo%"];
         }
-//         $supplier_name = isset($this->post['supplier_name']) && $this->post['supplier_name'] !=="" ? trim($this->post['supplier_name']):"";
-//        if($supplier_name!==""){
-//            $where[]=['s.name',"like","%$supplier_name%"];
-//        }
         $companyNo = isset($this->post['companyNo']) && $this->post['companyNo'] !=="" ? trim($this->post['companyNo']) :"";
         if($companyNo!==""){
             $where[]=['a.companyNo',"like","%$companyNo%"];
@@ -125,9 +121,6 @@ class Good extends Base
         $relaComNo = isset($this->post['relaComNo']) && $this->post['relaComNo'] != "" ? trim($this->post['relaComNo']) : "";
         if ($relaComNo != "") $where[] = ['a.companyNo|a.supplierNo', '=', $relaComNo];
 
-//        if(!empty($role['platform']) ){
-//            $where[]=["b.platform_code","in",$role['platform']];
-//        }
         $count = Db::name('good')
             ->alias("a")
             ->leftJoin("good_platform b","a.spuCode=b.spuCode")
@@ -1108,19 +1101,11 @@ class Good extends Base
     public function loglist(){
 
         $param = $this->request->filter('trim')->only(['wsm_code'=>'','supplierNo'=>'','companyNo'=>'','is_stock'=>'','good_name'=>'','spuCode'=>'','page'=>1,'size'=>10,'relaComNo'=>''],'post');
-
-//        $page = isset($this->post['page']) && $this->post['page']!==""? intval($this->post['page']) :"1";
-//        $size = isset($this->post['size']) && $this->post['size']!==""? intval($this->post['size']) :"10";
         $where=[];
-//        $wsm_code= isset($this->post['wsm_code']) && $this->post['wsm_code']!="" ? trim($this->post['wsm_code']):"";
         if($param['wsm_code']!="") $where[]=['b.wsm_code',"like","%".$param['wsm_code']."%"];
 
 //        $supplierNo =isset($this->post['supplierNo']) &&$this->post['supplierNo'] !=="" ? trim($this->post['supplierNo']):"";
         if($param['supplierNo']!=""){
-//            $supplier = Db::name("supplier")->where(["code"=>$param['supplierNo']])->find();
-//            if(empty($supplier)) return error_show(1004,"未找到供应商信息");
-//            $wsmcode = Db::name("warehouse_info")->where(["is_del"=>0,"supplierNo"=>$param['supplierNo']])->column("wsm_code");
-//            $where[]=['b.wsm_code',"in",$wsmcode];
             $where[]=['c.supplierNo',"=",$param['supplierNo']];
         }
 //        $companyNo = isset($this->post['companyNo']) && $this->post['companyNo'] !== "" ? trim($this->post['companyNo']) : "";

+ 151 - 291
app/admin/controller/Goodup.php

@@ -1049,7 +1049,7 @@ class Goodup extends Base
             $json = json_encode($timp,JSON_UNESCAPED_UNICODE);
             $jsp = json_encode($data,JSON_UNESCAPED_UNICODE);
             if($up){
-                ChangeLog::logAdd(3,$data['spuCode'],$jsp,$json,$this->post['token'],$this->post);
+                ChangeLog::logAdd(3,$data['spuCode'],$jsp,$json,['id' => $this->uid, 'nickname' => $this->uname]);
                 if($speclist!=="" && !empty($speclist)){
                     foreach ($speclist as $value){
                         $lemp=[];
@@ -1162,23 +1162,23 @@ class Goodup extends Base
             $json = json_encode($temp,JSON_UNESCAPED_UNICODE);
             $jsp = json_encode($datas,JSON_UNESCAPED_UNICODE);
             if($up){
-                ChangeLog::logAdd(3,$datas['spuCode'],$jsp,$json,$this->post['token'],$this->post);
+                ChangeLog::logAdd(3,$datas['spuCode'],$jsp,$json,['id' => $this->uid, 'nickname' => $this->uname]);
                 //修改状态,添加待办
-                ActionLog::logAdd($this->post['token'], [
-                    "order_code" =>$supcode,//咨询单详情编号
-                    "status" =>  $datas['status'],//这里的status是之前的值
-                    "action_remark" => '',//备注
-                    "action_type" => "edit"//新建create,编辑edit,更改状态status
-                ], "SPCB",$data['status'] ,$data);
-
-                ProcessOrder::AddProcess($this->post['token'], [
-                    "order_type" => 'SPCB',
-                    "order_code" => $supcode,//咨询单详情编号
-                    "order_id" => $datas['id'],
-                    "order_status" =>$data['status'],
-                    "before_status"=>$datas['status'],
-                    'holder_id'=>$datas['createrid'],
-                ]);
+//                ActionLog::logAdd($this->post['token'], [
+//                    "order_code" =>$supcode,//咨询单详情编号
+//                    "status" =>  $datas['status'],//这里的status是之前的值
+//                    "action_remark" => '',//备注
+//                    "action_type" => "edit"//新建create,编辑edit,更改状态status
+//                ], "SPCB",$data['status'] ,$data);
+//
+//                ProcessOrder::AddProcess($this->post['token'], [
+//                    "order_type" => 'SPCB',
+//                    "order_code" => $supcode,//咨询单详情编号
+//                    "order_id" => $datas['id'],
+//                    "order_status" =>$data['status'],
+//                    "before_status"=>$datas['status'],
+//                    'holder_id'=>$datas['createrid'],
+//                ]);
 //                $online =  Db::name("good_platform")->where(["spuCode"=>$supcode,"is_del"=>0])->find();
 //                if($online){
 //                    $onup = Db::name("good_platform")->where(["spuCode"=>$supcode,"is_del"=>0])->save
@@ -1282,12 +1282,9 @@ class Goodup extends Base
         if($token==''){
             return error_show(105,"参数token不能为空");
         }
-        $user =GetUserInfo($token);
-        if(empty($user)||$user['code']!=0){
-            return error_show(1002,"用户数据不存在");
-        }
-        $createrid= isset($user["data"]['id']) ?  $user["data"]['id'] : "";
-        $creater= isset($user["data"]['nickname']) ?  $user["data"]['nickname'] : "";
+
+        $createrid=$this->uid;
+        $creater= $this->uname;
         Db::startTrans();
         try {
             if($data['status']==3 && $status==1){
@@ -1455,7 +1452,6 @@ class Goodup extends Base
     //删除商品成本
     public function delall()
     {
-//        $supcode = isset($this->post['codes'])&&!empty($this->post['codes'])? $this->post['codes']:"";
         $supcode = $this->request->post('codes', '', 'trim');
         if ($supcode == "") {
             return error_show(1004, "参数codes不能为空");
@@ -1630,25 +1626,9 @@ class Goodup extends Base
                 //修改状态,添加待办
                 $create =Db::name("good_platform")->insert($tmp,true);
                 if($create>0){
-                    ActionLog::logAdd(['id'=>$createrid,'nickname'=>$creater], [
-                        "order_code" =>$skuCode,//咨询单详情编号
-                        "status" =>  $tmp['exam_status'],//这里的status是之前的值
-                        "action_remark" => '',//备注
-                        "action_type" => "create"//新建create,编辑edit,更改状态status
-                    ], "SPSX",$tmp['exam_status'],$tmp);
-
-                    ProcessOrder::AddProcess(['id'=>$createrid,'nickname'=>$creater], [
-                        "order_type" => 'SPSX',
-                        "order_code" =>$skuCode,//咨询单详情编号
-                        "order_id" => $create,
-                        "order_status" =>$tmp['exam_status'],
-                        "before_status"=>$tmp['exam_status'],
-                        'holder_id' => $tmp['createrid'],
-                    ]);
                     $iso = Db::name("good")->where(["spuCode"=>$value['spuCode'],"is_del"=>0])->find();
                     if($iso==false){
                         unset($value['id']);
-
                         $value['addtime']=date("Y-m-d H:i:s");
                         $value['updatetime']=date("Y-m-d H:i:s");
                     }else{
@@ -1665,52 +1645,6 @@ class Goodup extends Base
                     return error_show(1004,"提交失败");
                 }
             }
-
-//            if($create){
-//                foreach ($datas as $value){
-//                    $iso = Db::name("good")->where(["spuCode"=>$value['spuCode'],"is_del"=>0])->find();
-//                    if($iso==false){
-//                        unset($value['id']);
-//                        $value['creater']=$creater;
-//                        $value['createrid']=$createrid;
-//                        $value['addtime']=date("Y-m-d H:i:s");
-//                        $value['updatetime']=date("Y-m-d H:i:s");
-//                    }else{
-//                        $value['id']=$iso['id'];
-//                        $value['creater']=$creater;
-//                        $value['createrid']=$createrid;
-//                        $value['updatetime']=date("Y-m-d H:i:s");
-//                    }
-//                    $up =Db::name("good")->save($value);
-//                    if(!$up){
-//                        Db::rollback();
-//                        return error_show(1004,"提交失败");
-//                    }
-//
-//                    //添加审核记录
-//                    //修改状态,添加待办
-//                    $skuCodes = array_column($data, 'skuCode', 'spuCode');
-//
-//                    ActionLog::logAdd(['id' => $createrid, 'nickname' => $creater], [
-//                        "order_code" => $skuCodes[$value['spuCode']],//编号
-//                        "status" => 2,//待产品审核
-//                        "action_remark" => '',//备注
-//                        "action_type" => "create"//新建create,编辑edit,更改状态status
-//                    ], "SPSX", $value['status'], $value);
-//
-//                    ProcessOrder::AddProcess(['id' => $createrid, 'nickname' => $creater], [
-//                        "order_type" => 'SPSX',
-//                        "order_code" => $skuCodes[$value['spuCode']],//咨询单详情编号
-//                        "order_id" => isset($value['id']) ? $value['id'] : 0,
-//                        "order_status" => 2,//待产品审核
-//                    ]);
-//                }
-//                Db::commit();
-//                return app_show(0,"提交成功");
-//            }else{
-//                Db::rollback();
-//                return error_show(1004,"提交失败");
-//            }
             Db::commit();
             return app_show(0,"提交成功");
         }catch (\Exception $e){
@@ -1722,110 +1656,79 @@ class Goodup extends Base
 
     //审核
     public function online_exam(){
-        $skuCode = isset($this->post['skuCode'])&&$this->post['skuCode']!==""?trim($this->post['skuCode']):"";
-        if($skuCode===""){
-            return error_show(1004,"参数skuCode不能为空");
-        }
-        $platform = Db::name("good_platform")->where(["skuCode"=>$skuCode,"is_del"=>0])->find();
+    	$post =$this->request->only([
+    		"skuCode"=>"",          //商品成本编号
+    		"exam_status"=>"",      //审核状态 1 提交待完善成本 2待审核 3上线完成 4 审核驳回 5 下线完成
+    		"offline_reason"=>"",   //下线原因
+    		"offline_remark"=>"",   //下线备注
+    		"plat_code"=>"",        //平台订单号
+    		'exam_remark'=>"",      //审核备注
+    		'good_ladder'=>[],      //售价阶梯
+    		'proof_type'=>"",       // 售价凭证类型
+    		'proof_url'=>"",       // 售价凭证
+    		],"post","trim");
+    	$valide = Validate::rule([
+    		"shuCode|商品编号"=>"require|max:255",
+    		"exam_status|审核状态"=>"require|number|in:0,1,2,3,4,5",
+    		"offline_reason|线下原因"=>"requireIf:exam_status,5|max:255",
+    		"offline_remark|下线备注"=>"requireIf:exam_status,5|max:255",
+    		"plat_code|平台商品编码"=>"requireIf:exam_status,3|max:255",
+    		'exam_remark|审核备注'=>"max:255",
+    		'good_ladder|售价阶梯'=>"requireIf:exam_status,3|array",
+    		'proof_type|售价凭证类型'=>"requireIf:exam_status,3|number|gt:0",
+    		'proof_url|售价凭证'=>"requireIf:exam_status,3|url",
+    		]);
+		if($valide->check($post)==false) return error_show(1004,$valide->getError());
+
+        $platform = Db::name("good_platform")->where(["skuCode"=>$post['skuCode'],"is_del"=>0])->find();
         if($platform==false){
             return error_show(1004,"未找到数据");
         }
-        $exam_status=isset($this->post['exam_status'])&&$this->post['exam_status']!==""?intval($this->post['exam_status']):"";
-//        if($exam_status===""){
-//            return error_show(1004,"参数exam_status不能为空");
-//        }
-
-        //下线
-        if ($exam_status == 8) {
-            $offline_reason = isset($this->post['offline_reason']) && $this->post['offline_reason'] !== "" ? trim($this->post['offline_reason']) : "";
-            if ($offline_reason == '') return error_show(1005, '商品下线时下线原因必填');
-            $offline_remark = isset($this->post['offline_remark']) && $this->post['offline_remark'] !== "" ? trim($this->post['offline_remark']) : "";
-        }
-        if($exam_status==3){
-            $online_time= isset($this->post['online_time'])&&$this->post['online_time']!==""?$this->post['online_time']:"";
-            if($online_time===""){
-                return error_show(1004,"参数online_time不能为空");
-            }
-            $platform['online_time']=$online_time;
-        }
-        if($exam_status==6){
+        if($post['exam_status']==3){
 
-            $good_code= isset($this->post['plat_code'])&&$this->post['plat_code']!==""?trim($this->post['plat_code']):"";
-            if($good_code===""){
-                return error_show(1004,"参数plat_code不能为空");
-            }
-//            $issale=Db::name("sale")->where(["skuCode"=>$platform['skuCode'],"status"=>[0,1,2]])->find();
-//            if($issale!=false &&$platform['plat_code']!=$good_code){
-//                return error_show(1004,"商品已下单,平台商品编码不允许修改");
-//            }
             $is_exit = Db::name("good_platform")
-                ->where(["plat_code" => $good_code, "platform_code" => $platform['platform_code'], "is_del" => 0, 'exam_status' => 6])//exam_status==6已上线
+                ->where(["plat_code" =>$post['plat_code'], "platform_code" => $platform['platform_code'], "is_del" =>0, 'exam_status' =>3])//exam_status==3已上线
                 ->where("id", "<>", $platform['id'])
                 ->find();
             if($is_exit==false){
-                $platform['plat_code']=$good_code;
+                $platform['plat_code']=$post['plat_code'];
             }else{
-                return error_show(1004,"平台商品编码 {$good_code} 已存在");
+                return error_show(1004,"平台商品编码 {$post['plat_code']} 已存在");
             }
 
         }
-        $exam_remark = isset($this->post['exam_remark'])&&$this->post['exam_remark']!==""?trim($this->post['exam_remark']):"";
-        $bifore=$platform['exam_status'];
-        $platform['exam_status']=$exam_status;
+        $platform['exam_status']=$post['exam_status'];
         $platform['updatetime']=date("Y-m-d H:i:s");
-        $token = isset($this->post['token'])&& $this->post['token']!='' ? trim($this->post['token']):"";
-        if($token==''){
-            return error_show(105,"参数token不能为空");
-        }
-        $user =GetUserInfo($token);
-        if(empty($user)||$user['code']!=0){
-            return error_show(1002,"用户数据不存在");
-        }
-        $createrid= isset($user["data"]['id']) ?  $user["data"]['id'] : "";
-        $creater= isset($user["data"]['nickname']) ?  $user["data"]['nickname'] : "";
+        $createrid= $this->uid;
+        $creater= $this->uname;
         Db::startTrans();
         try {
             $up = Db::name("good_platform")->save($platform);
             if($up){
                 $data=[
                     "code"=>$platform['skuCode'],
-                    "exam_status"=>$bifore,//$exam_status,
+                    "exam_status"=>$post['exam_status'],//$exam_status,
                     "type"=>2,
                     "exam_id"=>$createrid,
                     "exam_name"=>$creater,
-                    "exam_remark"=>$exam_remark,
+                    "exam_remark"=>$post['exam_remark'],
                     "addtime"=>date("Y-m-d H:i:s")
                 ];
                 $inr=Db::name("good_exam")->insert($data);
                 if($inr){
 
                     //如果是商品下线的话,记入商品下线记录表
-                    if ($exam_status == 8) {
+                    if ($post['exam_status'] == 5) {
                         $offline_id = Db::name("good_offline_log")->insertGetId([
                             'spuCode' => $platform['spuCode'],
-                            'skuCodes' => $skuCode,
+                            'skuCodes' => $platform['skuCode'],
                             'good_name' => Db::name("good_basic")->where('spuCode', $platform['spuCode'])->value('good_name', ''),
-                            'offline_reason' => $offline_reason,
-                            'offline_remark' => $offline_remark,
+                            'offline_reason' => $post['offline_reason'],
+                            'offline_remark' => $post['offline_remark'],
                             'createrid' => $createrid,
                             'creater' => $creater,
                             'addtime' => date('Y-m-d H:i:s'),
                         ]);
-
-                        ActionLog::logAdd(['id' => $createrid, 'nickname' => $creater], [
-                            "order_code" => $skuCode,//编号
-                            "status" => $bifore,
-                            "action_remark" => '',//备注
-                            "action_type" => "status"//新建create,编辑edit,更改状态status
-                        ], "GOL", $exam_status, $platform);
-
-                        ProcessOrder::AddProcess(['id' => $createrid, 'nickname' => $creater], [
-                            "order_type" => 'GOL',
-                            "order_code" => $skuCode,//咨询单详情编号
-                            "order_id" => $offline_id,//商品下线记录的ID
-                            "order_status" => $exam_status, "before_status" => $bifore
-                        ]);
-
                         //根据权限查询应该接收商品下线通知的人员
                         $all_uid_name = Db::name('role_action')
                             ->whereFindInSet('action_conllect','877')//数据写死的,要注意各个环境数据是否一致
@@ -1841,10 +1744,10 @@ class Goodup extends Base
                         $insert_order_msg_data=[];
                         foreach ($all_user as $itemitem) {
                             $insert_order_msg_data[] = [
-                                'content' => '商品下线:' . $skuCode . '由' . $creater . '操作下线',
-                                'orderCode' => $skuCode,
+                                'content' => '商品下线:' .  $platform['spuCode'] . '由' . $creater . '操作下线',
+                                'orderCode' =>  $platform['skuCode'],
                                 'order_type' => 'GOL',
-                                'order_status' => 8,
+                                'order_status' => 5,
                                 'order_id' => $offline_id,
                                 'apply_id' => $createrid,
                                 'apply_name' => $creater,
@@ -1859,48 +1762,38 @@ class Goodup extends Base
                         Db::name('order_msg')->insertAll($insert_order_msg_data);
 
                     }
-                    ActionLog::logAdd(['id' => $createrid, 'nickname' => $creater], [
-                        "order_code" => $skuCode,//编号
-                        "status" => $bifore,
-                        "action_remark" => '',//备注
-                        "action_type" => "status"//新建create,编辑edit,更改状态status
-                    ], "SPSX", $exam_status, $platform);
-
-                    ProcessOrder::AddProcess(['id' => $createrid, 'nickname' => $creater], [
-                        "order_type" => 'SPSX',
-                        "order_code" => $skuCode,//咨询单详情编号
-                        "order_id" => $platform['id'],
-                        "order_status" => $exam_status,
-                        "before_status" => $bifore,
-                        'holder_id' => $platform['createrid'],
-                    ]);
-
-                    //商品上线的话,将数据包塞入到队列中
-                    if ($exam_status == 6) {
-                        //将上线成功数据塞入到队列中
-
-                        $good_info = Db::name('good_basic')
-                            ->field('id,good_name,supplierNo')
-                            ->where(['is_del' => 0, 'spuCode' => $platform['spuCode']])
-                            ->findOrEmpty();
-                        if ($good_info) {
-                            $push_data = json_encode([
-                                'supplierNo' => $good_info['supplierNo'],
-                                'type' => 2,//1销售订单(采销的采购单),2上线结果
-                                'data' => [
-                                    'spuCode' => $platform['spuCode'],
-                                    'skuCode' => $platform['skuCode'],
-                                    'good_name' => $good_info['good_name'],
-                                    'platform_id' => $platform['platform_code'],
-                                    'platform_name' => Db::name('platform')->where(['id' => $platform['platform_code']])->value('platform_name', ''),
-                                    'plat_code' => $platform['plat_code'],
-                                    'online_time' => $platform['online_time'],
-                                ],
-                            ], JSON_UNESCAPED_UNICODE);
-//                            Cache::store("redis")->handler()->lPush(Config::get('app.abutment_queue'), $push_data);
-                        }
+                    if ($post['exam_status'] == 3) {
+						 $proof=[
+		                    'spuCode'=>$platform['spuCode'],
+		                    'proof_type'=>$post['proof_type'],
+		                    'proof_url'=>$post['proof_url'],
+		                    'is_del'=>0,
+		                    "creater"=>$creater,
+		                    "createrid"=>$createrid,
+		                    "addtime"=>date("Y-m-d H:i:s"),
+		                    "updatetime"=>date("Y-m-d H:i:s")
+		                    ];
+		                $inproof = Db::name("good_proof")->insert($proof);
+		                if($inproof==false)throw new \Exception("商品凭证新建失败");
+		                if(empty($post['good_ladder']))throw new \Exception("商品阶梯价不能为空");
+		                foreach ($post['good_ladder'] as $value){
+		                	     $lemp=[];
+				                $value["id"]?$lemp['id']=$value['id']:"";
+				                $lemp['skuCode']=$platform['skuCode'];
+				                $lemp['min_num'] = $value['min_num'];
+				                $lemp['max_num'] = 0;
+				                $lemp['sale_price'] = $value['sale_price'];
+				                $lemp['market_price'] = $value['market_price'];
+				                $lemp['market_platform'] = $value['market_platform'];
+				                $lemp['cost_fee'] = $value['cost_fee'];
+				                $lemp['is_del'] = isset($value['is_del'])?$value['is_del']:0;
+				                $value["id"]??$lemp['addtime'] = date("Y-m-d H:i:s");
+				                $lemp['updatetime'] =date("Y-m-d H:i:s");
+				                $ladderUp = Db::name("good_ladder")->save($lemp);
+				                if($ladderUp==false) throw new \Exception("商品起订价修改失败");
+
+		                }
                     }
-
                     Db::commit();
                     return app_show(0,"审核成功");
                 }else{
@@ -1918,7 +1811,7 @@ class Goodup extends Base
 
     }
 
-    //财务定价
+    //财务定价 废弃
     public function editladder(){
         $skuCode = isset($this->post['skuCode'])&&$this->post['skuCode']!==""?trim($this->post['skuCode']):"";
         if($skuCode===""){
@@ -1940,16 +1833,8 @@ class Goodup extends Base
         if($proof_url===""){
             return error_show(1004,"参数proof_url不能为空");
         }
-//        $token = isset($this->post['token'])&& $this->post['token']!='' ? trim($this->post['token']):"";
-//        if($token==''){
-//            return error_show(105,"参数token不能为空");
-//        }
         $exam_remark = isset($this->post['exam_remark'])&& $this->post['exam_remark']!='' ? trim($this->post['exam_remark']):"";
 
-//        $user =GetUserInfo($token);
-//        if(empty($user)||$user['code']!=0){
-//            return error_show(1002,"用户数据不存在");
-//        }
         $createrid= $this->uid;//isset($user["data"]['id']) ?  $user["data"]['id'] : "";
         $creater= $this->uname;//isset($user["data"]['nickname']) ?  $user["data"]['nickname'] : "";
         $bifore=$platform['exam_status'];
@@ -1979,21 +1864,21 @@ class Goodup extends Base
             }
             $up = Db::name("good_platform")->save($platform);
             if($up){
-                ActionLog::logAdd(['id'=>$this->uid,'nickname'=>$this->uname], [
-                    "order_code" =>$platform['skuCode'],//咨询单详情编号
-                    "status" =>$bifore,//这里的status是之前的值
-                    "action_remark" => '',//备注
-                    "action_type" => "edit"//新建create,编辑edit,更改状态status
-                ], "SPSX", $platform['exam_status'],$platform);
-
-                ProcessOrder::AddProcess(['id'=>$this->uid,'nickname'=>$this->uname], [
-                    "order_type" => 'SPSX',
-                    "order_code" =>$platform['skuCode'],//咨询单详情编号
-                    "order_id" => $platform['id'],
-                    "order_status" => $platform['exam_status'],
-                    "before_status"=>$bifore,
-                    'holder_id' => $platform['createrid'],
-                ]);
+//                ActionLog::logAdd(['id'=>$this->uid,'nickname'=>$this->uname], [
+//                    "order_code" =>$platform['skuCode'],//咨询单详情编号
+//                    "status" =>$bifore,//这里的status是之前的值
+//                    "action_remark" => '',//备注
+//                    "action_type" => "edit"//新建create,编辑edit,更改状态status
+//                ], "SPSX", $platform['exam_status'],$platform);
+//
+//                ProcessOrder::AddProcess(['id'=>$this->uid,'nickname'=>$this->uname], [
+//                    "order_type" => 'SPSX',
+//                    "order_code" =>$platform['skuCode'],//咨询单详情编号
+//                    "order_id" => $platform['id'],
+//                    "order_status" => $platform['exam_status'],
+//                    "before_status"=>$bifore,
+//                    'holder_id' => $platform['createrid'],
+//                ]);
                 $proof=[
                     'spuCode'=>$platform['spuCode'],
                     'proof_type'=>$proof_type,
@@ -2066,7 +1951,7 @@ class Goodup extends Base
             return error_show(1004,"未找到数据");
         }
 
-        if($platform["exam_status"]!=7&&$platform["exam_status"]!=8){
+        if($platform["exam_status"]!=5){
             return error_show(1004,"商品状态有误");
         }
         //判断平台商品编码是否重复
@@ -2081,38 +1966,16 @@ class Goodup extends Base
         $bifore=$platform['exam_status'];
         $platform['exam_status'] = empty($nake)?1:2;
         $platform['updatetime'] = date("Y-m-d H:i:s");
-        $token = isset($this->post['token'])&& $this->post['token']!='' ? trim($this->post['token']):"";
-        if($token==''){
-            return error_show(105,"参数token不能为空");
-        }
-        $user =GetUserInfo($token);
-        if(empty($user)||$user['code']!=0){
-            return error_show(1002,"用户数据不存在");
-        }
-        $createrid= isset($user["data"]['id']) ?  $user["data"]['id'] : "";
-        $creater= isset($user["data"]['nickname']) ?  $user["data"]['nickname'] : "";
+        $createrid= $this->uid;
+        $creater= $this->uame;
       Db::startTrans();
         try {
             $save =Db::name("good_platform")->save($platform);
             if($save){
-                ActionLog::logAdd(['id'=>$createrid,'nickname'=>$creater], [
-                    "order_code" =>$platform['skuCode'],//咨询单详情编号
-                    "status" =>$bifore,//这里的status是之前的值
-                    "action_remark" => '',//备注
-                    "action_type" => "edit"//新建create,编辑edit,更改状态status
-                ], "SPSX", $platform['exam_status'],$platform);
-                ProcessOrder::AddProcess(['id'=>$createrid,'nickname'=>$creater], [
-                    "order_type" => 'SPSX',
-                    "order_code" =>$platform['skuCode'],//咨询单详情编号
-                    "order_id" => $platform['id'],
-                    "order_status" => $platform['exam_status'],
-                    "before_status"=>$bifore,
-                    'holder_id' => $platform['createrid'],
-                ]);
                 $data=[
                     "code"=>$platform['skuCode'],
                     "type"=>2,
-                    "exam_status"=>$bifore,//$platform['exam_status'] ,
+                    "exam_status"=>$platform['exam_status'],//$platform['exam_status'] ,
                     "exam_id"=>$createrid,
                     "exam_name"=>$creater,
                     "exam_remark"=>'',
@@ -2161,10 +2024,6 @@ class Goodup extends Base
         if($token==''){
             return error_show(105,"参数token不能为空");
         }
-//        $user =GetUserInfo($token);
-//        if(empty($user)||$user['code']!=0){
-//            return error_show(102,"用户数据不存在");
-//        }
         $createrid= $this->uid;
         $creater= $this->uname;
         $nake = Db::name("good_nake")->where(["spuCode"=>$supcode,"is_del"=>0])->select()->toArray();
@@ -2410,13 +2269,8 @@ class Goodup extends Base
             return error_show(1004,"参数delivery_day不能为空");
         }
         $lead_time = isset($this->post['lead_time'])&&$this->post['lead_time']!==""? intval($this->post['lead_time']) :"0";
-//        if($lead_time===""){
-//            return error_show(1004,"参数lead_time不能为空");
-//        }
+
         $sample_day = isset($this->post['sample_day'])&&$this->post['sample_day']!==""? intval($this->post['sample_day']):"0";
-//        if($sample_day===""){
-//            return error_show(1004,"参数sample_day不能为空");
-//        }
         $sample_fee = isset($this->post['sample_fee'])&&$this->post['sample_fee']!==""? floatval($this->post['sample_fee']):"0";
 
         $good_img = isset($this->post['good_img'])&&$this->post['good_img']!=""? trim($this->post['good_img']):"";
@@ -2454,14 +2308,7 @@ class Goodup extends Base
         if($is_stock==1 && $stock_moq ==0){
             return error_show(1004,"库存品备库起订量不能为零");
         }
-//        $is_step = isset($this->post['is_step'])&&$this->post['is_step']!==""? intval($this->post['is_step']):"";
-//        if($is_step===""){
-//            return error_show(1004,"参数is_step不能为空");
-//        }
         $good_ladder = isset($this->post['good_ladder'])&&!empty($this->post['good_ladder'])? $this->post['good_ladder']:"";
-//        if($is_step==1 &&  $good_ladder==""){
-//            return error_show(1004,"启用阶梯,阶梯价不能为空");
-//        }
         $speclist = isset($this->post['speclist'])&&!empty($this->post['speclist'])? $this->post['speclist']:"";
 
         $is_support_barter = isset($this->post['is_support_barter']) && $this->post['is_support_barter'] !== "" ? intval($this->post['is_support_barter']) : 1;
@@ -2536,23 +2383,23 @@ class Goodup extends Base
             $json = json_encode($var,JSON_UNESCAPED_UNICODE);
             $dat = json_encode($data,JSON_UNESCAPED_UNICODE);
             if($up){
-                ChangeLog::logAdd(3,$data['spuCode'],$dat,$json,$this->post['token'],$this->post);
-                //修改状态,添加待办
-                ActionLog::logAdd($this->post['token'], [
-                    "order_code" =>$supcode,//咨询单详情编号
-                    "status" => $data['status'],//这里的status是之前的值
-                    "action_remark" => '',//备注
-                    "action_type" => "create"//新建create,编辑edit,更改状态status
-                ], "SPCB", 0,$temp);
-
-                ProcessOrder::AddProcess($this->post['token'], [
-                    "order_type" => 'SPCB',
-                    "order_code" =>$supcode,//咨询单详情编号
-                    "order_id" => $data['id'],
-                    "order_status" =>0,
-                    "before_status"=>0,
-                    'holder_id'=>$data['createrid'],
-                ]);
+                ChangeLog::logAdd(3,$data['spuCode'],$dat,$json,['id' => $this->uid, 'nickname' => $this->uname]);
+//                //修改状态,添加待办
+//                ActionLog::logAdd($this->post['token'], [
+//                    "order_code" =>$supcode,//咨询单详情编号
+//                    "status" => $data['status'],//这里的status是之前的值
+//                    "action_remark" => '',//备注
+//                    "action_type" => "create"//新建create,编辑edit,更改状态status
+//                ], "SPCB", 0,$temp);
+//
+//                ProcessOrder::AddProcess($this->post['token'], [
+//                    "order_type" => 'SPCB',
+//                    "order_code" =>$supcode,//咨询单详情编号
+//                    "order_id" => $data['id'],
+//                    "order_status" =>0,
+//                    "before_status"=>0,
+//                    'holder_id'=>$data['createrid'],
+//                ]);
                 if($speclist!=="" && !empty($speclist)){
                     foreach ($speclist as $value){
                         $lemp=[];
@@ -2572,7 +2419,7 @@ class Goodup extends Base
                 }
                 if($good_ladder!=="" && !empty($good_ladder)){
 
-                    $user =GetUserInfo($this->post['token']);//获取用户信息,下面更新成本表的创建人
+//                    $user =GetUserInfo($this->post['token']);//获取用户信息,下面更新成本表的创建人
 
                     $top_cat_id = made($cat_id);//获取所有分类
                     $top_cat_id = isset($top_cat_id[0]['id']) ? $top_cat_id[0]['id'] : 0;//获取顶级分类id
@@ -2601,8 +2448,8 @@ class Goodup extends Base
                         }else{
                             $lemp['nake_total'] =$value['nake_fee']+$value['delivery_fee']+$value['cert_fee']+$value['mark_fee']+$value['package_fee']+$value['other_fee'];
                         }
-                        $lemp['creater_id'] = isset($user["data"]['id']) ? $user["data"]['id'] : 0;
-                        $lemp['creater'] = isset($user["data"]['nickname']) ? $user["data"]['nickname'] : "";
+                        $lemp['creater_id'] = $this->uid;
+                        $lemp['creater'] = $this->uname;
                         $lemp['is_del'] = isset($value['is_del'])?$value['is_del']:0;
                         isset($value["id"])&&$value["id"]!=''?"": $lemp['addtime'] = date("Y-m-d H:i:s");
                         $lemp['updatetime'] =date("Y-m-d H:i:s");
@@ -2638,10 +2485,6 @@ class Goodup extends Base
         ]);
         if($val->check($param) == false) return json_show(1005,$val->getError());
 
-//        $spuCode=isset($this->post['spuCode'])&&$this->post['spuCode']!=""? trim($this->post['spuCode']):"";
-//        if($spuCode==""){
-//            return error_show(1005,"参数spuCode不能为空");
-//        }
         $good =Db::name("good_basic")
             ->field('id,is_stock,cat_id,is_gold_price,noble_weight,cgd_gold_price')
             ->where(["spuCode"=>$param['spuCode'],"is_del"=>0])
@@ -3337,7 +3180,7 @@ class Goodup extends Base
         $rs = Db::name('good_platform')
             ->field('id')
             ->where(['spuCode' => $spuCode, 'is_del' => 0])
-            ->whereNotIn('exam_status', [0, 8])
+            ->whereNotIn('exam_status', [0, 5])
             ->find();
 
         if (!empty($rs)) $is_allow_update = 0;
@@ -3375,5 +3218,22 @@ class Goodup extends Base
         return app_show(0, '请求成功', ['list' => $list, 'count' => $count]);
     }
 
+        //获取某个商品编号下的所有审核备注列表
+    public function changeLog()
+    {
+        $param = $this->request->filter('trim')->only(["code"=>"","type"=>""], 'post');
+
+        $val = Validate::rule(['code' => 'require|max:255', 'type' => 'require|number|in:1,2,3,4,5,6,7,8']);
+
+        if (!$val->check($param)) return error_show(1005, $val->getError());
+
+        $count = Db::name('change_log')
+            ->where([['code',"=", $param['code']],["type","=",$param['type']]])
+            ->order("id desc")
+            ->findOrEmpty();
+
+        return app_show(0, '请求成功', $count);
+    }
+
 
 }

+ 1 - 1
app/admin/controller/Platform.php

@@ -366,7 +366,7 @@ class Platform extends Base
             $json = json_encode($temp, JSON_UNESCAPED_UNICODE);
             $jsp = json_encode($info, JSON_UNESCAPED_UNICODE);
 
-            ChangeLog::logAdd(8, $info['platform_code'], $jsp, $json, ['id' => $this->uid, 'nickname' => $this->uname], $param);
+            ChangeLog::logAdd(8, $info['platform_code'], $jsp, $json, ['id' => $this->uid, 'nickname' => $this->uname]);
 
             if ($param['is_select_pay_rate'] == 1) {
 

+ 1 - 1
app/admin/controller/Specs.php

@@ -194,7 +194,7 @@ class Specs extends Base
         $json = json_encode($item,JSON_UNESCAPED_UNICODE);
         $jsp = json_encode($info,JSON_UNESCAPED_UNICODE);
         if($datainfo){
-            ChangeLog::logAdd(5,$info['id'],$jsp,$json,$this->post['token'],$this->post);
+            ChangeLog::logAdd(5,$info['id'],$jsp,$json,['id' => $this->uid, 'nickname' => $this->uname]);
             return error_show(0,"更新成功");
         }else{
             return error_show(1002,"更新失败");

+ 2 - 2
app/admin/controller/Title.php

@@ -8,7 +8,7 @@ use think\App;
 use think\facade\Db;
 
 //客户的营业执照相关信息
-class Title extends BaseController
+class Title extends Base
 {
     public $post = "";
     public function __construct(App $app)
@@ -215,7 +215,7 @@ class Title extends BaseController
         $json = json_encode($titn,JSON_UNESCAPED_UNICODE);
         $jsp = json_encode($info,JSON_UNESCAPED_UNICODE);
         if($temp){
-            ChangeLog::logAdd(2,$info['companyNo'],$jsp,$json,$this->post['token'],$this->post);
+            ChangeLog::logAdd(2,$info['companyNo'],$jsp,$json,['id' => $this->uid, 'nickname' => $this->uname]);
             return error_show(0,"更新成功");
         }else{
             return error_show(1002,"更新失败");

+ 1 - 1
app/admin/controller/Unit.php

@@ -167,7 +167,7 @@ class Unit extends Base
         $json = json_encode($item, JSON_UNESCAPED_UNICODE);
         $jsp = json_encode($info, JSON_UNESCAPED_UNICODE);
         if ($datainfo) {
-            ChangeLog::logAdd(4, $info['id'], $jsp, $json, ['id' => $this->uid, 'nickname' => $this->uname], $this->post);
+            ChangeLog::logAdd(4, $info['id'], $jsp, $json, ['id' => $this->uid, 'nickname' => $this->uname]);
             return error_show(0, "更新成功");
         } else {
             return error_show(1002, "更新失败");

+ 1 - 10
app/admin/model/ChangeLog.php

@@ -7,7 +7,7 @@ use think\Model;
 class ChangeLog extends Model
 {
     //记录商品、咨询单的修改记录
-    static function logAdd($type,$code,$before_info,$after_info,$token,$post){
+    static function logAdd($type,$code,$before_info,$after_info,$token){
         if (is_array($token)) {
             $createrid = $token['id'];
             $creater = $token['nickname'];
@@ -16,12 +16,6 @@ class ChangeLog extends Model
             $createrid = isset($user['data']['id']) ? $user['data']['id'] : 0;
             $creater = isset($user['data']['nickname']) ? $user['data']['nickname'] : '';
         }
-
-        unset($post['token']);
-
-//        $item= array_diff($before_info,$after_info);
-//        $json = json_encode($after_info,JSON_UNESCAPED_UNICODE);
-//        $jsp = json_encode($before_info,JSON_UNESCAPED_UNICODE);
         $data=[
             "createrid"=>$createrid,
             "creater"=>$creater,
@@ -29,11 +23,8 @@ class ChangeLog extends Model
             "after_info"=>$after_info,
             "code"=>$code,
             "type"=>$type,
-          //  "action_data"=>json_encode($post),
             "addtime"=>date("Y-m-d H:i:s"),
-          //  "updatetime"=>date("Y-m-d H:i:s")
         ];
-//        var_dump($data);
         self::insert($data);
     }
 }

+ 2 - 0
app/admin/route/app.php

@@ -434,6 +434,8 @@ Route::rule('goodupoffline', 'admin/Goodup/offlineGoodBySpuCode');
 Route::rule('getgoodexamlist', 'admin/Goodup/getGoodExamList');
 Route::rule('goodofflist', 'admin/GoodOfflineLog/getList');
 Route::rule('goodoffdetail', 'admin/GoodOfflineLog/getDetail');
+Route::rule("goodchangelog","admin/Goodup/changeLog");
+
 
 Route::rule('goodproof', 'admin/Goodup/prooflist');
 

+ 4 - 2
app/youzan/controller/Index.php

@@ -158,11 +158,13 @@ class Index extends Base
     public function orderCheckStatus()
     {
 
-        $param = $this->request->filter('trim')->only(['id', 'status', 'token', 'reason' => '']);
+        $param = $this->request->filter('trim')->only(['id', 'status', 'token',"fee_type"=>'', 'reason' => '']);
 
         $val = Validate::rule([
             'id|订单ID' => 'require|number|gt:0',
-            'status|审核状态' => 'require|number|in:3,4,5,0', 'token' => 'require'
+            'status|审核状态' => 'require|number|in:3,4,5,0',
+            'token' => 'require',
+            "fee_type"=>"number"
         ]);
 
         if ($val->check($param)) return Order::checkStatus($param);

+ 3 - 3
app/youzan/logic/Goodup.php

@@ -337,7 +337,7 @@ class Goodup
             } else {
 
                 $update_data['reject_reason'] = $data['reject_reason'];
-                $update_good_platform_data['exam_status'] = 7;
+                $update_good_platform_data['exam_status'] = 5;
             }
 
             //更新
@@ -680,8 +680,8 @@ class Goodup
             //更新
             Db::name('good_platform')
                 ->where(['is_del' => 0, 'spuCode' => $rs->spuCode, 'skuCode' => $rs->skuCode, 'platform_code' => $rs->platform_id])
-                ->where('exam_status', '<>', 8)
-                ->update(['exam_status' => 8, 'updatetime' => date('Y-m-d H:i:s')]);
+                ->where('exam_status', '<>', 5)
+                ->update(['exam_status' => 5, 'updatetime' => date('Y-m-d H:i:s')]);
 
             //下线记录表增加记录
             Db::name('good_offline_log_youzan')