|
|
|
@ -13,6 +13,7 @@ |
|
|
|
|
|
|
|
|
|
namespace crmeb\jobs; |
|
|
|
|
|
|
|
|
|
use app\common\model\system\config\SystemConfig; |
|
|
|
|
use crmeb\interfaces\JobInterface; |
|
|
|
|
use think\Exception; |
|
|
|
|
use think\facade\Log; |
|
|
|
@ -99,6 +100,12 @@ class OrderPartnerJob implements JobInterface |
|
|
|
|
throw new Exception('订单没有指定三种类型商品,不计入贡献值统计'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//将总毛利的70% 计入总奖池 |
|
|
|
|
$all_value = bcmul($total_price, '0.7', 2); |
|
|
|
|
$system = SystemConfig::getDB()->where('config_key', 'all_award')->find(); |
|
|
|
|
$system->value = $system->value + $all_value; |
|
|
|
|
$system->save(); |
|
|
|
|
|
|
|
|
|
//读取品牌所属分类 |
|
|
|
|
if (!empty($brand_ids)) { |
|
|
|
|
$brand_ids = array_unique($brand_ids); |
|
|
|
|