系统未转换值
This commit is contained in:
parent
bc4ff82edf
commit
fadce0e804
@ -13,11 +13,16 @@ class UserVouchers extends Base{
|
|||||||
$sysData= $sm->getInfo('toPayFast,toPaySlow');
|
$sysData= $sm->getInfo('toPayFast,toPaySlow');
|
||||||
//获取代快付值
|
//获取代快付值
|
||||||
$toPayFast = $sysData['toPayFast'];
|
$toPayFast = $sysData['toPayFast'];
|
||||||
|
$HistoryToPayFast = $sysData['toPayFast'];
|
||||||
//今日代快付释放值
|
//今日代快付释放值
|
||||||
$payFast = round($toPayFast * (dataConf('fastPayDayScale')*0.01),5);
|
$payFast = round($toPayFast * (dataConf('fastPayDayScale')*0.01),5);
|
||||||
//获取代慢付值
|
//获取代慢付值
|
||||||
$toPaySlow = $sysData['toPaySlow'];
|
$toPaySlow = $sysData['toPaySlow'];
|
||||||
//今日付慢付释放值
|
$HistoryToPaySlow = $sysData['toPaySlow'];
|
||||||
|
$m = Model('common/Table');
|
||||||
|
$m->setTable('user_vouchers_summary');
|
||||||
|
$HistoryVouchersSummarySum = $m->getSum(['isDisabled'=>0],'expectedProductNum+expectedCouponsNum');
|
||||||
|
//今日付慢付释放值
|
||||||
$paySlow = round($toPaySlow * (dataConf('slowPayDayScale')*0.01),5);
|
$paySlow = round($toPaySlow * (dataConf('slowPayDayScale')*0.01),5);
|
||||||
//应释放总额
|
//应释放总额
|
||||||
$toPaySum = $payFast + $paySlow;
|
$toPaySum = $payFast + $paySlow;
|
||||||
@ -153,7 +158,19 @@ class UserVouchers extends Base{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Db::commit();
|
Db::commit();
|
||||||
return WSTReturn("ok", 1);
|
$sm = Model('common/SysSummary');
|
||||||
|
$sysData= $sm->getInfo('toPayFast,toPaySlow');
|
||||||
|
$toPayFast = $sysData['toPayFast'];
|
||||||
|
$toPaySlow = $sysData['toPaySlow'];
|
||||||
|
$m = Model('common/Table');
|
||||||
|
$m->setTable('user_vouchers_summary');
|
||||||
|
$vouchersSummarySum = $m->getSum(['isDisabled'=>0],'expectedProductNum+expectedCouponsNum');
|
||||||
|
$deltaFast = $HistoryToPayFast - $toPayFast;
|
||||||
|
$deltaSlow = $HistoryToPaySlow - $toPaySlow;
|
||||||
|
$deltaConv = $HistoryVouchersSummarySum - $vouchersSummarySum;
|
||||||
|
$unConv = $deltaFast + $deltaSlow - $deltaConv;
|
||||||
|
if ($unConv > 0) $sm->addSysSummary(0, $unConv, 1, "加入系统未转换值");
|
||||||
|
return WSTReturn("ok", 1);
|
||||||
}catch (\Exception $e) {
|
}catch (\Exception $e) {
|
||||||
dump($e);
|
dump($e);
|
||||||
Db::rollback();errLog($e);
|
Db::rollback();errLog($e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user