import { default as BaseController } from "../../baseController";
|
import { Post } from "egg-shell-decorators";
|
import { BaseBrand } from "../../../entity/basicInfo/base/baseBrand";
|
|
export default class brandNameController extends BaseController {
|
//#region 获得所有品牌
|
/**
|
* 获得所有品牌
|
*/
|
@Post()
|
public async getList() {
|
let { ctx } = this;
|
|
try {
|
let dataList = await this.dbRead.find(BaseBrand, {
|
select: ["brand_Id", "brandName"]
|
});
|
|
this.info.result = true;
|
this.info.data = dataList;
|
} catch (error) {
|
this.info.result = false;
|
this.info.data = error.message;
|
}
|
ctx.body = this.info;
|
}
|
//#endregion
|
}
|