kevin_zhangl 2 лет назад
Родитель
Сommit
6c633883ef
1 измененных файлов с 12 добавлено и 12 удалено
  1. 12 12
      frontendApi/modules/v1/controllers/BonusController.php

+ 12 - 12
frontendApi/modules/v1/controllers/BonusController.php

@@ -121,21 +121,21 @@ class BonusController extends BaseController {
         $isCalcMonth = $period->isCalcMonth($periodNum);
         $w = date('w', time());
         //特殊要求,测试环境要去掉是否是周日的判断,周一至周日都能看
-//        if($preparePerfLimit === true && $isCalcMonth != 1) {
-//            return static::notice(['user' => [],'team'=>[]]);
-//        } else if ($preparePerfLimit !== true && (($w != '0' && $w != '1') || $isCalcMonth != 1)) {
-//            return static::notice(['user' => [],'team'=>[]]);
-//        } else if ($preparePerfLimit !== true && (($w == '0' || $w == '1') || $isCalcMonth != 1)) {
-//            if ($newMonth && $w != '1'){
-//                return static::notice(['user' => [],'team'=>[]]);
-//            }
-//        }
-
-        $endTime = mktime(0,0,0, date('m'),date('d') + 1, date('Y')) - 1;
-        if ((($w != '1') && ($w != '2')) || time() > $endTime) {
+        if($preparePerfLimit === true && $isCalcMonth != 1) {
             return static::notice(['user' => [],'team'=>[]]);
+        } else if ($preparePerfLimit !== true && (($w != '0' && $w != '1') || $isCalcMonth != 1)) {
+            return static::notice(['user' => [],'team'=>[]]);
+        } else if ($preparePerfLimit !== true && (($w == '0' || $w == '1') || $isCalcMonth != 1)) {
+            if ($newMonth && $w != '1'){
+                return static::notice(['user' => [],'team'=>[]]);
+            }
         }
 
+//        $endTime = mktime(0,0,0, date('m'),date('d') + 1, date('Y')) - 1;
+//        if ((($w != '1') && ($w != '2')) || time() > $endTime) {
+//            return static::notice(['user' => [],'team'=>[]]);
+//        }
+
         // 判断此业绩期是否已经完成生成了预计算业绩单,生成完毕才能看到
         $isPerfed = PeriodPrepare::isPerfed($periodNum);
         if (!$isPerfed) {