Explorar o código

change team bonus let to 2 z

kevin_zhangl hai 1 ano
pai
achega
e6269c36b1
Modificáronse 1 ficheiros con 13 adicións e 7 borrados
  1. 13 7
      frontendApi/modules/v1/controllers/BonusController.php

+ 13 - 7
frontendApi/modules/v1/controllers/BonusController.php

@@ -121,15 +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)) {
+//        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'=>[]]);
-        } else if ($preparePerfLimit !== true && (($w == '0' || $w == '1') || $isCalcMonth != 1)) {
-            if ($newMonth && $w != '1' && $w != '2'){
-                return static::notice(['user' => [],'team'=>[]]);
-            }
         }
+
         // 判断此业绩期是否已经完成生成了预计算业绩单,生成完毕才能看到
         $isPerfed = PeriodPrepare::isPerfed($periodNum);
         if (!$isPerfed) {