Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
ic_server_welfare
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
82bbaca5
authored
Oct 24, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
'加上通知判断以及修改bug
parent
9097fac0
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9 additions
and
8 deletions
app/Http/Controllers/UserExchangesController.php
app/Models/Assist.php
app/Models/IntegralBill.php
app/Models/UserExchange.php
app/Tasks/SendNoticeTask.php
storage/laravels.json
storage/laravels.pid
app/Http/Controllers/UserExchangesController.php
View file @
82bbaca5
...
...
@@ -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
{
...
...
app/Models/Assist.php
View file @
82bbaca5
...
...
@@ -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
);
}
}
...
...
app/Models/IntegralBill.php
View file @
82bbaca5
...
...
@@ -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
_bill
s.amount'
);
//已经兑换的金额
$exchangedAmount
=
DB
::
table
(
'user_exchanges'
)
->
leftJoin
(
'exchange_settings'
,
'user_exchanges.exchange_id'
,
'exchange_settings.id'
)
...
...
app/Models/UserExchange.php
View file @
82bbaca5
...
...
@@ -93,8 +93,6 @@ class UserExchange extends Model
->
update
(
$data
);
if
(
!
$result
)
{
return
false
;
}
else
{
return
true
;
}
}
//无论是审核通过还是拒绝都要去通知用户
...
...
app/Tasks/SendNoticeTask.php
View file @
82bbaca5
...
...
@@ -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
;
}
...
...
storage/laravels.json
View file @
82bbaca5
This diff is collapsed.
Click to expand it.
storage/laravels.pid
View file @
82bbaca5
18312
\ No newline at end of file
19560
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment