88e030b7
王彪总
init project
|
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
|
package com.java110.fee.api;
import com.alibaba.fastjson.JSONObject;
import com.java110.dto.fee.FeePrintSpecDto;
import com.java110.fee.bmo.feePrintSpec.IDeleteFeePrintSpecBMO;
import com.java110.fee.bmo.feePrintSpec.IGetFeePrintSpecBMO;
import com.java110.fee.bmo.feePrintSpec.ISaveFeePrintSpecBMO;
import com.java110.fee.bmo.feePrintSpec.IUpdateFeePrintSpecBMO;
import com.java110.po.fee.feePrintSpec.FeePrintSpecPo;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "/feePrintSpec")
public class FeePrintSpecApi {
@Autowired
private ISaveFeePrintSpecBMO saveFeePrintSpecBMOImpl;
@Autowired
private IUpdateFeePrintSpecBMO updateFeePrintSpecBMOImpl;
@Autowired
private IDeleteFeePrintSpecBMO deleteFeePrintSpecBMOImpl;
@Autowired
private IGetFeePrintSpecBMO getFeePrintSpecBMOImpl;
/**
* 微信保存消息模板
*
* @param reqJson
* @return
* @serviceCode /feePrintSpec/saveFeePrintSpec
* @path /app/feePrintSpec/saveFeePrintSpec
*/
@RequestMapping(value = "/saveFeePrintSpec", method = RequestMethod.POST)
public ResponseEntity<String> saveFeePrintSpec(@RequestBody JSONObject reqJson) {
Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
Assert.hasKeyAndValue(reqJson, "specCd", "请求报文中未包含specCd");
FeePrintSpecPo feePrintSpecPo = BeanConvertUtil.covertBean(reqJson, FeePrintSpecPo.class);
return saveFeePrintSpecBMOImpl.save(feePrintSpecPo);
}
/**
* 微信修改消息模板
*
* @param reqJson
* @return
* @serviceCode /feePrintSpec/updateFeePrintSpec
* @path /app/feePrintSpec/updateFeePrintSpec
*/
@RequestMapping(value = "/updateFeePrintSpec", method = RequestMethod.POST)
public ResponseEntity<String> updateFeePrintSpec(@RequestBody JSONObject reqJson) {
Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
Assert.hasKeyAndValue(reqJson, "specCd", "请求报文中未包含specCd");
Assert.hasKeyAndValue(reqJson, "printId", "printId不能为空");
FeePrintSpecPo feePrintSpecPo = BeanConvertUtil.covertBean(reqJson, FeePrintSpecPo.class);
return updateFeePrintSpecBMOImpl.update(feePrintSpecPo);
}
/**
* 微信删除消息模板
*
* @param reqJson
* @return
* @serviceCode /feePrintSpec/deleteFeePrintSpec
* @path /app/feePrintSpec/deleteFeePrintSpec
*/
@RequestMapping(value = "/deleteFeePrintSpec", method = RequestMethod.POST)
public ResponseEntity<String> deleteFeePrintSpec(@RequestBody JSONObject reqJson) {
|
88e030b7
王彪总
init project
|
80
81
82
83
84
85
86
87
|
Assert.hasKeyAndValue(reqJson, "printId", "printId不能为空");
FeePrintSpecPo feePrintSpecPo = BeanConvertUtil.covertBean(reqJson, FeePrintSpecPo.class);
return deleteFeePrintSpecBMOImpl.delete(feePrintSpecPo);
}
/**
* 微信删除消息模板
*
|
88e030b7
王彪总
init project
|
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
* @return
* @serviceCode /feePrintSpec/queryFeePrintSpec
* @path /app/feePrintSpec/queryFeePrintSpec
*/
@RequestMapping(value = "/queryFeePrintSpec", method = RequestMethod.GET)
public ResponseEntity<String> queryFeePrintSpec(@RequestParam(value = "communityId") String communityId,
@RequestParam(value = "specCd", required = false) String specCd,
@RequestParam(value = "page") int page,
@RequestParam(value = "row") int row) {
FeePrintSpecDto feePrintSpecDto = new FeePrintSpecDto();
feePrintSpecDto.setPage(page);
feePrintSpecDto.setRow(row);
feePrintSpecDto.setCommunityId(communityId);
feePrintSpecDto.setSpecCd(specCd);
return getFeePrintSpecBMOImpl.get(feePrintSpecDto);
}
}
|