Browse Source

feat: NG-27: Qualified bonus regulations 奖金合格制度:活动期间购买指定商品,BV≥27即可维持活跃度.

kevin 1 year ago
parent
commit
79b8c9bf08
1 changed files with 10 additions and 0 deletions
  1. 10 0
      common/models/Period.php

+ 10 - 0
common/models/Period.php

@@ -322,6 +322,16 @@ class Period extends \common\components\ActiveRecord
         return Period::find()->where('CALC_YEAR=:CALC_YEAR AND CALC_MONTH=:CALC_MONTH', [':CALC_YEAR'=>$year, ':CALC_MONTH'=>$month])->count(1);
     }
 
+    /**
+     * 所传年、月所有期数
+     * @param $year
+     * @param $month
+     * @return array
+     */
+    public function getYearMonthAllPeriod($year, $month){
+        return Period::find()->select('PERIOD_NUM')->where('CALC_YEAR=:CALC_YEAR AND CALC_MONTH=:CALC_MONTH', [':CALC_YEAR'=>$year, ':CALC_MONTH'=>$month])->column();
+    }
+
     /**
      * 是否是结算月节点
      * @param $periodNum