xiaogang
2021-08-20 2fc8dd46527fbf2efd21e6a95ccc5efb099a7d69
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
package com.java110.fee.api;
 
import com.alibaba.fastjson.JSONObject;
import com.java110.dto.payFeeDetailMonth.PayFeeDetailMonthDto;
import com.java110.fee.bmo.payFeeDetailMonth.IDeletePayFeeDetailMonthBMO;
import com.java110.fee.bmo.payFeeDetailMonth.IGetPayFeeDetailMonthBMO;
import com.java110.fee.bmo.payFeeDetailMonth.ISavePayFeeDetailMonthBMO;
import com.java110.fee.bmo.payFeeDetailMonth.IUpdatePayFeeDetailMonthBMO;
import com.java110.po.payFeeDetailMonth.PayFeeDetailMonthPo;
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 = "/payFeeDetailMonth")
public class PayFeeDetailMonthApi {
 
    @Autowired
    private ISavePayFeeDetailMonthBMO savePayFeeDetailMonthBMOImpl;
    @Autowired
    private IUpdatePayFeeDetailMonthBMO updatePayFeeDetailMonthBMOImpl;
    @Autowired
    private IDeletePayFeeDetailMonthBMO deletePayFeeDetailMonthBMOImpl;
 
    @Autowired
    private IGetPayFeeDetailMonthBMO getPayFeeDetailMonthBMOImpl;
 
    /**
     * 微信保存消息模板
     * @serviceCode /payFeeDetailMonth/savePayFeeDetailMonth
     * @path /app/payFeeDetailMonth/savePayFeeDetailMonth
     * @param reqJson
     * @return
     */
    @RequestMapping(value = "/savePayFeeDetailMonth", method = RequestMethod.POST)
    public ResponseEntity<String> savePayFeeDetailMonth(@RequestBody JSONObject reqJson) {
 
        Assert.hasKeyAndValue(reqJson, "detailId", "请求报文中未包含detailId");
Assert.hasKeyAndValue(reqJson, "detailYear", "请求报文中未包含detailYear");
Assert.hasKeyAndValue(reqJson, "detailMonth", "请求报文中未包含detailMonth");
 
 
        PayFeeDetailMonthPo payFeeDetailMonthPo = BeanConvertUtil.covertBean(reqJson, PayFeeDetailMonthPo.class);
        return savePayFeeDetailMonthBMOImpl.save(payFeeDetailMonthPo);
    }
 
    /**
     * 微信修改消息模板
     * @serviceCode /payFeeDetailMonth/updatePayFeeDetailMonth
     * @path /app/payFeeDetailMonth/updatePayFeeDetailMonth
     * @param reqJson
     * @return
     */
    @RequestMapping(value = "/updatePayFeeDetailMonth", method = RequestMethod.POST)
    public ResponseEntity<String> updatePayFeeDetailMonth(@RequestBody JSONObject reqJson) {
 
        Assert.hasKeyAndValue(reqJson, "detailId", "请求报文中未包含detailId");
Assert.hasKeyAndValue(reqJson, "detailYear", "请求报文中未包含detailYear");
Assert.hasKeyAndValue(reqJson, "detailMonth", "请求报文中未包含detailMonth");
Assert.hasKeyAndValue(reqJson, "monthId", "monthId不能为空");
 
 
        PayFeeDetailMonthPo payFeeDetailMonthPo = BeanConvertUtil.covertBean(reqJson, PayFeeDetailMonthPo.class);
        return updatePayFeeDetailMonthBMOImpl.update(payFeeDetailMonthPo);
    }
 
    /**
     * 微信删除消息模板
     * @serviceCode /payFeeDetailMonth/deletePayFeeDetailMonth
     * @path /app/payFeeDetailMonth/deletePayFeeDetailMonth
     * @param reqJson
     * @return
     */
    @RequestMapping(value = "/deletePayFeeDetailMonth", method = RequestMethod.POST)
    public ResponseEntity<String> deletePayFeeDetailMonth(@RequestBody JSONObject reqJson) {
        Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空");
 
        Assert.hasKeyAndValue(reqJson, "monthId", "monthId不能为空");
 
 
        PayFeeDetailMonthPo payFeeDetailMonthPo = BeanConvertUtil.covertBean(reqJson, PayFeeDetailMonthPo.class);
        return deletePayFeeDetailMonthBMOImpl.delete(payFeeDetailMonthPo);
    }
 
    /**
     * 微信删除消息模板
     * @serviceCode /payFeeDetailMonth/queryPayFeeDetailMonth
     * @path /app/payFeeDetailMonth/queryPayFeeDetailMonth
     * @param communityId 小区ID
     * @return
     */
    @RequestMapping(value = "/queryPayFeeDetailMonth", method = RequestMethod.GET)
    public ResponseEntity<String> queryPayFeeDetailMonth(@RequestParam(value = "communityId") String communityId,
                                                      @RequestParam(value = "page") int page,
                                                      @RequestParam(value = "row") int row) {
        PayFeeDetailMonthDto payFeeDetailMonthDto = new PayFeeDetailMonthDto();
        payFeeDetailMonthDto.setPage(page);
        payFeeDetailMonthDto.setRow(row);
        payFeeDetailMonthDto.setCommunityId(communityId);
        return getPayFeeDetailMonthBMOImpl.get(payFeeDetailMonthDto);
    }
}