java110
2021-06-01 b497ff41e47f4ebe69b86f13f6972f34f33f4884
service-store/src/main/java/com/java110/store/api/ContractChangePlanRoomApi.java
@@ -1,11 +1,12 @@
package com.java110.store.api;
import com.java110.dto.Dto;.ContractChangePlanRoomDto;
import com.alibaba.fastjson.JSONObject;
import com.java110.dto.contractChangePlanRoom.ContractChangePlanRoomDto;
import com.java110.po.contractChangePlanRoom.ContractChangePlanRoomPo;
import com.java110.store.bmo.ContractChangePlanRoom.IDeleteContractChangePlanRoomBMO;
import com.java110.store.bmo.ContractChangePlanRoom.IGetContractChangePlanRoomBMO;
import com.java110.store.bmo.ContractChangePlanRoom.ISaveContractChangePlanRoomBMO;
import com.java110.store.bmo.ContractChangePlanRoom.IUpdateContractChangePlanRoomBMO;
import com.java110.store.bmo.contractChangePlanRoom.IDeleteContractChangePlanRoomBMO;
import com.java110.store.bmo.contractChangePlanRoom.IGetContractChangePlanRoomBMO;
import com.java110.store.bmo.contractChangePlanRoom.ISaveContractChangePlanRoomBMO;
import com.java110.store.bmo.contractChangePlanRoom.IUpdateContractChangePlanRoomBMO;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import org.springframework.beans.factory.annotation.Autowired;
@@ -28,16 +29,17 @@
    /**
     * 微信保存消息模板
     * @serviceCode /contractChangePlanRoom/saveContractChangePlanRoom
     * @path /app/contractChangePlanRoom/saveContractChangePlanRoom
     *
     * @param reqJson
     * @return
     * @serviceCode /contractChangePlanRoom/saveContractChangePlanRoom
     * @path /app/contractChangePlanRoom/saveContractChangePlanRoom
     */
    @RequestMapping(value = "/saveContractChangePlanRoom", method = RequestMethod.POST)
    public ResponseEntity<String> saveContractChangePlanRoom(@RequestBody JSONObject reqJson) {
        Assert.hasKeyAndValue(reqJson, "planId", "请求报文中未包含planId");
Assert.hasKeyAndValue(reqJson, "roomId", "请求报文中未包含roomId");
        Assert.hasKeyAndValue(reqJson, "roomId", "请求报文中未包含roomId");
        ContractChangePlanRoomPo contractChangePlanRoomPo = BeanConvertUtil.covertBean(reqJson, ContractChangePlanRoomPo.class);
@@ -46,17 +48,18 @@
    /**
     * 微信修改消息模板
     * @serviceCode /contractChangePlanRoom/updateContractChangePlanRoom
     * @path /app/contractChangePlanRoom/updateContractChangePlanRoom
     *
     * @param reqJson
     * @return
     * @serviceCode /contractChangePlanRoom/updateContractChangePlanRoom
     * @path /app/contractChangePlanRoom/updateContractChangePlanRoom
     */
    @RequestMapping(value = "/updateContractChangePlanRoom", method = RequestMethod.POST)
    public ResponseEntity<String> updateContractChangePlanRoom(@RequestBody JSONObject reqJson) {
        Assert.hasKeyAndValue(reqJson, "planId", "请求报文中未包含planId");
Assert.hasKeyAndValue(reqJson, "roomId", "请求报文中未包含roomId");
Assert.hasKeyAndValue(reqJson, "prId", "prId不能为空");
        Assert.hasKeyAndValue(reqJson, "roomId", "请求报文中未包含roomId");
        Assert.hasKeyAndValue(reqJson, "prId", "prId不能为空");
        ContractChangePlanRoomPo contractChangePlanRoomPo = BeanConvertUtil.covertBean(reqJson, ContractChangePlanRoomPo.class);
@@ -65,10 +68,11 @@
    /**
     * 微信删除消息模板
     * @serviceCode /contractChangePlanRoom/deleteContractChangePlanRoom
     * @path /app/contractChangePlanRoom/deleteContractChangePlanRoom
     *
     * @param reqJson
     * @return
     * @serviceCode /contractChangePlanRoom/deleteContractChangePlanRoom
     * @path /app/contractChangePlanRoom/deleteContractChangePlanRoom
     */
    @RequestMapping(value = "/deleteContractChangePlanRoom", method = RequestMethod.POST)
    public ResponseEntity<String> deleteContractChangePlanRoom(@RequestBody JSONObject reqJson) {
@@ -83,19 +87,20 @@
    /**
     * 微信删除消息模板
     *
     * @param storeId 商户ID
     * @return
     * @serviceCode /contractChangePlanRoom/queryContractChangePlanRoom
     * @path /app/contractChangePlanRoom/queryContractChangePlanRoom
     * @param communityId 小区ID
     * @return
     */
    @RequestMapping(value = "/queryContractChangePlanRoom", method = RequestMethod.GET)
    public ResponseEntity<String> queryContractChangePlanRoom(@RequestParam(value = "communityId") String communityId,
                                                      @RequestParam(value = "page") int page,
                                                      @RequestParam(value = "row") int row) {
    public ResponseEntity<String> queryContractChangePlanRoom(@RequestHeader(value = "shore-id") String storeId,
                                                              @RequestParam(value = "page") int page,
                                                              @RequestParam(value = "row") int row) {
        ContractChangePlanRoomDto contractChangePlanRoomDto = new ContractChangePlanRoomDto();
        contractChangePlanRoomDto.setPage(page);
        contractChangePlanRoomDto.setRow(row);
        contractChangePlanRoomDto.setCommunityId(communityId);
        contractChangePlanRoomDto.setStoreId(storeId);
        return getContractChangePlanRoomBMOImpl.get(contractChangePlanRoomDto);
    }
}