文字修改:消费返利 修改为 推广佣金
This commit is contained in:
parent
d8b7d0604e
commit
f01a4298b2
|
|
@ -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){
|
||||
// 判断:当前返利记录是否存在
|
||||
|
|
|
|||
|
|
@ -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){
|
||||
|
|
|
|||
|
|
@ -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]) {
|
||||
|
|
|
|||
|
|
@ -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){
|
||||
// 判断:当前返利记录是否存在
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
## 消费返利
|
||||
## 推广佣金
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
"name": "rebate",
|
||||
"terminal": "wechat|min|wap",
|
||||
"version": "1.0.1",
|
||||
"title": "消费返利",
|
||||
"description": "消费返利",
|
||||
"title": "推广佣金",
|
||||
"description": "推广佣金",
|
||||
"author": "wuhui",
|
||||
"url": "",
|
||||
"namespace": "Yunshop\\Rebate",
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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'] ?? []);// 每季度配置信息
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
<div class="vue-main-title-content">返利设置</div>
|
||||
</div>
|
||||
<div class="vue-main-form">
|
||||
<el-form-item label="是否开启消费返利" prop="is_switch">
|
||||
<el-form-item label="是否开启推广佣金" prop="is_switch">
|
||||
<div style="line-height:40px">
|
||||
<el-radio v-model.number="set.is_switch" :label="0">不开启</el-radio>
|
||||
<el-radio v-model.number="set.is_switch" :label="1">开启</el-radio>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ define({
|
|||
<div class="rebate">
|
||||
<el-form>
|
||||
<div style="margin:0 auto;width:80%;">
|
||||
<el-form-item label="是否参与消费返利" label-width="155px">
|
||||
<el-form-item label="是否参与推广佣金" label-width="155px">
|
||||
<el-radio v-model="json.is_open" :label="0">关闭</el-radio>
|
||||
<el-radio v-model="json.is_open" :label="1">开启</el-radio>
|
||||
</el-form-item>
|
||||
|
|
|
|||
Loading…
Reference in New Issue