diff --git a/app/common/models/goods/Privilege.php b/app/common/models/goods/Privilege.php index c85c1441..ed6e16e1 100644 --- a/app/common/models/goods/Privilege.php +++ b/app/common/models/goods/Privilege.php @@ -590,7 +590,7 @@ class Privilege extends BaseModel } /** - * Common: 消费返利商品判断 - 是否允许购买 + * Common: 推广佣金商品判断 - 是否允许购买 * Author: wu-hui * Time: 2024/03/16 11:01 * @param $member @@ -599,7 +599,7 @@ class Privilege extends BaseModel * @throws AppException */ public function validateRebate($member,$num){ - // 判断:是否开启消费返利 + // 判断:是否开启推广佣金 $goodsRebate = GoodsRebate::where('goods_id',$this->goods_id)->first(); if($goodsRebate->is_open == 1){ // 判断:当前返利记录是否存在 diff --git a/app/common/modules/orderGoods/models/PreOrderGoods.php b/app/common/modules/orderGoods/models/PreOrderGoods.php index 64cddd70..b03bb9dd 100644 --- a/app/common/modules/orderGoods/models/PreOrderGoods.php +++ b/app/common/modules/orderGoods/models/PreOrderGoods.php @@ -176,7 +176,7 @@ class PreOrderGoods extends OrderGoods $this->legumes_exchange_price = $legumes_exchange_price; $this->use_legumes_exchange = (float)ceil(sprintf("%.2f",$legumes_exchange_price / $current_fee)); } - // 判断:是否开启消费返利 + // 判断:是否开启推广佣金 $this->is_rebate = 0; $goodsRebate = GoodsRebate::where('goods_id',$this->goods_id)->first(); if($goodsRebate->is_open == 1){ diff --git a/app/common/services/income/IncomeService.php b/app/common/services/income/IncomeService.php index 00a19abe..a7feda37 100644 --- a/app/common/services/income/IncomeService.php +++ b/app/common/services/income/IncomeService.php @@ -209,7 +209,7 @@ class IncomeService const STORE_MANAGER = 200;// 经销商店长-店补 const CULTURAL_SPACE_CONTRIBUTION_BONUS = 201;// 文创空间 - 贡献分享分红 const CULTURAL_SPACE_AREA_BONUS = 202;// 文创空间 - 市场津贴 - const REBATE_MONEY = 203;// 消费返利 + const REBATE_MONEY = 203;// 推广佣金 /** @@ -683,7 +683,7 @@ class IncomeService self::STORE_MANAGER => '店补', self::CULTURAL_SPACE_CONTRIBUTION_BONUS => '贡献分享分红', self::CULTURAL_SPACE_AREA_BONUS => '市场津贴', - self::REBATE_MONEY => '消费返利' + self::REBATE_MONEY => '推广佣金' ]; if (empty($income_config_desc[$code])) { if ($func = app('ShopAsset')->getData('income')[$code]) { diff --git a/app/frontend/modules/orderGoods/price/option/BaseOrderGoodsPrice.php b/app/frontend/modules/orderGoods/price/option/BaseOrderGoodsPrice.php index 718af744..8f40cbe5 100644 --- a/app/frontend/modules/orderGoods/price/option/BaseOrderGoodsPrice.php +++ b/app/frontend/modules/orderGoods/price/option/BaseOrderGoodsPrice.php @@ -106,7 +106,7 @@ abstract class BaseOrderGoodsPrice extends OrderGoodsPrice // 商品销售价 - 等级优惠金额 $this->price = $this->getGoodsPrice(); $this->price = max($this->price, 0); - // 判断:是否开启消费返利 + // 判断:是否开启推广佣金 $goodsRebate = GoodsRebate::uniacid()->where('goods_id',$this->orderGoods->goods_id)->first(); if($goodsRebate->is_open == 1){ // 判断:当前返利记录是否存在 diff --git a/plugins/rebate/README.md b/plugins/rebate/README.md index 27a7e8ed..c6b189fc 100644 --- a/plugins/rebate/README.md +++ b/plugins/rebate/README.md @@ -1 +1 @@ -## 消费返利 +## 推广佣金 diff --git a/plugins/rebate/package.json b/plugins/rebate/package.json index 4d4d4f58..e841afa4 100644 --- a/plugins/rebate/package.json +++ b/plugins/rebate/package.json @@ -2,8 +2,8 @@ "name": "rebate", "terminal": "wechat|min|wap", "version": "1.0.1", - "title": "消费返利", - "description": "消费返利", + "title": "推广佣金", + "description": "推广佣金", "author": "wuhui", "url": "", "namespace": "Yunshop\\Rebate", diff --git a/plugins/rebate/src/PluginApplication.php b/plugins/rebate/src/PluginApplication.php index ac31d414..ef5dc1f3 100644 --- a/plugins/rebate/src/PluginApplication.php +++ b/plugins/rebate/src/PluginApplication.php @@ -9,7 +9,7 @@ class PluginApplication extends \app\common\services\PluginApplication{ protected function setMenuConfig(){ \app\backend\modules\menu\Menu::current()->setPluginMenu('rebate', [ - 'name' => '消费返利', + 'name' => '推广佣金', 'type' => 'marketing', 'url' => 'plugin.rebate.admin.index.index',// url 可以填写http 也可以直接写路由 'url_params' => '',//如果是url填写的是路由则启用参数否则不启用 @@ -75,11 +75,11 @@ class PluginApplication extends \app\common\services\PluginApplication{ { return [ 'withdraw.rebate_commission' => [ - 'title' => '消费返利提现', + 'title' => '推广佣金提现', 'class' => 'Yunshop\Rebate\admin\widget\RebateWithdrawWidget' ], 'vue-goods.rebate' => [ - 'title' => '消费返利', + 'title' => '推广佣金', 'class' => \Yunshop\Rebate\admin\widget\RebateWidget::class, ], ]; @@ -115,12 +115,12 @@ class PluginApplication extends \app\common\services\PluginApplication{ public function cronConfig(){ \Event::listen('cron.collectJobs', function () { - // 每5分钟 执行一次消费返利解冻判断 + // 每5分钟 执行一次推广佣金解冻判断 \Cron::add('rebate-settlement', '*/5 * * * *', function () { Rebate::rebateThaw(); return; }); - // 每5分钟 执行一次消费返利失效判断 + // 每5分钟 执行一次推广佣金失效判断 \Cron::add('rebate-lose-efficacy', '*/1 * * * *', function () { Rebate::loseEfficacy(); return; diff --git a/plugins/rebate/src/api/IndexController.php b/plugins/rebate/src/api/IndexController.php index 3ca5d23a..3a02296a 100644 --- a/plugins/rebate/src/api/IndexController.php +++ b/plugins/rebate/src/api/IndexController.php @@ -57,7 +57,7 @@ class IndexController extends ApiController{ $levelGive = TeamDividendModel::uniacid()->where('member_id',$uid)->where('type',1)->sum('dividend_amount'); // 下级总数 $subCount = TeamDividendAgencyModel::where('parent_id', $uid)->count(); - // 复购商品 是否存在消费返利信息 存在继续下一个步骤 + // 复购商品 是否存在推广佣金信息 存在继续下一个步骤 $goods = []; $rebateGroupMax = Rebate::selectRaw('max(id) as max_id,max(reality_thaw_time) as max_reality_thaw_time,order_id,goods_id,max(status) as status') ->where('uid',$uid) diff --git a/plugins/rebate/src/listener/OrderPaidListener.php b/plugins/rebate/src/listener/OrderPaidListener.php index d02e9080..b9ea72cf 100644 --- a/plugins/rebate/src/listener/OrderPaidListener.php +++ b/plugins/rebate/src/listener/OrderPaidListener.php @@ -22,7 +22,7 @@ class OrderPaidListener{ $orderId = $model->id ?? 0; if($orderId > 0) Rebate::createRebateInit((int)$orderId,(int)$model->uid); }catch (\Exception $e){ - \Log::debug('--- 消费返利 - 支付成功事件处理 - 失败 ---'.$e->getMessage()); + \Log::debug('--- 推广佣金 - 支付成功事件处理 - 失败 ---'.$e->getMessage()); } } } diff --git a/plugins/rebate/src/models/GoodsRebate.php b/plugins/rebate/src/models/GoodsRebate.php index 825b235f..dd63eae5 100644 --- a/plugins/rebate/src/models/GoodsRebate.php +++ b/plugins/rebate/src/models/GoodsRebate.php @@ -25,7 +25,7 @@ class GoodsRebate extends BaseModel{ // 公共 $info->uniacid = \YunShop::app()->uniacid; $info->goods_id = $goodsId;// 商品ID - $info->is_open = $data['is_open'] ?? 0;// 当前商品是否参与消费返利:0=未开启,1=开启 + $info->is_open = $data['is_open'] ?? 0;// 当前商品是否参与推广佣金:0=未开启,1=开启 $info->is_alone = $data['is_alone'] ?? 0;// 是否独立设置:0=不是,1=是 $info->total_quarter = $data['total_quarter'] ?? 0;// 总多少季度 $info->quarter_list = json_encode($data['quarter_list'] ?? []);// 每季度配置信息 diff --git a/plugins/rebate/src/models/Rebate.php b/plugins/rebate/src/models/Rebate.php index b1c0dcb7..21d8e378 100644 --- a/plugins/rebate/src/models/Rebate.php +++ b/plugins/rebate/src/models/Rebate.php @@ -215,7 +215,7 @@ class Rebate extends BaseModel{ * Time: 2024/03/15 9:50 */ public static function rebateSettlement(){ - \Log::debug('--- 消费返利 - 结算到佣金 - 开始 ----'); + \Log::debug('--- 推广佣金 - 结算到佣金 - 开始 ----'); // 获取可以结算但是未结算的数据 $list = self::select(['id','uid','money','uniacid']) ->where('status', 1) @@ -304,7 +304,7 @@ class Rebate extends BaseModel{ DB::commit(); }catch(\Exception $e){ - \Log::debug('--- 消费返利 - 失效判断 - 错误:'.$e->getMessage()); + \Log::debug('--- 推广佣金 - 失效判断 - 错误:'.$e->getMessage()); DB::rollBack(); } } diff --git a/plugins/rebate/views/index/set.blade.php b/plugins/rebate/views/index/set.blade.php index 875cf218..ec6b3fd2 100644 --- a/plugins/rebate/views/index/set.blade.php +++ b/plugins/rebate/views/index/set.blade.php @@ -66,7 +66,7 @@
返利设置
- +
不开启 开启 diff --git a/plugins/rebate/views/widget/profit/rebate.js b/plugins/rebate/views/widget/profit/rebate.js index df1ee49e..161788f7 100644 --- a/plugins/rebate/views/widget/profit/rebate.js +++ b/plugins/rebate/views/widget/profit/rebate.js @@ -4,7 +4,7 @@ define({
- + 关闭 开启