删除无用代码

This commit is contained in:
2020-12-04 16:30:57 +08:00
parent 82d910a729
commit 7f330fe4f2
2 changed files with 10 additions and 60 deletions

View File

@ -1519,7 +1519,7 @@ class Orders extends Base{
$vm = new UserVouchers();
$zgSwipeUseReal = boolval(dataConf('zgSwipeUseReal'));
$zgSwipeUseReal = dataConf('zgSwipeUseReal') != 0;
$zgSwipeUnless = floatval(dataConf('zgSwipeUnless'));
$zgSwipeToLevel = (int)$order['helpUserLevel'];
// 确认是否滑动
@ -1559,27 +1559,18 @@ class Orders extends Base{
$totalMoney = $order['realTotalMoney'];//产品额
$buyerPreProductNum = $buyerPreProductNum > $totalMoney ? $totalMoney : $buyerPreProductNum;
// 10.15添加:助购户的 助购预获 减少的同时 代快付值等额减少
if ((int)$order["helpUserLevel"] === 1) {
Db::name("orders")->where(compact('orderId'))->update([
"helpGetCount"=>$buyerPreProductNum,
"helpGetCount2"=>$calBaseNum*((float)dataConf('helpSaleCouponsCalBase')/100),
]);}
else {
Db::name("orders")->where(compact('orderId'))->update([
"helpGetCount"=>$buyerPreProductNum*((int)$order["helpUserLevel"])*(float)dataConf("helpSaleCalBase"),
"helpGetCount2"=>$calBaseNum*((float)dataConf('helpSaleCouponsCalBase')/100),
]);
if ($order["helpUserLevel"] > 1) {
$buyerPreProductNum = $buyerPreProductNum*((int)$order["helpUserLevel"])*(float)dataConf("helpSaleCalBase");
}
Db::name("orders")->where(compact('orderId'))->update([
"helpGetCount"=>$buyerPreProductNum,
"helpGetCount2"=>$calBaseNum*((float)dataConf('helpSaleCouponsCalBase')/100),
]);
// step 5 平台送自己10000×N“助购预获”
// 10000“预获产品券”
// 10000×0.4×0.5×0.5=1000“预获优惠券”。
if ((int)$order["helpUserLevel"] === 1) {
$vm->insertHelpSaleNotice($userId, $orderId, $buyerPreProductNum,
'订单【'.$order['orderNo'].'】购户购物所得', 1);
} else {
$vm->insertHelpSaleNotice($userId, $orderId, $buyerPreProductNum*((int)$order["helpUserLevel"])*(float)dataConf("helpSaleCalBase"),
'订单【'.$order['orderNo'].'】购户购物所得', 1);
}
$vm->insertHelpSaleNotice($userId, $orderId, $buyerPreProductNum, '订单【'.$order['orderNo'].'】购户购物所得', 1);
// step 8 平台送自己的上第N层扣减“助购预获”、“预获产品券”各10000×0.4×0.5=2000
// 同时添加10000×0.4×0.5=2000“已获产品券”。