import { default as BaseController } from "../../baseController";
|
import { Post } from "egg-shell-decorators";
|
import { TMSPort } from "../../../entity/express/tms/tmsPort";
|
|
export default class PostController extends BaseController {
|
//#region 获取口岸列表
|
/**
|
* 获取口岸列表
|
*/
|
@Post()
|
public async getList() {
|
let { ctx } = this;
|
let userInfo = await ctx.helper.userInfo();
|
try {
|
var dataList = await this.dbRead.find(TMSPort, {
|
select: ["port_Id", "portName"],
|
where: { userProduct_Id: userInfo.userProduct_Id, enable: 1 }
|
});
|
this.info.result = true;
|
this.info.data = dataList;
|
} catch (e) {
|
this.info.result = false;
|
this.info.msg = e.message;
|
}
|
ctx.body = this.info;
|
}
|
//#endregion
|
}
|