CompanyDictController.java
3.6 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.dto.company.AddCompanyDTO;
import com.subsidy.dto.company.GetCompanyMembersDTO;
import com.subsidy.dto.company.OperatorsDTO;
import com.subsidy.model.CompanyDictDO;
import com.subsidy.service.CompanyDictService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
/**
* <p>
* 企业字典表 前端控制器
* </p>
*
* @author Tuyp
* @since 2024-01-11
*/
@RestController
@Api(tags = "企业字典表")
@RequestMapping("/companyDict")
public class CompanyDictController {
@Autowired
private CompanyDictService companyDictService;
@PostMapping("/administers")
@ApiOperation("查询所有企业 {id companyName fieldId 行业id superviseName 监管第三方名称 pageNum pageSize }")
@LoginRequired
public ResponseVO operators(@RequestBody OperatorsDTO operatorsDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.operators(operatorsDTO));
}
@PostMapping("updateCompany")
@ApiOperation("修改企业 id superviseName 第三方监管名称 accountName:账号 logo companyName:企业名称 address 企业所在地 shortName 简称 " +
"banner:标语 field[]:领域 role 3 ")
@LoginRequired
public ResponseVO updateAdminister(@RequestBody AddCompanyDTO addCompanyDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.updateAdminister(addCompanyDTO));
}
@PostMapping("deleteCompany")
@ApiOperation("删除企业 id")
@LoginRequired
public ResponseVO deleteAdminister(@RequestBody CompanyDictDO companyDictDO){
return ResponseData.generateCreatedResponse(0,companyDictService.deleteAdminister(companyDictDO));
}
@PostMapping("addCompany")
@ApiOperation("添加企业 {accountName:账号 superviseName 第三方监管名称 companyName:企业名称 address 企业所在地 shortName " +
"简称 banner:标语 field[]:领域 role }")
@LoginRequired
public ResponseVO addOperator(@RequestBody AddCompanyDTO addCompanyDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.addOperator(addCompanyDTO));
}
@PostMapping("getCompanyMembers")
@ApiOperation("获取公司里的成员 pageNum pageSize companyId 公司id userName 成员名称 memberStatus")
// @LoginRequired
public ResponseVO getCompanyMembers(@RequestBody GetCompanyMembersDTO getCompanyMembersDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.getCompanyMembers(getCompanyMembersDTO));
}
@PostMapping("exportCompanyMembers")
@ApiOperation("获取公司里的成员 companyId 公司id userName 成员名称")
@LoginRequired
public void exportCompanyMembers(@RequestBody GetCompanyMembersDTO getCompanyMembersDTO){
companyDictService.exportCompanyMembers(getCompanyMembersDTO);
}
@PostMapping("memberSummary")
@ApiOperation("学员认证详情 companyId")
@LoginRequired
public ResponseVO memberSummary(@RequestBody GetCompanyMembersDTO getCompanyMembersDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.memberSummary(getCompanyMembersDTO));
}
}