| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace pt\controllers;
- use bizHd\saas\services\SetAuthService;
- use Yii;
- use common\components\util;
- class SetAuthController extends BaseController
- {
-
- //套餐列表 ssh 2019.12.8
- public function actionUpdate()
- {
- $post = Yii::$app->request->post();
- $setId = isset($post['setId']) ? $post['setId'] : 0;
- $endId = isset($post['endId']) ? $post['endId'] : 0;
- $auth = isset($post['auth']) ? $post['auth'] : '*';
- SetAuthService::updateByCondition(['setId' => $setId, 'endId' => $endId], ['auth' => $auth]);
- util::complete('修改成功');
- }
-
- public function actionDetail()
- {
- $get = Yii::$app->request->get();
- $setId = isset($get['setId']) ? $get['setId'] : 0;
- $endId = isset($get['endId']) ? $get['endId'] : 0;
- $return = SetAuthService::getByCondition(['setId' => $setId, 'endId' => $endId]);
- $authList = [];
- if (isset($return['auth']) && !empty($return['auth'])) {
- $authList = explode(',', $return['auth']);
- }
- util::success($authList);
- }
-
- }
|