diff --git a/app/common/model/user/ExchangeQuota.php b/app/common/model/user/ExchangeQuota.php index c1d2683..1d489d8 100644 --- a/app/common/model/user/ExchangeQuota.php +++ b/app/common/model/user/ExchangeQuota.php @@ -9,7 +9,7 @@ namespace app\common\model\user; use app\common\model\BaseModel; /** - * Common: 兑换额度总数 + * Common: 酒卡额度总数 * Author: wu-hui * Time: 2024/01/10 16:45 * Class ExchangeQuota diff --git a/app/common/model/user/ExchangeQuotaRecord.php b/app/common/model/user/ExchangeQuotaRecord.php index 91f6aeb..0185681 100644 --- a/app/common/model/user/ExchangeQuotaRecord.php +++ b/app/common/model/user/ExchangeQuotaRecord.php @@ -9,7 +9,7 @@ namespace app\common\model\user; use app\common\model\BaseModel; /** - * Common: 兑换额度变更记录 + * Common: 酒卡额度变更记录 * Author: wu-hui * Time: 2024/01/10 16:45 * Class ExchangeQuotaRecord diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index 85e9474..8db0e14 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -75,7 +75,7 @@ class ProductRepository extends BaseRepository // 积分抵扣 ['integral_deduction_type',0], ['integral_deduction_money',0], - // 是否赠送兑换额度 + // 是否赠送酒卡额度 ['is_give_quota',0], ]; protected $admin_filed = 'Product.product_id,Product.mer_id,brand_id,spec_type,unit_name,mer_status,rate,reply_count,store_info,cate_id,Product.image,slider_image,Product.store_name,Product.keyword,Product.sort,U.rank,Product.is_show,Product.sales,Product.price,extension_type,refusal,cost,Product.ot_price,stock,is_gift_bag,Product.care_count,Product.status,is_used,Product.create_time,Product.product_type,old_product_id,star,ficti,integral_total,integral_price_total,sys_labels,param_temp_id,mer_svip_status,svip_price,svip_price_type'; @@ -488,7 +488,7 @@ class ProductRepository extends BaseRepository // 积分抵扣 'integral_deduction_type' => $data['integral_deduction_type'] ?? 0, 'integral_deduction_money' => $data['integral_deduction_money'] ?? 0, - // 赠送兑换额度 + // 赠送酒卡额度 'is_give_quota' => $data['is_give_quota'] ?? 0, ]; if (isset($data['extend'])) diff --git a/app/listener/exchangeQuota/OrderAgreeRefundEvent.php b/app/listener/exchangeQuota/OrderAgreeRefundEvent.php index a5d1205..f5b78f3 100644 --- a/app/listener/exchangeQuota/OrderAgreeRefundEvent.php +++ b/app/listener/exchangeQuota/OrderAgreeRefundEvent.php @@ -15,7 +15,7 @@ class OrderAgreeRefundEvent{ public function handle($data){ try{ $refund = $data['refund']; - // Log::info('订单进入退款成功 - 兑换额度相关处理 - 开始:'.var_export(['id' => $data['id'],'uid' => $refund['uid']],1)); + // Log::info('订单进入退款成功 - 酒卡额度相关处理 - 开始:'.var_export(['id' => $data['id'],'uid' => $refund['uid']],1)); $refundProductList = app()->make(StoreRefundProductRepository::class) ->getSearch([]) ->field('order_product_id,refund_price,refund_num') @@ -65,7 +65,7 @@ class OrderAgreeRefundEvent{ 'msg' => $e->getMessage() ]; - Log::info('订单进入退款成功 - 兑换额度相关处理 - 错误:'.var_export($error,1)); + Log::info('订单进入退款成功 - 酒卡额度相关处理 - 错误:'.var_export($error,1)); } } } \ No newline at end of file diff --git a/app/listener/exchangeQuota/OrderPaySuccessEvent.php b/app/listener/exchangeQuota/OrderPaySuccessEvent.php index e861e5a..bcc3713 100644 --- a/app/listener/exchangeQuota/OrderPaySuccessEvent.php +++ b/app/listener/exchangeQuota/OrderPaySuccessEvent.php @@ -15,7 +15,7 @@ class OrderPaySuccessEvent{ public function handle($groupOrder){ $groupOrder = $groupOrder['groupOrder']; try{ - // Log::info('支付成功 - 赠送兑换额度 - 开始: '.var_export(['uid'=>$groupOrder->uid,'group_order_id'=>$groupOrder->group_order_id],1)); + // Log::info('支付成功 - 赠送酒卡额度 - 开始: '.var_export(['uid'=>$groupOrder->uid,'group_order_id'=>$groupOrder->group_order_id],1)); if($groupOrder->activity_type == 30){ // 在线支付订单 $this->giveExchangeIntegral($groupOrder); @@ -30,10 +30,10 @@ class OrderPaySuccessEvent{ 'group_order_id' => $groupOrder->group_order_id, 'msg' => $e->getMessage() ]; - Log::info('支付成功 - 赠送兑换额度 - 错误: '.var_export($data,1)); + Log::info('支付成功 - 赠送酒卡额度 - 错误: '.var_export($data,1)); } } - // 支付成功 - 赠送兑换额度 + // 支付成功 - 赠送酒卡额度 public function orderPaySuccessHandle($groupOrder):bool{ // 获取用户当前持有 $userHoldInfo = ExchangeQuota::where('uid',$groupOrder->uid)->findOrEmpty(); @@ -43,7 +43,7 @@ class OrderPaySuccessEvent{ $insertData = []; foreach($groupOrder->orderList as $orderInfo){ foreach($orderInfo->orderProduct as $orderProductInfo){ - // 判断:商品是否开启赠送兑换额度 赠送的兑换额度 = 当前商品实际支付的金额 * 倍数 + // 判断:商品是否开启赠送酒卡额度 赠送的酒卡额度 = 当前商品实际支付的金额 * 倍数 if($orderProductInfo->product->is_give_quota == 1 && $orderProductInfo->product_price > 0){ // 赠送数量计算 $giveNum = (float)$orderProductInfo->product_price; @@ -77,7 +77,7 @@ class OrderPaySuccessEvent{ } // 修改用户持有 $userHoldInfo->save(); - // 记录兑换额度信息 + // 记录酒卡额度信息 if(count($insertData) > 0) ExchangeQuotaRecord::insertAll($insertData); return true; @@ -107,7 +107,7 @@ class OrderPaySuccessEvent{ } // 修改用户持有 $userHoldInfo->save(); - // 记录兑换额度信息 + // 记录酒卡额度信息 if(count($insertData) > 0) ExchangeIntegralRecord::insertAll($insertData); return true; diff --git a/app/listener/exchangeQuota/OrderTakeEvent.php b/app/listener/exchangeQuota/OrderTakeEvent.php index 3fecbfb..ee4c64b 100644 --- a/app/listener/exchangeQuota/OrderTakeEvent.php +++ b/app/listener/exchangeQuota/OrderTakeEvent.php @@ -14,7 +14,7 @@ class OrderTakeEvent{ public function handle($data){ try{ $order = $data['order']; - // Log::info('订单进入待评价 - 兑换额度相关处理 - 开始: '.var_export(['order_id' => $order->order_id,'uid' => $order->uid],1)); + // Log::info('订单进入待评价 - 酒卡额度相关处理 - 开始: '.var_export(['order_id' => $order->order_id,'uid' => $order->uid],1)); # 获取变更记录 条件:order_id=当前订单id、变更类型=增加 $sum = (float)ExchangeQuotaRecord::where('order_id',$order->order_id) ->where('change_type',1) @@ -33,7 +33,7 @@ class OrderTakeEvent{ $hold->save(); } }catch(\Exception $e){ - Log::info('订单进入待评价 - 兑换额度相关处理 - 错误: '.$e->getMessage()); + Log::info('订单进入待评价 - 酒卡额度相关处理 - 错误: '.$e->getMessage()); } } diff --git a/route/admin/marketing.php b/route/admin/marketing.php index 0d348bd..ca490d6 100644 --- a/route/admin/marketing.php +++ b/route/admin/marketing.php @@ -425,9 +425,9 @@ Route::group(function () { ], ] ]); - // 兑换额度 + // 酒卡额度 Route::group('user/exchange_quota', function () { - // 兑换额度相关 + // 酒卡额度相关 Route::get('quota_title','.ExchangeQuota/quotaTitle')->name('systemUserExchangeQuotaTitle')->option([ '_alias' => '额度统计', ]);