|
|
@@ -0,0 +1,37 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace saas\controllers;
|
|
|
+
|
|
|
+use biz\saas\services\SetAuthService;
|
|
|
+use Yii;
|
|
|
+use common\components\util;
|
|
|
+
|
|
|
+
|
|
|
+class SetAuthController extends BaseController
|
|
|
+{
|
|
|
+
|
|
|
+ //套餐列表 shish 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::ok('修改成功');
|
|
|
+ }
|
|
|
+
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|