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
acdff771
authored
Oct 10, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加配置文件以及修改助力自动提现那块
parent
a51de744
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
.env
app/Models/Assist.php
storage/laravels.json
storage/laravels.pid
.env
View file @
acdff771
...
...
@@ -50,3 +50,5 @@ RobotUrl=https://oapi.dingtalk.com/robot/send?access_token=a7255513c160f20d65c0c
LARAVELS_TIMER = true
wechat_api_url=https://wechat.icsales.com
app/Models/Assist.php
View file @
acdff771
...
...
@@ -61,7 +61,6 @@ class Assist extends Model
return
false
;
}
//要先去判断当条兑换请求是否已经有两个好友助力
//todo:如果有的话,才会去走兑换流程,如果小于20块,自动转账,大于20要人工审核
$result
=
DB
::
table
(
'user_exchanges'
)
->
where
(
'id'
,
$exchangeId
)
->
increment
(
'assist_count'
);
if
(
$result
)
{
//操作成功后,去redis里面添加数据
...
...
@@ -75,17 +74,16 @@ class Assist extends Model
}
$result
=
$redis
->
hset
(
'ic_welfare_assists'
,
$exchangeId
,
json_encode
(
$assists
));
if
(
$result
===
false
)
{
return
false
;
}
//去判断是不是有两个好友助力了
$assistCount
=
DB
::
table
(
'user_exchanges'
)
->
where
(
'id'
,
$exchangeId
)
->
value
(
'assist_count'
);
//如果$assistCount=2,就代表是有两个好友助力,应该去判断是否自动提现
//todo:但是由于目前微信的红包自动转账还没有申请下来,所以目前先不做处理
if
(
$assistCount
==
2
)
{
//todo:还有一个问题就是提现成功后,要清除对应ic_welfare_assists里面的exchange_id的数据
}
//
//去判断是不是有两个好友助力了
//
$assistCount = DB::table('user_exchanges')->where('id', $exchangeId)
//
->value('assist_count');
//
//如果$assistCount=2,就代表是有两个好友助力,应该去判断是否自动提现
//
//todo:但是由于目前微信的红包自动转账还没有申请下来,所以目前先不做处理
//
if ($assistCount == 2) {
//
//todo:还有一个问题就是提现成功后,要清除对应ic_welfare_assists里面的exchange_id的数据
//
}
}
else
{
return
false
;
}
...
...
storage/laravels.json
View file @
acdff771
This diff is collapsed.
Click to expand it.
storage/laravels.pid
View file @
acdff771
3994
\ No newline at end of file
7163
\ 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