Compare commits

...

2 Commits

5 changed files with 32 additions and 21 deletions

View File

@ -311,21 +311,21 @@ class Vip_rewardController
->where('isfirst',1); ->where('isfirst',1);
// if // if
//判断是否有 //判断是否有
if ($UserReceivesVipLogs->count() > 0) { // if ($UserReceivesVipLogs->count() > 0) {
UserRewardDao::base($user_id, 6, $money, 'VIP'.$vip_id.'等级奖励'); // UserRewardDao::base($user_id, 6, $money, 'VIP'.$vip_id.'等级奖励');
UserReceivesVipLog::create([ // UserReceivesVipLog::create([
'user_id' => $user_id, // 'user_id' => $user_id,
'vip_id' => $vip_id, // 'vip_id' => $vip_id,
'isfirst' => 0, // 'isfirst' => 0,
]); // ]);
}else{ // }else{
UserRewardDao::base($user_id, 6, $new_money, '首次VIP'.$vip_id.'等级奖励'); // UserRewardDao::base($user_id, 6, $new_money, '首次VIP'.$vip_id.'等级奖励');
UserReceivesVipLog::create([ // UserReceivesVipLog::create([
'user_id' => $user_id, // 'user_id' => $user_id,
'vip_id' => $vip_id, // 'vip_id' => $vip_id,
'isfirst' => 1, // 'isfirst' => 1,
]); // ]);
} // }
return ApiResponseApp::success('领取成功'); return ApiResponseApp::success('领取成功');
} }

View File

@ -147,7 +147,7 @@ class Vip_salaryController
break; break;
} }
} }
UserRewardDao::base($user_id, 6, $money, 'VIP'.$vip_id.'晋升奖励'); // UserRewardDao::base($user_id, 6, $money, 'VIP'.$vip_id.'晋升奖励');
return ApiResponseApp::success('领取成功'); return ApiResponseApp::success('领取成功');
} }
} }

View File

@ -25,8 +25,14 @@ use support\Log;
class WithdrawController class WithdrawController
{ {
/**
* 不需要token认证的方法
*/
protected $noNeedLogin = ['callback']; protected $noNeedLogin = ['callback'];
/**
* 手续费
*/
protected static $handlingFee=0;
/** /**
* @Apidoc\Title("1.0 查询当前用户提现订单") * @Apidoc\Title("1.0 查询当前用户提现订单")
* @Apidoc\Url("api/withdraw/withdrawCashList") * @Apidoc\Url("api/withdraw/withdrawCashList")
@ -126,12 +132,12 @@ class WithdrawController
//大于1000等待管理员审核 //大于1000等待管理员审核
if ($money_no >= 100000) { if ($money_no >= 100000) {
//用户积分减少$money //用户积分减少$money
UserRewardDao::base($user_id, 1, - ($money_no + 300), '提现'); UserRewardDao::base($user_id, 1, - ($money_no + self::$handlingFee), '提现');
return ApiResponseApp::success(null, '等待管理员审核'); return ApiResponseApp::success(null, '等待管理员审核');
} }
//用户积分减少$money //用户积分减少$money
UserRewardDao::base($user_id, 1, - ($money_no + 300), '提现'); UserRewardDao::base($user_id, 1, - ($money_no + self::$handlingFee), '提现');
$userbank = Userbank::where('id', $bank_id)->first(); $userbank = Userbank::where('id', $bank_id)->first();
//获取刚刚存入数据库的id(订单号) //获取刚刚存入数据库的id(订单号)
$orderId = $withdraw->id; $orderId = $withdraw->id;
@ -174,7 +180,7 @@ class WithdrawController
'status' => 5, // 'status' => 5, //
'status_text' => '支付错误:'.$errorMsg 'status_text' => '支付错误:'.$errorMsg
]); ]);
UserRewardDao::base($user_id, 1, $money_no + 300, '提现失败返还'); UserRewardDao::base($user_id, 1, $money_no + self::$handlingFee, '提现失败返还');
// if ($res->ErrorMessage == "PayeeAccountNameFormatError") { // if ($res->ErrorMessage == "PayeeAccountNameFormatError") {
// return ApiResponseApp::error(null, '收款人帐号格式错误'); // return ApiResponseApp::error(null, '收款人帐号格式错误');
// } // }

View File

@ -11,6 +11,10 @@ use app\model\User;
*/ */
class UserRewardDao class UserRewardDao
{ {
/**
* 手续费
*/
public static $handlingFee=0;
/** /**
* 注册赠送金额 * 注册赠送金额
*/ */

View File

@ -506,7 +506,8 @@ const X = (e) => (w("data-v-a74356d2"), (e = e()), E(), e),
"span", "span",
le, le,
v(e.$t("提款手续费")) + v(e.$t("提款手续费")) +
"300 " + "0 " +
//孟加拉国提现手续费
v(e.$t("积分")), v(e.$t("积分")),
1 1
)) ))