|
|
@@ -39,6 +39,7 @@ class IntegralJob extends BaseJobs
|
|
|
// $award_price = bcsub($total_price, $order['cost'], 2);
|
|
|
return $awardIntegralService->transaction(function () use ($levelServices, $awardIntegralService, $userService, $user, $total_price, $order) {
|
|
|
try {
|
|
|
+ $oldAwardIntegralService = app()->make(UserAwardIntegralServices::class);
|
|
|
// //添加静态积分
|
|
|
// $static_integral_ratio = sys_config('static_integral_ratio', 0);
|
|
|
$rate = sys_config('static_integral_rate', 3);
|
|
|
@@ -73,7 +74,7 @@ class IntegralJob extends BaseJobs
|
|
|
$extract_sum = bcmul($give_action_integral, $rate, 2);
|
|
|
$mark = '推荐用户' . $user['nickname'] . "({$user['uid']})" . '购买商品,获得推荐积分';
|
|
|
$this->sendAward($extract_sum, $spread['uid'], $mark, $order['id']);
|
|
|
-// $awardIntegralService->incIntegral($spread['uid'], $integral_price, $give_action_integral, $total_price, 1, $extract_sum, $order['id'], $mark);
|
|
|
+ $oldAwardIntegralService->incIntegral($spread['uid'], 0, $give_action_integral, $total_price, 1, $extract_sum, $order['id'], $mark);
|
|
|
}
|
|
|
}
|
|
|
if ($awardIntegralService->getPaySum($spread['uid']) >= $award_order_limit) {
|
|
|
@@ -102,6 +103,7 @@ class IntegralJob extends BaseJobs
|
|
|
$extract_sum = bcmul($real_send, $rate, 2);
|
|
|
$mark = '团队用户' . $user['nickname'] . "({$user['uid']})" . '购买商品,获得团队级差积分';
|
|
|
$this->sendAward($extract_sum, $spread['uid'], $mark, $order['id']);
|
|
|
+ $oldAwardIntegralService->incIntegral($spread['uid'], 0, $give_action_integral, $total_price, 1, $extract_sum, $order['id'], $mark);
|
|
|
}
|
|
|
$send = $give_action_integral;
|
|
|
}
|