Przeglądaj źródła

Merge branch 'feature/dd-1935-lastemlv' into new-version

theo 3 lat temu
rodzic
commit
d99c2d9aaa

+ 2 - 35
frontendApi/modules/v1/controllers/BonusController.php

@@ -330,47 +330,14 @@ class BonusController extends BaseController {
     private function _periodBonus($periodNum,$detailSwitch=1) {
         $period = Period::instance();
         $yearMonth = $period->getYearMonth($periodNum);
-        $sysConfig = Cache::getSystemConfig();
         if(!$calcBonus = CalcBonus::find()
         ->yearMonth($yearMonth)
         ->where('USER_ID=:USER_ID AND PERIOD_NUM=:PERIOD_NUM',[':USER_ID'=>\Yii::$app->user->id,':PERIOD_NUM'=>$periodNum])
         ->asArray()
         ->one()){
-            if($detailSwitch) {
-                $userInfo = User::getEnCodeInfo(\Yii::$app->user->id);
-                $data[] = ['name' => '期数', 'value' => $periodNum];
-                $data[] = ['name' => '级别', 'value' => Cache::getDecLevelConfig()[$userInfo['DEC_LV']]['LEVEL_NAME']];
-                $data[] = ['name' => '最新聘级', 'value' => Cache::getEmpLevelConfig()[EmployLevel::NO_LEVEL_ID]['LEVEL_NAME']];
-                if ($sysConfig['openTG']['VALUE']) {
-                    // 销售奖金 就是 原来的推广奖
-                    $data[] = ['name' => '销售奖金', 'value' => Tool::formatPrice(0)];
-                }
-                if ($sysConfig['openQY']['VALUE']) {
-                    $data[] = ['name' => '绩效奖金', 'value' => Tool::formatPrice(0)];
-                }
-                // 管理奖金 就是新的蓝星奖
-                $data[] = ['name' => '管理奖金', 'value' => Tool::formatPrice(0)];
-                if ($sysConfig['openGX']['VALUE']) {
-                    $data[] = ['name' => '周共享奖金', 'value' => Tool::formatPrice(0)];
-                    $data[] = ['name' => '月共享奖金', 'value' => Tool::formatPrice(0)];
-                }
-                if ($sysConfig['openStore']['VALUE']) {
-                    // 店服务奖
-                    $data[] = ['name' => '店服务奖金', 'value' => Tool::formatPrice(0)];
-                }
-                if ($sysConfig['openFW']['VALUE']) {
-                    $data[] = ['name' => '服务奖金', 'value' => Tool::formatPrice(0)];
-                }
-                $data[] = ['name' => '总奖金', 'value' => Tool::formatPrice(0)];
-                $data[] = ['name' => '管理费', 'value' => Tool::formatPrice(0)];
-                $data[] = ['name' => '实发奖金', 'value' => Tool::formatPrice(0)];
-                $data[] = ['name' => '复销点数', 'value' => Tool::formatPrice(0)];
-                $data[] = ['name' => '兑换点数', 'value' => Tool::formatPrice(0)];
-            } else {
-                $data[] = ['name' => '总奖金', 'value' => '0.00'];
-            }
-            return $data;
+            return [];
         }
+        $sysConfig = Cache::getSystemConfig();
         if($detailSwitch) {
             $data[] = ['name' => '期数', 'value' => $periodNum];
             $data[] = ['name' => '级别', 'value' => Cache::getDecLevelConfig()[$calcBonus['LAST_DEC_LV']]['LEVEL_NAME']];