优化:修改部分文字内容

优化:股东分红商城销售总额为0的问题
This commit is contained in:
wuhui_zzw 2023-12-08 17:56:23 +08:00
parent 62a164760b
commit 5f5ed953ce
6 changed files with 13 additions and 12 deletions

View File

@ -490,8 +490,8 @@ class IncomeService
private static function getDividendCodeName($code)
{
$income_config_desc = [
self::COMMISSION_ORDER => \Setting::get('shop.lang.zh_cn.commission.commission_amount') ? : '分销佣金',
self::TEAM_DIVIDEND => '经销商分红',
self::COMMISSION_ORDER => \Setting::get('shop.lang.zh_cn.commission.commission_amount') ? : '直推奖励',
self::TEAM_DIVIDEND => '团队收益',
self::AGENT_DIVIDEND => '代理商分红',
self::APPOINTMENT_ORDER => '门店预约',
self::AREA_DIVIDEND => '区域分红',

View File

@ -32,7 +32,7 @@ class PluginApplication extends \app\common\services\PluginApplication
public function getIncomeItems(){
return [
'commission' => [
'title' => \Setting::get('shop.lang.zh_cn.commission.commission_amount') ?: trans('Yunshop\Commission::index.commission'),
'title' => '直推奖励',//\Setting::get('shop.lang.zh_cn.commission.commission_amount') ?: trans('Yunshop\Commission::index.commission'),
'type' => 'commission',
'class' => 'Yunshop\Commission\models\CommissionOrder',
'name' => 'updatedWithdraw',

View File

@ -14,7 +14,7 @@ define({
<el-form-item label="开启分销">
<el-radio v-model="is_open_commission" :label="0">关闭</el-radio>
<el-radio v-model="is_open_commission" :label="1">开启</el-radio>
<div class="help-block">如果不开启分销则不产生分销佣金</div>
<div class="help-block">如果不开启分销则不产生直推奖励</div>
</el-form-item>
<el-form-item label="独立规则">
<el-switch v-model="has_rule_commission" :active-value="1" :inactive-value="0"></el-switch>

View File

@ -271,7 +271,7 @@ class CycleAmounyService
* @param $method
* @param $rate
* @param $levelId
* @return float|int
* @return array
*/
private static function computeLvCountOrderAmount($orderGoodsList, $method, $rate, $levelId){
$TotalMoney = 0;
@ -296,7 +296,7 @@ class CycleAmounyService
}
}
return $TotalMoney;
return [$TotalMoney,array_sum(array_column($orderGoodsList,'payment_amount'))];
}

View File

@ -62,7 +62,7 @@ class TimedTaskService
Setting::$uniqueAccountId = \YunShop::app()->uniacid = $u->uniacid;
$this->set = Setting::get('plugin.shareholder');
$this->setLog = Setting::get('plugin.shareholder_log');
$is_execute = true;//$this->isExecute();
$is_execute = $this->isExecute();
if ($is_execute) {
\Log::info('========股东分红UNIACID:' . $u->uniacid . '执行========');
$this->setLog['current_d'] = date('d');
@ -306,6 +306,8 @@ class TimedTaskService
break;
}
// [$this->startTime,$this->endTime] = getTimeStamp('today');
// $orderAmount = CycleAmounyService::getCycleAmount($this->set['culate_cycle'], $this->set['culate_method']); // 上一个周期金额
// if ($orderAmount <= 0) {
// \Log::info('========shareholderDividend():没有返现总金额');
@ -380,14 +382,13 @@ class TimedTaskService
$lvCountOrderAmount = 0;
if($settlementType == 'order'){
// 根据订单查询
$lvCountOrderAmount = (float)CycleAmounyService::getOrderAmountNew($orderId, $this->set['culate_method'],$rate,$teamLevel['id']);
[$lvCountOrderAmount,$orderAmount] = CycleAmounyService::getOrderAmountNew($orderId, $this->set['culate_method'],$rate,$teamLevel['id']);
}else{
// 根据周期查询
$lvCountOrderAmount = (float)CycleAmounyService::getCycleAmountNew($this->startTime,$this->endTime, $this->set['culate_method'],$rate,$teamLevel['id']);
[$lvCountOrderAmount,$orderAmount] = CycleAmounyService::getCycleAmountNew($this->startTime,$this->endTime, $this->set['culate_method'],$rate,$teamLevel['id']);
}
// 共分红金额 为0 跳出循环
if($lvCountOrderAmount <= 0) continue;
// $lvCountOrderAmount = sprintf("%.2f", $orderAmount / 100 * $rate);
// 获取当前等级的全部权重值
foreach ($teamAgentsList as $item) {

View File

@ -648,9 +648,9 @@ class PluginApplication extends \app\common\services\PluginApplication
// }
return [
'teamDividend' => [
'title' => $lang['title'] ?: trans('Yunshop\TeamDividend::index.title'),
'title' => '团队收益',//$lang['title'] ?: trans('Yunshop\TeamDividend::index.title'),
'type' => 'teamDividend',
'type_name' => $title.$dividend,
'type_name' => '团队收益',//$title.$dividend,
'class' => 'Yunshop\TeamDividend\models\TeamDividendModel',
],
// 'storeManager' => [