alias('py') ->leftJoin('platform p', 'p.id=py.platform_id AND p.is_del=0') ->whereLike('p.platform_name', '%' . $data['platform_name'] . '%') ->column('py.skuCode'); } $res = curl_request(config('app.yz_domain') . 'api/yz_order_list', $data); $res = json_decode($res, true); if ($res['code'] == 0) return app_show(0, $res['message'], $res['data']); else return error_show($res['code'], $res['message']); } //有赞订单审核 public static function checkStatus(array $data = []) { if (in_array($data['status'], [3, 5]) && $data['reason'] == '') return error_show(1005, '请填写驳回原因'); //用户信息 $userinfo = GetUserInfo($data['token']); $uid = isset($userinfo['data']['id']) ? $userinfo['data']['id'] : 0; $uname = isset($userinfo['data']['nickname']) ? $userinfo['data']['nickname'] : ''; $res = curl_request(config('app.yz_domain') . 'api/yz_check_status', array_merge($data, ['uid' => $uid, 'uname' => $uname])); $res = json_decode($res, true); if ($res['code'] == 0) { //修改状态,添加待办 ActionLog::logAdd(['id' => $uid, 'nickname' => $uname], [ "order_code" => $res['data']['skuCode'], "status" => $res['data']['old_status'],//这里的status是之前的值 "action_remark" => '',//备注 "action_type" => "status"//新建create,编辑edit,更改状态status ], "YZQRD", 0, $data); ProcessOrder::AddProcess(['id' => $uid, 'nickname' => $uname], [ "order_type" => 'YZQRD', "order_code" => $res['data']['skuCode'], "order_id" => $data['id'], "order_status" => $data['status'], "before_status" => $res['data']['old_status'], ]); return app_show(0, '操作成功'); } else return error_show(1005, $res['message']); } }