|
@@ -42,10 +42,10 @@ class Project extends \app\BaseController
|
|
|
if($arrtime==""){
|
|
|
return error_show(1004,"参数arrtime不能为空");
|
|
|
}
|
|
|
- $low_rate = isset($this->post['low_rate'])&&$this->post['low_rate']!=""?floatval($this->post['low_rate']):"";
|
|
|
- if($low_rate==""){
|
|
|
- return error_show(1004,"参数low_rate不能为空");
|
|
|
- }
|
|
|
+ $low_rate = isset($this->post['low_rate'])&&$this->post['low_rate']!=""?floatval($this->post['low_rate']):"0";
|
|
|
+// if($low_rate==""){
|
|
|
+// return error_show(1004,"参数low_rate不能为空");
|
|
|
+// }
|
|
|
$ladder = isset($this->post['ladder'])&&!empty($this->post['ladder'])? $this->post['ladder']:"";
|
|
|
if($ladder==""){
|
|
|
return error_show(1004,"参数ladder不能为空");
|
|
@@ -78,7 +78,7 @@ class Project extends \app\BaseController
|
|
|
"addtime"=>date("Y-m-d H:i:s"),
|
|
|
"updatetime"=>date("Y-m-d H:i:s")
|
|
|
];
|
|
|
- $pro=Db::name("good_project")->insert($data);
|
|
|
+ $pro=Db::name("project")->insert($data);
|
|
|
if($pro){
|
|
|
if(!empty($ladder)){
|
|
|
$la=[];
|
|
@@ -129,13 +129,13 @@ class Project extends \app\BaseController
|
|
|
if($spuCode==""){
|
|
|
return error_show(1004,"参数spuCode不能为空");
|
|
|
}
|
|
|
- $source =isset($this->post['source'])&&$this->post['source']!=="" ?intval($this->post['source']):"";
|
|
|
- if($source==""){
|
|
|
- return error_show(1004,"参数source不能为空");
|
|
|
- }
|
|
|
+ $source =isset($this->post['source'])&&$this->post['source']!=="" ?intval($this->post['source']):"1";
|
|
|
+// if($source==""){
|
|
|
+// return error_show(1004,"参数source不能为空");
|
|
|
+// }
|
|
|
$good=[];
|
|
|
if($source==1){
|
|
|
- $good=Db::name("good_basic")->where(["spuCode"=>$spuCode,"is_del"=>0])->select()->toArray();
|
|
|
+ $good=Db::name("good")->where(["spuCode"=>$spuCode,"is_del"=>0])->select()->toArray();
|
|
|
if(empty($good)){
|
|
|
return error_show(1004,"未找到商品信息");
|
|
|
}
|
|
@@ -163,7 +163,7 @@ class Project extends \app\BaseController
|
|
|
$temp['data_source']=$source;
|
|
|
$temp['cat_id']=$value['cat_id'];
|
|
|
$temp['budget_price']=$projectinfo['budget_price'];
|
|
|
- $temp['sale_price']=$value['sale_price'];
|
|
|
+ $temp['sale_price']=$value['nake_price'];
|
|
|
$temp['num']=$projectinfo['num'];
|
|
|
$temp['status']=0;
|
|
|
$temp['is_del']=0;
|
|
@@ -173,7 +173,7 @@ class Project extends \app\BaseController
|
|
|
$temp['updatetime']=date("Y-m-d H:i:s");
|
|
|
$data[]=$temp;
|
|
|
}
|
|
|
- $nu = Db::name("project_feeback")->insertAll($data);
|
|
|
+ $nu = Db::name("project_feedback")->insertAll($data);
|
|
|
if($nu>0){
|
|
|
Db::commit();
|
|
|
return app_show(0,"添加成功");
|