params['merchantId']; $today = date("Ymd"); return self::getByCondition(['merchantId' => $merchantId, 'time' => $today]); } public static function checkUp($id) { $merchantId = Yii::$app->params['merchantId']; $stat = self::getById($id, true); if ($stat->merchantId != $merchantId) { util::fail('你没有权限'); } if ($stat->checkUp == 1) { util::fail('你已经对过帐了'); } $stat->checkUp = 1; $stat->save(); return true; } //获取最近的收入情况 shish 2019.9.21 public static function getLatestIncome($start, $end) { $merchantId = Yii::$app->params['merchantId']; $list = self::getAllList('*', ['merchantId' => $merchantId, 'time' => ['between', [$start, $end]]], 'time asc'); return $list; } }