|
@@ -297,6 +297,10 @@ class Project extends Base
|
|
|
if($cat_id!==""){
|
|
|
$where[]=["cat_id","=",$cat_id];
|
|
|
}
|
|
|
+ $status =isset($this->post['status'])&&$this->post['status']!==""?intval($this->post['status']):"";
|
|
|
+ if($status!==""){
|
|
|
+ $where[]=["status","=",$status];
|
|
|
+ }
|
|
|
$count = Db::name('project_feedback')->where($where)->count();
|
|
|
$total = ceil($count / $size);
|
|
|
$page = $page >= $total ? $total : $page;
|
|
@@ -549,19 +553,25 @@ class Project extends Base
|
|
|
if(empty($feedid)){
|
|
|
return error_show(1004,"参数feedid不能为空");
|
|
|
}
|
|
|
- $selec = Db::name("project_feedback")->where(["id"=>$feedid,'is_del'=>0,"status"=>0])->select();
|
|
|
+ $feedid=array_unique($feedid);
|
|
|
+ $selec = Db::name("project_feedback")->where(["id"=>$feedid,'is_del'=>0,"status"=>0])->select()->toArray();
|
|
|
if(empty($selec)){
|
|
|
return error_show(1004,"反馈数据信息未找到");
|
|
|
}
|
|
|
+ $pgnos =array_column($selec,"pgNo");
|
|
|
+ $infolist = Db::name("project_info")->where(['pgNo'=>$pgnos])->select()->toArray();
|
|
|
+ if(empty($infolist)){
|
|
|
+ return error_show(1004,"项目商品数据未找到");
|
|
|
+ }
|
|
|
Db::startTrans();
|
|
|
try{
|
|
|
$up = Db::name("project_feedback")->where(["id"=>$feedid,'is_del'=>0,"status"=>0])->save(["status"=>1,"updatetime"=>date("Y-m-d H:i:s")]);
|
|
|
if($up){
|
|
|
- foreach ($selec as $value){
|
|
|
- $projectinfo=[];
|
|
|
- $projectinfo['status']=3;
|
|
|
- $projectinfo['updatetime']=date("Y-m-d H:i:s");
|
|
|
- $up = Db::name("project_info")->where(['pgNo'=>$value['pgNo']])->save($projectinfo);
|
|
|
+
|
|
|
+ foreach ($infolist as $value){
|
|
|
+ $value['status']=3;
|
|
|
+ $value['updatetime']=date("Y-m-d H:i:s");
|
|
|
+ $up = Db::name("project_info")->save($value);
|
|
|
if($up){
|
|
|
$count = Db::name("project_info")->where(["projectNo"=>$value['projectNo'],"status"=>2])
|
|
|
->count();
|