Kirin il y a 5 jours
Parent
commit
59b6ad43bc

+ 1 - 1
app/jobs/integral/IntegralJob.php

@@ -51,7 +51,7 @@ class IntegralJob extends BaseJobs
                 if ($give_static_integral > 0) {
 //                $extract_sum = bcmul($total_price, $rate, 2);
                     $mark = '购买商品,获得参考分';
-                    $integral_info = $awardIntegralService->incIntegral($order['uid'], $give_static_integral, $total_price, $order['id'], $mark);
+                    $integral_info = $awardIntegralService->incIntegral($order['uid'], $give_static_integral, $total_price, $order['id'], $mark, 0, $order['pay_type']);
                 }
                 //添加奖池
 //                $lake_ratio = sys_config('lake_ratio', 0);

+ 5 - 2
app/services/user/AwardIntegralServices.php

@@ -98,7 +98,9 @@ class AwardIntegralServices extends BaseServices
     {
         $where = ['uid' => $uid, 'valid' => 1];
         return $this->dao->sum($where, 'order_price', true);
-    } /**
+    }
+
+    /**
      * 获取单条数据
      * @return float
      */
@@ -145,7 +147,7 @@ class AwardIntegralServices extends BaseServices
      * @param string $mark
      * @return \crmeb\basic\BaseModel|\think\Model
      */
-    public function incIntegral(int $uid, string $total, float $order_price, int $order_id = 0, string $mark = '', $add_time = 0)
+    public function incIntegral(int $uid, string $total, float $order_price, int $order_id = 0, string $mark = '', $add_time = 0, $pay_type = 'yue')
     {
 //        $inc_integral = bcdiv($total, $price, 5);
         //计算释放天数
@@ -179,6 +181,7 @@ class AwardIntegralServices extends BaseServices
             'sum_price' => $total,
             'order_id' => $order_id,
             'link_id' => $link_id,
+            'pay_type' => $pay_type,
             'reorder_count' => $reorder_count,
             'mark' => $mark,
             'order_price' => $order_price,