GITLAB

Aaron.Liu / sf-erp-server

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • sf-erp-server
  • app
  • controller
  • statistic.js
  • 55cbd78d   增加项目管理,修改list方法传值 Browse Code »
    Aaron.Liu
    2018-04-23 15:19:01 +0800  
statistic.js 438 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
'use strict';

const Controller = require('egg').Controller;

class StatisticController extends Controller {
  async count() {
    const ctx = this.ctx;
    try {
      const result = await ctx.service.statistic.count();
      this.ctx.body = {
        result,
        success: true,
      };
    } catch (error) {
      this.ctx.body = {
        success: false,
        error,
      };
    }
  }
}

module.exports = StatisticController;