Commit b61b876f authored by shajiaiming's avatar shajiaiming

fix

parent 2af9cb47
......@@ -49,7 +49,7 @@ class NoticeController extends BaseController
}
$status = Yii::$app->request->get('status', 0);
$type = Yii::$app->request->get('type', 0);
$query = Notice::find()->where(['platform_id' => $platform_id]);
$query = Notice::find()->where(['platform_id' => $platform_id])->orderBy('create_time desc');;
if (false != $status) {
$query->andWhere(['status' => (int)$status]);
......@@ -103,7 +103,7 @@ class NoticeController extends BaseController
$code = -1;
goto doEnd;
}
if (User::AUTH_SUPER != $group && $platform_id != $model->platform_id){
if (User::AUTH_SUPER != $group && $platform_id != $model->platform_id) {
$msg = '无权操作';
$code = -1;
goto doEnd;
......@@ -137,7 +137,7 @@ class NoticeController extends BaseController
}
if (Yii::$app->request->isDelete) {
$model = Notice::findOne($id);
if (User::AUTH_SUPER != $group && $platform_id != $model->platform_id){
if (User::AUTH_SUPER != $group && $platform_id != $model->platform_id) {
$msg = '无权删除';
$code = -1;
goto doEnd;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment