project_stopmsg.js 670 B

1234567891011121314151617181920212223242526272829303132
  1. 'use strict';
  2. /**
  3. * 系统维护数据模型
  4. *
  5. * @author CaiAoLin
  6. * @date 2017/10/25
  7. * @version
  8. */
  9. module.exports = app => {
  10. class ProjectStopMsg extends app.BaseService {
  11. /**
  12. * 构造函数
  13. *
  14. * @param {Object} ctx - egg全局变量
  15. * @return {void}
  16. */
  17. constructor(ctx) {
  18. super(ctx);
  19. this.tableName = 'project_stopmsg';
  20. }
  21. async getMsg(pid) {
  22. const info = await this.getDataByCondition({ pid, is_checked: 1 });
  23. return info ? info.msg : '该账号已被停用,请联系销售人员';
  24. }
  25. }
  26. return ProjectStopMsg;
  27. };