后台:大区列表
This commit is contained in:
@@ -80,7 +80,7 @@ export class GmHandler {
|
||||
sendTime = (circleDay == 0?'每天': '每周'+circleDay) + ' ' + circleHour;
|
||||
}
|
||||
}
|
||||
await GMMailModel.updateMailById(id, { status: isPass?GM_MAIL_STATUS.PASS: GM_MAIL_STATUS.NOT_PASS, viewAt: new Date(), viewBy: uid, sendTime }, uid);
|
||||
await GMMailModel.updateMailById(id, { status: isPass? GM_MAIL_STATUS.PASS: GM_MAIL_STATUS.NOT_PASS, viewAt: new Date(), viewBy: uid, sendTime }, uid);
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import { Application, BackendSession, pinus } from 'pinus';
|
||||
import { getRandSingleEelm, resResult } from '../../../pubUtils/util';
|
||||
import { STATUS } from '../../../consts/statusCode';
|
||||
import moment = require('moment');
|
||||
import { UpdateRegionParams } from '../../../domain/backEndField/params';
|
||||
import { RegionModel } from '../../../db/Region';
|
||||
let timer: NodeJS.Timer;
|
||||
export default function (app: Application) {
|
||||
return new GmHandler(app);
|
||||
}
|
||||
|
||||
export class GmHandler {
|
||||
constructor(private app: Application) {
|
||||
}
|
||||
|
||||
async saveRegionConf(msg: UpdateRegionParams, session: BackendSession) {
|
||||
let params = new UpdateRegionParams(msg);
|
||||
let uid = session.get('uid');
|
||||
if(!params.checkParams()) return resResult(STATUS.WRONG_PARMS);
|
||||
let update = params.getUpdateParam();
|
||||
if(params.id == 'new') {
|
||||
await RegionModel.createNewRegion(update, uid);
|
||||
} else {
|
||||
await RegionModel.updateRegion(params.id, update, uid);
|
||||
}
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user