wangzhibo
6 天以前 7dcc2997614f849258091f5d66e648317a40d323
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { CoolController, BaseController } from '@cool-midway/core';
import { AppComplainEntity } from '../../entity/complain';
import { BaseSysUserEntity } from '../../../base/entity/sys/user';
import { AppComplainService } from '../../service/complain';
import { UserInfoEntity } from '../../../user/entity/info';
 
/**
 * 意见反馈
 */
@CoolController({
  api: ['add', 'delete', 'update', 'info', 'list', 'page'],
  entity: AppComplainEntity,
  service: AppComplainService,
  pageQueryOp: {
    keyWordLikeFields: ['a.contact', 'b.nickName', 'c.name'],
    select: ['a.*', 'b.nickName', 'b.avatarUrl', 'c.name as handlerName'],
    fieldEq: ['a.status', 'a.type'],
    join: [
      {
        entity: UserInfoEntity,
        alias: 'b',
        condition: 'a.userId = b.id',
      },
      {
        entity: BaseSysUserEntity,
        alias: 'c',
        condition: 'a.handlerId = c.id',
      },
    ],
  },
})
export class AdminAppComplainController extends BaseController {}