project.js
705 Bytes
/*
* @Author: huyue
* @Date: 2021-09-02 17:57:28
* @Last Modified by: huyue
* @Last Modified time: 2021-09-10 15:20:28
*/
// app/controller/project.js
const Controller = require('egg').Controller;
class ProjectController extends Controller {
constructor(ctx) {
super(ctx);
this.request = ctx.request;
this.projectService = ctx.service.project;
this.ServerResponseCode = ctx.response.ServerResponseCode;
this.ServerResponse = ctx.response.ServerResponse;
}
async getList() {
const query = this.ctx.query
const result = await this.projectService.findAll(query);
this.ctx.body = this.ServerResponse.Success(result);
}
}
module.exports = ProjectController;