ios:审核服判断逻辑

This commit is contained in:
luying
2022-06-23 09:39:46 +08:00
parent 5e5b052aa0
commit f105c79837
9 changed files with 77 additions and 6 deletions

View File

@@ -78,6 +78,14 @@ export default class GameController extends Controller {
return
}
public async switchServerReview() {
const { ctx } = this;
const { id, isReview } = ctx.request.body;
ctx.body = await ctx.service.game.switchServerReview(id, isReview);
return
}
public async getOrderlist() {
const { ctx } = this;
const { page, pageSize, sortField, sortOrder, form } = ctx.request.body;

View File

@@ -51,6 +51,7 @@ export default (app: Application) => {
router.post('/api/game/deletewhitelist', tokenParser, controller.game.deleteWhiteList);
router.post('/api/game/stopserverregister', tokenParser, controller.game.stopServerRegister);
router.post('/api/game/swicthserverstatus', tokenParser, controller.game.switchServerStatus);
router.post('/api/game/switchserverreview', controller.game.switchServerReview);
router.post('/api/game/getorderlist', tokenParser, controller.game.getOrderlist);
router.post('/api/game/getsurveylist', controller.game.getSurveylist);

View File

@@ -100,6 +100,13 @@ export default class Game extends Service {
return ctx.service.utils.resResult(STATUS.SUCCESS);
}
public async switchServerReview(id: number, isReview: boolean) {
const { ctx } = this;
const server = await ServerlistModel.updateByServerId(id, { isReview });
if(!server) return ctx.service.utils.resResult(STATUS.WRONG_PARMS);
return ctx.service.utils.resResult(STATUS.SUCCESS);
}
public async getRegionStategy(id: number) {
const { ctx } = this;
let region = await RegionModel.findRegionById(id);