| | |
| | | package com.java110.store.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.contractPartya.ContractPartyaDto; |
| | | import com.java110.dto.contract.ContractPartyaDto; |
| | | import com.java110.po.contractPartya.ContractPartyaPo; |
| | | import com.java110.store.bmo.contractPartya.IDeleteContractPartyaBMO; |
| | | import com.java110.store.bmo.contractPartya.IGetContractPartyaBMO; |
| | |
| | | * @path /app/contractPartya/saveContractPartya |
| | | */ |
| | | @RequestMapping(value = "/saveContractPartya", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveContractPartya(@RequestBody JSONObject reqJson) { |
| | | public ResponseEntity<String> saveContractPartya(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "partyA", "请求报文中未包含partyA"); |
| | | Assert.hasKeyAndValue(reqJson, "aContacts", "请求报文中未包含aContacts"); |
| | |
| | | |
| | | |
| | | ContractPartyaPo contractPartyaPo = BeanConvertUtil.covertBean(reqJson, ContractPartyaPo.class); |
| | | contractPartyaPo.setStoreId(storeId); |
| | | |
| | | return saveContractPartyaBMOImpl.save(contractPartyaPo); |
| | | } |
| | | |
| | |
| | | * @path /app/contractPartya/updateContractPartya |
| | | */ |
| | | @RequestMapping(value = "/updateContractPartya", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateContractPartya(@RequestBody JSONObject reqJson) { |
| | | public ResponseEntity<String> updateContractPartya(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "partyA", "请求报文中未包含partyA"); |
| | | Assert.hasKeyAndValue(reqJson, "aContacts", "请求报文中未包含aContacts"); |
| | |
| | | |
| | | |
| | | ContractPartyaPo contractPartyaPo = BeanConvertUtil.covertBean(reqJson, ContractPartyaPo.class); |
| | | contractPartyaPo.setStoreId(storeId); |
| | | |
| | | return updateContractPartyaBMOImpl.update(contractPartyaPo); |
| | | } |
| | | |
| | |
| | | * @path /app/contractPartya/deleteContractPartya |
| | | */ |
| | | @RequestMapping(value = "/deleteContractPartya", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteContractPartya(@RequestBody JSONObject reqJson) { |
| | | public ResponseEntity<String> deleteContractPartya(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "partyaId", "partyaId不能为空"); |
| | | |
| | | |
| | | ContractPartyaPo contractPartyaPo = BeanConvertUtil.covertBean(reqJson, ContractPartyaPo.class); |
| | | contractPartyaPo.setStoreId(storeId); |
| | | return deleteContractPartyaBMOImpl.delete(contractPartyaPo); |
| | | } |
| | | |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryContractPartya", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryContractPartya(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestParam(value = "partyA", required = false) String partyA, |
| | | @RequestParam(value = "aContacts", required = false) String aContacts, |
| | | @RequestParam(value = "aLink", required = false) String aLink, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | ContractPartyaDto contractPartyaDto = new ContractPartyaDto(); |
| | | contractPartyaDto.setPage(page); |
| | | contractPartyaDto.setRow(row); |
| | | contractPartyaDto.setStoreId(storeId); |
| | | contractPartyaDto.setPartyA(partyA); |
| | | contractPartyaDto.setaContacts(aContacts); |
| | | contractPartyaDto.setaLink(aLink); |
| | | return getContractPartyaBMOImpl.get(contractPartyaDto); |
| | | } |
| | | } |