|
@@ -85,13 +85,23 @@ class UserExtract extends BaseModel
|
|
|
{
|
|
|
$fail_time = time();
|
|
|
$data = self::get($id);
|
|
|
- $extract_number = $data['extract_price'];
|
|
|
- $mark = '提现失败,退回佣金' . $extract_number . '元';
|
|
|
+ $extract_number = $data['money'];
|
|
|
+ $mark = '提现失败,退回' . $extract_number . '积分';
|
|
|
$uid = $data['uid'];
|
|
|
+ if ($data['type'] == 1){
|
|
|
+ $str = 'integral';
|
|
|
+ }else{
|
|
|
+ $str = 'dynamic_integral';
|
|
|
+ }
|
|
|
$status = -1;
|
|
|
$User = User::where('uid', $uid)->find()->toArray();
|
|
|
- UserBill::income('提现失败', $uid, 'now_money', 'extract', $extract_number, $id, bcadd($User['now_money'], $extract_number, 2), $mark);
|
|
|
- User::bcInc($uid, 'brokerage_price', $extract_number, 'uid');
|
|
|
+ UserBill::income('提现失败', $uid, $str, 'th_extract', $extract_number, $id, bcadd($User['now_money'], $extract_number, 2), $mark);
|
|
|
+ User::bcInc($uid, $str, $extract_number, 'uid');
|
|
|
+ if ($data['type'] == 2){
|
|
|
+ User::bcDec($uid, 'contribution', $extract_number * sys_config('contribution')/100, 'uid');
|
|
|
+ UserBill::expend('提现失败扣回贡献值', $uid, 'contribution', 'th_contribution', $extract_number * sys_config('contribution')/100, $id, bcadd($User['dynamic_integral'], $extract_number * sys_config('contribution')/100, 2), '提现失败扣回贡献值');
|
|
|
+ }
|
|
|
+
|
|
|
$extract_type = '未知方式';
|
|
|
switch ($data['extract_type']) {
|
|
|
case 'alipay':
|
|
@@ -123,7 +133,7 @@ class UserExtract extends BaseModel
|
|
|
|
|
|
$data = self::get($id);
|
|
|
$extractNumber = $data['extract_price'];
|
|
|
- $mark = '成功提现佣金' . $extractNumber . '元';
|
|
|
+ $mark = '成功提现' . $extractNumber . '元';
|
|
|
$wechatUserInfo = WechatUser::where('uid', $data['uid'])->field('openid,user_type,routine_openid,nickname')->find();
|
|
|
$extract_type = '未知方式';
|
|
|
switch ($data['extract_type']) {
|
|
@@ -143,10 +153,10 @@ class UserExtract extends BaseModel
|
|
|
} else if (strtolower($wechatUserInfo->user_type) == 'wechat') {
|
|
|
WechatTemplateService::sendTemplate($wechatUserInfo->openid, WechatTemplateService::USER_BALANCE_CHANGE, [
|
|
|
'first' => $mark,
|
|
|
- 'keyword1' => '佣金提现',
|
|
|
+ 'keyword1' => '提现',
|
|
|
'keyword2' => date('Y-m-d H:i:s', time()),
|
|
|
'keyword3' => $extractNumber,
|
|
|
- 'remark' => '点击查看我的佣金明细'
|
|
|
+ 'remark' => '点击查看我的明细'
|
|
|
], Url::buildUrl('/user/cashrecord')->suffix('')->domain(true)->build());
|
|
|
}
|
|
|
}
|