| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace pt\controllers;
- use bizHd\saas\services\FestService;
- use Yii;
- use common\components\util;
- class FestController extends BaseController
- {
-
- //节日列表 ssh 2019.12.8
- public function actionList()
- {
- $fest = FestService::getAllByCondition([], null, '*');
- util::success($fest);
- }
-
- //添加节日 ssh 2019.12.21
- public function actionAdd()
- {
- $post = Yii::$app->request->post();
- $return = FestService::add($post);
- util::success($return);
- }
-
- //修改节日 ssh 2019.12.21
- public function actionUpdate()
- {
- $post = Yii::$app->request->post();
- $id = $post['id'];
- unset($post['id']);
- FestService::updateById($id, $post);
- util::complete();
- }
-
- //节日详情 ssh 2019.12.21
- public function actionDetail()
- {
- $id = Yii::$app->request->get('id');
- $fest = FestService::getById($id);
- util::success($fest);
- }
- }
|