|
@@ -153,7 +153,20 @@ class After extends Base
|
|
|
|
|
|
Db::execute("UPDATE `wsm_standing_book` SET `returnCode`=CONCAT(IFNULL(`returnCode`,''),',{$returnCode}'),`updatetime`='" . date('Y-m-d H:i:s') . "' WHERE FIND_IN_SET('{$outCode}',`outCode`)");
|
|
|
|
|
|
- $process = ["order_code" => $returnCode, "order_id" => $create, "order_status" => $in['status'], "order_type" => 'SHD', "before_status" => 1,'holder_id'=>$in['apply_id']];
|
|
|
+ //当状态为1(即待业务审核)时,要将待办数据推给销售主管,即角色为'客服负责人'的用户
|
|
|
+ $user = Db::name('depart_user')
|
|
|
+ ->field('a.uid,a.nickname')
|
|
|
+ ->alias('a')
|
|
|
+ ->leftJoin('user_role b', 'b.uid=a.uid')
|
|
|
+ ->where([
|
|
|
+ 'b.is_del' => 0,
|
|
|
+ 'b.roleid' => 12,//客服负责人
|
|
|
+ 'a.is_del' => 0,
|
|
|
+ 'a.status' => 1,
|
|
|
+ ])
|
|
|
+ ->findOrEmpty();
|
|
|
+
|
|
|
+ $process = ["order_code" => $returnCode, "order_id" => $create, "order_status" => $in['status'], "order_type" => 'SHD', "before_status" => 0, 'wait_id' => $user['uid'], 'wait_name' => $user['nickname']];
|
|
|
ProcessOrder::AddProcess($token,$process);
|
|
|
Db::commit();
|
|
|
return app_show(0,"售后申请单新建成功",["returnCode"=>$returnCode]);
|