Merge branch 'master' of https://git.shagain.club/shulang/webman
This commit is contained in:
commit
43f6e1299c
|
@ -118,7 +118,8 @@ class TaskController
|
||||||
// 如果该用户没有关联手机号,首次关联赠送积分
|
// 如果该用户没有关联手机号,首次关联赠送积分
|
||||||
if (UserPhone::where('user_id', $user_id)->count() == 0) {
|
if (UserPhone::where('user_id', $user_id)->count() == 0) {
|
||||||
UserRewardDao::base($user_id, 4, 50, '首次关联手机号送50积分');
|
UserRewardDao::base($user_id, 4, 50, '首次关联手机号送50积分');
|
||||||
$UserPhone = new UserPhone();
|
}
|
||||||
|
$UserPhone = new UserPhone();
|
||||||
$UserPhone->phone = $phone;
|
$UserPhone->phone = $phone;
|
||||||
$UserPhone->user_id = $user_id;
|
$UserPhone->user_id = $user_id;
|
||||||
$UserPhone->score = 0;
|
$UserPhone->score = 0;
|
||||||
|
@ -126,7 +127,6 @@ class TaskController
|
||||||
$UserPhone->time = 0;
|
$UserPhone->time = 0;
|
||||||
$UserPhone->last_time = time();
|
$UserPhone->last_time = time();
|
||||||
$UserPhone->save();
|
$UserPhone->save();
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// 本地已存在手机号,更新用户信息
|
// 本地已存在手机号,更新用户信息
|
||||||
// $UserPhone->user_id = $user_id;
|
// $UserPhone->user_id = $user_id;
|
||||||
|
@ -135,7 +135,7 @@ class TaskController
|
||||||
// $UserPhone->time = 0;
|
// $UserPhone->time = 0;
|
||||||
// $UserPhone->last_time = time();
|
// $UserPhone->last_time = time();
|
||||||
// $UserPhone->save();
|
// $UserPhone->save();
|
||||||
$GetLodeLog->delete();
|
$GetLodeLog->delete();
|
||||||
return ApiResponseApp::error([], '您已登陆');
|
return ApiResponseApp::error([], '您已登陆');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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('领取成功');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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('领取成功');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
@ -177,7 +183,7 @@ class WithdrawController
|
||||||
'status' => 5, //
|
'status' => 5, //
|
||||||
'status_text' => '支付错误:'.$res->ErrorMessage
|
'status_text' => '支付错误:'.$res->ErrorMessage
|
||||||
]);
|
]);
|
||||||
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, '收款人帐号格式错误');
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -11,6 +11,10 @@ use app\model\User;
|
||||||
*/
|
*/
|
||||||
class UserRewardDao
|
class UserRewardDao
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* 手续费
|
||||||
|
*/
|
||||||
|
public static $handlingFee=0;
|
||||||
/**
|
/**
|
||||||
* 注册赠送金额
|
* 注册赠送金额
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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
|
||||||
))
|
))
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue