|
|
|
@ -1434,8 +1434,13 @@ class PromoteController extends ThinkController
|
|
|
|
|
public function belong_verify()
|
|
|
|
|
{
|
|
|
|
|
$verify_status = $_REQUEST['verify_status'];
|
|
|
|
|
$res = M('promote_belong', 'tab_')->where(['id' => ['in', I('ids')]])->save(['verify_status' => $verify_status]);
|
|
|
|
|
$res = M('promote_belong', 'tab_')->where(['id' => ['in', I('ids')]])->save([
|
|
|
|
|
'verify_status' => $verify_status,
|
|
|
|
|
'approver_id' => getAdmin(),
|
|
|
|
|
'approver_name' => getAdmin('username'),
|
|
|
|
|
]);
|
|
|
|
|
if (!is_null($res) ) {
|
|
|
|
|
if ($verify_status == 1) {//审核通过才修改推广员的归属关系
|
|
|
|
|
$promote_belongs = M('promote_belong', 'tab_')->where(['id' => ['in', I('ids')]])->select();
|
|
|
|
|
foreach ($promote_belongs as $promote_belong) {
|
|
|
|
|
$update = [
|
|
|
|
@ -1446,6 +1451,7 @@ class PromoteController extends ThinkController
|
|
|
|
|
->where("chain like '%/{$promote_belong['promote_id']}/%' or id={$promote_belong['promote_id']} ")
|
|
|
|
|
->save($update);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$this->success("操作成功", U('belong'));
|
|
|
|
|
} else {
|
|
|
|
|
$this->error('操作失败');
|
|
|
|
|