正在显示
1 个修改的文件
包含
16 行增加
和
2 行删除
@@ -132,13 +132,28 @@ class AdminResumeController extends AdminBaseController | @@ -132,13 +132,28 @@ class AdminResumeController extends AdminBaseController | ||
132 | public function operation(){ | 132 | public function operation(){ |
133 | $data = $this->request->param(); | 133 | $data = $this->request->param(); |
134 | // 拒绝 | 134 | // 拒绝 |
135 | + $model = new ResumeModel(); | ||
135 | if($data['type'] == 4){ | 136 | if($data['type'] == 4){ |
137 | + | ||
136 | // 判断是否重复提交 | 138 | // 判断是否重复提交 |
137 | $where_log['type'] = 2; | 139 | $where_log['type'] = 2; |
138 | $where_log['elseId'] = $data['id']; | 140 | $where_log['elseId'] = $data['id']; |
139 | $isSet = Db::name('Refund')->where($where_log)->find(); | 141 | $isSet = Db::name('Refund')->where($where_log)->find(); |
140 | if($isSet){ | 142 | if($isSet){ |
141 | - $this->apiResponse('0','请勿重复操作!'); | 143 | + $where_findStatus['id'] = $data['id']; |
144 | + $where_findStatus['status'] = array('neq',4); | ||
145 | + $ischange = $model->where($where_findStatus)->find(); | ||
146 | + if(!$ischange){ | ||
147 | + $this->apiResponse('0','请勿重复操作!'); | ||
148 | + }else{ | ||
149 | + $up_order['id'] = $data['id']; | ||
150 | + $up_order['status'] = $data['type']; | ||
151 | + $up_order['update_time'] = time(); | ||
152 | + $res = $model->isUpdate(true)->save($up_order); | ||
153 | + if(!$res){ | ||
154 | + $this->apiResponse('0','操作失败'); | ||
155 | + } | ||
156 | + } | ||
142 | } | 157 | } |
143 | $add_log['type'] = 2; | 158 | $add_log['type'] = 2; |
144 | $add_log['elseId'] = $data['id']; | 159 | $add_log['elseId'] = $data['id']; |
@@ -150,7 +165,6 @@ class AdminResumeController extends AdminBaseController | @@ -150,7 +165,6 @@ class AdminResumeController extends AdminBaseController | ||
150 | $this->apiResponse('0','操作失败'); | 165 | $this->apiResponse('0','操作失败'); |
151 | } | 166 | } |
152 | } | 167 | } |
153 | - $model = new ResumeModel(); | ||
154 | $up_order['id'] = $data['id']; | 168 | $up_order['id'] = $data['id']; |
155 | $up_order['status'] = $data['type']; | 169 | $up_order['status'] = $data['type']; |
156 | $up_order['update_time'] = time(); | 170 | $up_order['update_time'] = time(); |
-
请 注册 或 登录 后发表评论