CertDictController.java
2.96 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
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.dto.cert.AddCertDTO;
import com.subsidy.dto.cert.GetAllCertsDTO;
import com.subsidy.dto.cert.GetOneCertDTO;
import com.subsidy.model.CertDictDO;
import com.subsidy.service.CertDictService;
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 DengMin
* @since 2022-05-11
*/
@RestController
@Api(tags = "证书字典表")
@RequestMapping("/certDict")
public class CertDictController {
@Autowired
private CertDictService certDictService;
@PostMapping("addCert")
@ApiOperation("添加证书 certName price coverPage title副标题 scribePrice 划线价格 certDesc 证书简介 detail chargeAndSubsidy 学费和补贴 serviceProcess服务流程 refundGuarantee 退费流程 typeIds[] 类型id requirementDesc 条件说明 submitDesc 提交说明")
public ResponseVO addCert(@RequestBody AddCertDTO addCertDTO){
return ResponseData.generateCreatedResponse(0,certDictService.addCert(addCertDTO));
}
@PostMapping("deleteCert")
@ApiOperation("删除证书 id ")
public ResponseVO deleteCert(@RequestBody CertDictDO certDictDO){
return ResponseData.generateCreatedResponse(0,certDictService.deleteCert(certDictDO));
}
@PostMapping("updateCert")
@ApiOperation("编辑证书 id certName price coverPage title副标题 scribePrice 划线价格 划线价格 detail chargeAndSubsidy 学费和补贴 serviceProcess服务流程 refundGuarantee 退费流程 typeId 类型id requirementDesc 条件说明 submitDesc 提交说明")
public ResponseVO updateCert(@RequestBody AddCertDTO addCertDTO){
return ResponseData.generateCreatedResponse(0,certDictService.updateCert(addCertDTO));
}
@PostMapping("getOneCert")
@ApiOperation("获取一个证书 id userId")
public ResponseVO getOneCert(@RequestBody GetOneCertDTO getOneCertDTO){
return ResponseData.generateCreatedResponse(0,certDictService.getOneCert(getOneCertDTO));
}
@PostMapping("getAllCerts")
@ApiOperation("获取全部的证书(包含项目类型) typeId certName pageSize pageNum ")
public ResponseVO getAllCerts(@RequestBody GetAllCertsDTO getAllCertsDTO){
return ResponseData.generateCreatedResponse(0,certDictService.getAllCerts(getAllCertsDTO));
}
@PostMapping("getAllCertsWithoutType")
@ApiOperation("获取所有证书(下拉列表用)")
public ResponseVO getAllCertsWithoutType(){
return ResponseData.generateCreatedResponse(0,certDictService.getAllCertsWithoutType());
}
}