Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
ic_welfare_api
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
4df53760
authored
Sep 03, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复bug
parent
f5cd65cc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
8 deletions
app/Http/Controllers/ExchangeSettingsController.php
app/Http/Controllers/UserExchangesController.php
app/Services/ExchangeSettingService.php
app/Http/Controllers/ExchangeSettingsController.php
View file @
4df53760
...
...
@@ -56,7 +56,7 @@ class ExchangeSettingsController extends Controller
$exchangeSettings
[
'can_exchange'
]
=
$canExchangeStatus
;
//获取微信兑换状况
$info
=
$this
->
service
->
getWeixinExchangeInfo
(
98
);
$info
=
$this
->
service
->
getWeixinExchangeInfo
(
$userId
);
$exchangeSettings
[
'weixin_exchange_info'
]
=
$info
;
return
$this
->
Export
(
0
,
'ok'
,
$exchangeSettings
);
...
...
app/Http/Controllers/UserExchangesController.php
View file @
4df53760
...
...
@@ -69,7 +69,7 @@ class UserExchangesController extends Controller
return
$this
->
Export
(
self
::
EXCHANGED_TODAY
);
}
if
(
empty
(
$exchangeId
)
||
empty
(
$type
)
)
{
if
(
empty
(
$exchangeId
))
{
return
$this
->
Export
(
self
::
INVALID_PARAMETER
);
}
$data
=
[
...
...
app/Services/ExchangeSettingService.php
View file @
4df53760
...
...
@@ -26,17 +26,15 @@ class ExchangeSettingService
$userExchange
=
array_get
(
$userExchangeService
->
getUserExchange
(
$map
),
'data'
,
[]);
//如果最后一条记录是未审核就代表这个需要好友助力
$info
=
[];
$info
[
'exchanging'
]
=
1
;
$info
[
'exchanging'
]
=
$info
[
'assist_count'
]
=
0
;
if
(
is_array
(
$userExchange
))
{
//如果审核状态为未审核,就代表需要好友助力,也就是说正在兑换
if
(
$userExchange
[
'status'
]
==
0
)
{
$info
[
'assist_count'
]
=
$userExchange
[
'assist_count'
];
}
else
{
//否则直接返回没有正在兑换
$info
[
'exchanging'
]
=
$info
[
'assist_count'
]
=
0
;
$info
[
'exchanging'
]
=
1
;
}
//否则直接返回没有正在兑换
}
return
$info
;
}
}
\ 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