Commit 82bbaca5 by 杨树贤

'加上通知判断以及修改bug

parent 9097fac0
......@@ -77,7 +77,7 @@ class UserExchangesController extends Controller
'audit_email' => $request->get('audit_email'),
'status' => $request->get('status'),
];
$res = $userExchange->auditUserExchange($request->id, $data);
$res = $userExchange->auditUserExchange($request->get('id'), $data);
if ($res) {
return $this->Export(0, 'ok');
} else {
......
......@@ -146,7 +146,7 @@ class Assist extends Model
$user = $redis->hget('ic_user', $userId);
if ($user) {
//发送通知
$task = new SendNoticeTask('IC_Code_Exchange', $user, $userId);
$task = new SendNoticeTask('IC_EXCHANGE_ASSIST', $user, $userId);
Task::deliver($task);
}
}
......
......@@ -91,7 +91,7 @@ class IntegralBill extends Model
$totalAmount = DB::table('integral_bills')
->leftJoin('integrals', 'integral_bills.integral_id', 'integrals.id')
->where('user_id', $userId)
->sum('integrals.amount');
->sum('integral_bills.amount');
//已经兑换的金额
$exchangedAmount = DB::table('user_exchanges')
->leftJoin('exchange_settings', 'user_exchanges.exchange_id', 'exchange_settings.id')
......
......@@ -93,8 +93,6 @@ class UserExchange extends Model
->update($data);
if (!$result) {
return false;
} else {
return true;
}
}
//无论是审核通过还是拒绝都要去通知用户
......
......@@ -35,10 +35,13 @@ class SendNoticeTask extends Task
}
try {
$Url = config('website.IC_AUTH_API') . '/hprose/HttpSendMsg';
$Url = config('system.IC_AUTH_API') . '/hprose/HttpSendMsg';
$res = json_decode(reportCurl($Url, $this->data, true, ['MsgToken:fg368hjk4567wtbk8']), true);
Log::error($Url);
Log::error(json_encode($this->data));
if (!isset($res['errcode']) || $res['errcode'] !== 0) {
ErrorLog(ErrorCode(001, 9), '消息系统消息发送失败');
Log::error(json_encode($res));
$this->PushTask = true;
}
......
18312
\ No newline at end of file
19560
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment