This commit is contained in:
2020-09-29 15:13:25 +08:00
parent 425f003747
commit 018f73673b
4 changed files with 74 additions and 2 deletions

View File

@ -3,6 +3,8 @@ namespace wstmart\common\model;
use think\Db;
use think\Loader;
use wstmart\common\model\LogSms;
use wstmart\admin\model\SysConfigs as SCM;
/**
* ============================================================================
* 订单业务处理类
@ -1539,6 +1541,20 @@ class Orders extends Base{
'预获产品券转换所扣', 0);
}
// 9.26添加
//四级功能相关字:购户吉日获得“已获优惠券”为 00时 00分 15秒 年2020 月10 日01
//四级功能相关字:购户吉日获得“已获优惠券”的留言?祝您及家人幸福安康
//四级功能相关字:购户吉日获得“已获优惠券”为“助购值”的?% 50
$sysConf = (new SCM())->getSysConfigs();
if (isset($sysConf['jiri_jiyan']) && isset($sysConf['jiri_get_percent']) && isset($sysConf['jiri']) ) {
if (date('Y/m/d') == date('Y-m-d', strtotime($sysConf['jiri']))) {
$zhugou_value = $calBaseNum*((float)dataConf('helpSaleCouponsCalBase')/100);
$jiri_get_percent = floatval((new SCM())->getSysConfigs()['jiri_get_percent']);
$jiri_jiyan = (new SCM())->getSysConfigs()['jiri_jiyan'];
$vm->insertAlreadyVouchersNotice($userId, $orderId, 0, round($zhugou_value*$jiri_get_percent*100, 5), $jiri_jiyan);
}
}
// 10.15添加:助购户的 助购预获 减少的同时 代快付值等额减少
Db::name("orders")->where(compact('orderId'))->update([
"helpGetCount"=>$order['goodsMoney']*((int)$order["helpUserLevel"])*(float)dataConf("helpSaleCalBase"),