|
@@ -83,7 +83,7 @@ class UserExtract extends BaseModel
|
|
|
|
|
|
$balance = bcsub($extractPrice,$data['money'],2);
|
|
|
if($balance < 0) $balance=0;
|
|
|
- if ($userInfo['integral'] > 0){
|
|
|
+ if ($userInfo['integral'] > 0 and $data['status'] == 1){
|
|
|
$tx = SystemConfigService::get('deduction_tx');
|
|
|
$sxf = ($data['money'] - (($data['money']*0.95) - 5));
|
|
|
$dk = $userInfo['integral']/$tx;
|
|
@@ -130,7 +130,7 @@ class UserExtract extends BaseModel
|
|
|
try{
|
|
|
$res1 = self::create($insertData);
|
|
|
if(!$res1) return self::setErrorInfo('提现失败');
|
|
|
- if ($userInfo['integral'] > 0){
|
|
|
+ if ($userInfo['integral'] > 0 and $data['status'] == 1){
|
|
|
if($dk > $sxf){
|
|
|
$res2 = User::edit([$bl => $balance, 'integral' => $ydk],$userInfo['uid'],'uid');
|
|
|
UserBill::expend('提现抵扣',$userInfo['uid'],'integral','extract',($sxf*$tx),$res1['id'],$ydk,'提现使用'.($sxf*$tx).'阳光抵扣'.$sxf.'手续费');
|