|
@@ -108,6 +108,25 @@ class Goodup extends Base
|
|
|
->group("a.spuCode")->column('a.spuCode');
|
|
|
$where[]=["spuCode","in",$sta];
|
|
|
}
|
|
|
+ $token = isset($this->post['token']) ? trim($this->post['token']) : "";
|
|
|
+ if($token==""){
|
|
|
+ return error_show(101,'token不能为空');
|
|
|
+ }
|
|
|
+ $apply_id =GetUserInfo($token);
|
|
|
+ if(empty($apply_id)||$apply_id['code']!=0){
|
|
|
+ return error_show(102,"申请人数据不存在");
|
|
|
+ }
|
|
|
+ $rm= isset($apply_id["data"]['id']) ? $apply_id["data"]['id'] : "";
|
|
|
+ if($rm!=''){
|
|
|
+ $useinfo = Db::name("user_role")->where(['uid'=>$rm,"status"=>1,"is_del"=>0])->find();
|
|
|
+ if($useinfo==false){
|
|
|
+ return error_show(1002,"未找到用户角色权限");
|
|
|
+ }
|
|
|
+ $check = checkRole($useinfo['roleid'],115);
|
|
|
+ if($check){
|
|
|
+ $where[]=['createrid', "=" ,$rm];
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
$count = Db::name('good_basic')->where($where)->count();
|
|
|
$total = ceil($count / $size);
|
|
@@ -375,6 +394,7 @@ class Goodup extends Base
|
|
|
"is_diff"=>$is_diff,
|
|
|
"config"=>$config,
|
|
|
"other_config"=>$other_config,
|
|
|
+ "field_change"=>'',
|
|
|
"is_step" => count($good_ladder) > 1 ? 1 : 0,//如果阶梯价个数大于1,说明启用阶梯价
|
|
|
"is_online"=>0,
|
|
|
"status"=>0,
|
|
@@ -589,8 +609,12 @@ class Goodup extends Base
|
|
|
// 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";
|
|
|
-
|
|
|
+ // $sample_fee = isset($this->post['sample_fee'])&&$this->post['sample_fee']!==""? floatval
|
|
|
+ //($this->post['sample_fee']):"0";
|
|
|
+ $config = isset($this->post['config'])&&$this->post['config']!==""? trim($this->post['config']):"";
|
|
|
+ $other_config = isset($this->post['other_config'])&&$this->post['other_config']!==""? trim($this->post['other_config']):"";
|
|
|
+ $is_diff = isset($this->post['is_diff'])&&$this->post['is_diff']!==""? intval($this->post['is_diff']):"0";
|
|
|
+ $is_stock = isset($this->post['is_stock'])&&$this->post['is_stock']!==""? intval($this->post['is_stock']):"";
|
|
|
$good_img = isset($this->post['good_img'])&&$this->post['good_img']!=""? trim($this->post['good_img']):"";
|
|
|
if($good_img===""){
|
|
|
return error_show(1004,"参数good_img不能为空");
|
|
@@ -638,7 +662,10 @@ class Goodup extends Base
|
|
|
"delivery_day"=>$delivery_day,
|
|
|
"lead_time"=>$lead_time,
|
|
|
"sample_day"=>$sample_day,
|
|
|
- "sample_fee"=>$sample_fee,
|
|
|
+ "is_diff"=>$is_diff,
|
|
|
+ 'is_stock'=>$is_stock,
|
|
|
+ "config"=>$config,
|
|
|
+ "other_config"=>$other_config,
|
|
|
"good_img"=>$good_img,
|
|
|
"good_thumb_img"=>$good_thumb_img,
|
|
|
"good_info_img"=>$good_info_img,
|
|
@@ -698,6 +725,7 @@ class Goodup extends Base
|
|
|
$mark_fee = isset($this->post['mark_fee'])&&$this->post['mark_fee']!==""? floatval($this->post['mark_fee']):"0";
|
|
|
$demo_fee = isset($this->post['demo_fee'])&&$this->post['demo_fee']!==""? floatval($this->post['demo_fee']):"0";
|
|
|
$open_fee = isset($this->post['open_fee'])&&$this->post['open_fee']!==""? floatval($this->post['open_fee']):"0";
|
|
|
+ $sample_fee = isset($this->post['sample_fee'])&&$this->post['sample_fee']!==""? floatval($this->post['sample_fee']):"0";
|
|
|
$noble_metal = isset($this->post['noble_metal'])&&$this->post['noble_metal']!==""? intval($this->post['noble_metal']):"0";
|
|
|
$noble_weight = isset($this->post['noble_weight'])&&$this->post['noble_weight']!==""? floatval($this->post['noble_weight']):"0";
|
|
|
$is_gold_price= isset($this->post['is_gold_price'])&&$this->post['is_gold_price']!==""? intval($this->post['is_gold_price']):"0";
|
|
@@ -722,6 +750,7 @@ class Goodup extends Base
|
|
|
"mark_fee"=>$mark_fee,
|
|
|
"demo_fee"=>$demo_fee,
|
|
|
"open_fee"=>$open_fee,
|
|
|
+ "sample_fee"=>$sample_fee,
|
|
|
"noble_metal"=>$noble_metal,
|
|
|
"noble_weight"=>$noble_weight,
|
|
|
"is_gold_price"=>$is_gold_price,
|
|
@@ -729,7 +758,7 @@ class Goodup extends Base
|
|
|
"nake_price"=>$nake_price,
|
|
|
"cgd_gold_price"=>$cgd_gold_price,
|
|
|
"is_step" => count($good_ladder) > 1 ? 1 : 0,
|
|
|
- "status"=>"2",
|
|
|
+ "status"=>"3",
|
|
|
"updatetime"=>date("Y-m-d H:i:s")
|
|
|
];
|
|
|
$field = array_diff_assoc($data,$datas);
|
|
@@ -769,7 +798,7 @@ class Goodup extends Base
|
|
|
$lemp['nake_total'] =$value['nake_fee']+$value['delivery_fee']+$value['cert_fee']+$value['mark_fee']+$value['package_fee']+$value['other_fee'];
|
|
|
}
|
|
|
$lemp['is_del'] = isset($value['is_del'])?$value['is_del']:0;
|
|
|
- $lemp['createrid'] = isset($user["data"]['id']) ? $user["data"]['id'] : "";
|
|
|
+ $lemp['creater_id'] = isset($user["data"]['id']) ? $user["data"]['id'] : "";
|
|
|
$lemp['creater'] =isset($user["data"]['nickname']) ? $user["data"]['nickname'] : "";
|
|
|
isset($value["id"])&&$value["id"]!=''?"": $lemp['addtime'] = date("Y-m-d H:i:s");
|
|
|
$lemp['updatetime'] =date("Y-m-d H:i:s");
|
|
@@ -1558,7 +1587,10 @@ class Goodup extends Base
|
|
|
return error_show(1004,"参数market_price不能为空");
|
|
|
}
|
|
|
$nake_price = isset($this->post['nake_price'])&&$this->post['nake_price']!==""? floatval($this->post['nake_price']):"0";
|
|
|
-
|
|
|
+ $config = isset($this->post['config'])&&$this->post['config']!==""? trim($this->post['config']):"";
|
|
|
+ $other_config = isset($this->post['other_config'])&&$this->post['other_config']!==""? trim($this->post['other_config']):"";
|
|
|
+ $is_diff = isset($this->post['is_diff'])&&$this->post['is_diff']!==""? intval($this->post['is_diff']):"0";
|
|
|
+ $is_stock = isset($this->post['is_stock'])&&$this->post['is_stock']!==""? intval($this->post['is_stock']):"0";
|
|
|
// $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不能为空");
|
|
@@ -1607,6 +1639,10 @@ class Goodup extends Base
|
|
|
"good_info_img"=>$good_info_img,
|
|
|
"cert_fee"=>$cert_fee,
|
|
|
"packing_fee"=>$packing_fee,
|
|
|
+ "is_diff"=>$is_diff,
|
|
|
+ "config"=>$config,
|
|
|
+ "other_config"=>$other_config,
|
|
|
+ "is_stock"=>$is_stock,
|
|
|
"cost_fee"=>$cost_fee,
|
|
|
"mark_fee"=>$mark_fee,
|
|
|
"demo_fee"=>$demo_fee,
|