diff --git a/app/jobs/store/platformCommission/UseLegumesIntegralJob.php b/app/jobs/store/platformCommission/UseLegumesIntegralJob.php index 1206e9d..656440a 100644 --- a/app/jobs/store/platformCommission/UseLegumesIntegralJob.php +++ b/app/jobs/store/platformCommission/UseLegumesIntegralJob.php @@ -25,7 +25,7 @@ class UseLegumesIntegralJob implements JobInterface{ // 获取订单信息 $orderInfo = app()->make(StoreOrderRepository::class) ->getSearch([]) - ->field('order_id,uid,use_legumes_integral,use_legumes_integral_price') + ->field('order_id,uid,use_legumes_integral,use_legumes_integral_price,order_type') ->where('order_id',$data['order_id']) ->find(); if(!$orderInfo) throw new \Exception('信息不存在!'); @@ -52,6 +52,10 @@ class UseLegumesIntegralJob implements JobInterface{ $totalGetIntegral = $legumesModel->sum('get_integral');// 总获取积分 $totalUseIntegral = $legumesModel->sum('use_integral');// 总已使用积分 $hold_legumes_integral = (float)sprintf("%.2f",$totalGetIntegral - $totalUseIntegral);// 持有可使用积分 + if($orderInfo['order_type'] == 20) $mark = '兑换积分商品消耗'.$orderInfo['use_legumes_integral'].'积分'; + else $mark = '购买商品使用'.$orderInfo['use_legumes_integral'].'积分抵扣'.floatval($orderInfo['use_legumes_integral_price']).'元'; + + $bills[] = [ 'uid' => $orderInfo['uid'], 'link_id' => $orderInfo['order_id'], @@ -61,7 +65,7 @@ class UseLegumesIntegralJob implements JobInterface{ 'type' => 'deduction', 'number' => (float)$orderInfo['use_legumes_integral'], 'balance' => $hold_legumes_integral, - 'mark' => '购买商品使用'.$orderInfo['use_legumes_integral'].'积分抵扣'.floatval($orderInfo['use_legumes_integral_price']).'元', + 'mark' => $mark, 'mer_id' => 0, 'status' => 1 ];