Commit acdff771 by 杨树贤

添加配置文件以及修改助力自动提现那块

parent a51de744
...@@ -50,3 +50,5 @@ RobotUrl=https://oapi.dingtalk.com/robot/send?access_token=a7255513c160f20d65c0c ...@@ -50,3 +50,5 @@ RobotUrl=https://oapi.dingtalk.com/robot/send?access_token=a7255513c160f20d65c0c
LARAVELS_TIMER = true LARAVELS_TIMER = true
wechat_api_url=https://wechat.icsales.com
...@@ -61,7 +61,6 @@ class Assist extends Model ...@@ -61,7 +61,6 @@ class Assist extends Model
return false; return false;
} }
//要先去判断当条兑换请求是否已经有两个好友助力 //要先去判断当条兑换请求是否已经有两个好友助力
//todo:如果有的话,才会去走兑换流程,如果小于20块,自动转账,大于20要人工审核
$result = DB::table('user_exchanges')->where('id', $exchangeId)->increment('assist_count'); $result = DB::table('user_exchanges')->where('id', $exchangeId)->increment('assist_count');
if ($result) { if ($result) {
//操作成功后,去redis里面添加数据 //操作成功后,去redis里面添加数据
...@@ -75,17 +74,16 @@ class Assist extends Model ...@@ -75,17 +74,16 @@ class Assist extends Model
} }
$result = $redis->hset('ic_welfare_assists', $exchangeId, json_encode($assists)); $result = $redis->hset('ic_welfare_assists', $exchangeId, json_encode($assists));
if ($result === false) { if ($result === false) {
return false; return false;
} }
//去判断是不是有两个好友助力了 // //去判断是不是有两个好友助力了
$assistCount = DB::table('user_exchanges')->where('id', $exchangeId) // $assistCount = DB::table('user_exchanges')->where('id', $exchangeId)
->value('assist_count'); // ->value('assist_count');
//如果$assistCount=2,就代表是有两个好友助力,应该去判断是否自动提现 // //如果$assistCount=2,就代表是有两个好友助力,应该去判断是否自动提现
//todo:但是由于目前微信的红包自动转账还没有申请下来,所以目前先不做处理 // //todo:但是由于目前微信的红包自动转账还没有申请下来,所以目前先不做处理
if ($assistCount == 2) { // if ($assistCount == 2) {
//todo:还有一个问题就是提现成功后,要清除对应ic_welfare_assists里面的exchange_id的数据 // //todo:还有一个问题就是提现成功后,要清除对应ic_welfare_assists里面的exchange_id的数据
} // }
} else { } else {
return false; return false;
} }
......
3994 7163
\ No newline at end of file \ 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