文字修改:平级奖修改为示范点奖励

消费返利的奖励叫合作养殖补助
     月月返的经销商奖励叫推广佣金
This commit is contained in:
wuhui_zzw 2024-05-30 17:35:03 +08:00
parent 4bcab7af16
commit 0918ba16fb
10 changed files with 19 additions and 19 deletions

View File

@ -1 +1 @@
## 推广佣金
## 合作养殖补助

View File

@ -2,8 +2,8 @@
"name": "rebate",
"terminal": "wechat|min|wap",
"version": "1.0.1",
"title": "推广佣金",
"description": "推广佣金",
"title": "合作养殖补助",
"description": "合作养殖补助",
"author": "wuhui",
"url": "",
"namespace": "Yunshop\\Rebate",

View File

@ -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;

View File

@ -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)
@ -301,7 +301,7 @@ class IndexController extends ApiController{
$item['type_name'] = '分红佣金';
break;
case 1:
$item['type_name'] = '区县奖励';
$item['type_name'] = '示范点奖励';
break;
case 2:
$item['type_name'] = '感恩奖励';
@ -310,7 +310,7 @@ class IndexController extends ApiController{
$item['type_name'] = '额外分红';
break;
case 7:
$item['type_name'] = '合作养殖补助';// 月月返
$item['type_name'] = '推广佣金';// 月月返
break;
case 8:
$item['type_name'] = '拓新奖';// 分红奖

View File

@ -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());
}
}
}

View File

@ -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'] ?? []);// 每季度配置信息

View File

@ -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();
}
}

View File

@ -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>

View File

@ -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>

View File

@ -192,7 +192,7 @@ class TeamDividendModel extends BaseModel
$this->TypeService = '分红佣金';
break;
case 1:
$this->TypeService = '区县奖励';//平级奖励
$this->TypeService = '示范点奖励';//平级奖励
break;
case 2:
$this->TypeService = '感恩奖励';
@ -201,7 +201,7 @@ class TeamDividendModel extends BaseModel
$this->TypeService = '额外分红';
break;
case 7:
$this->TypeService = '合作养殖补助';// 月月返
$this->TypeService = '推广佣金';// 月月返
break;
case 8:
$this->TypeService = '拓新奖';// 分红奖