old mode 100644
new mode 100755
| | |
| | | import com.java110.po.payFeeConfigDiscount.PayFeeConfigDiscountPo; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/payFeeConfigDiscount") |
| | |
| | | |
| | | @Autowired |
| | | private ISavePayFeeConfigDiscountBMO savePayFeeConfigDiscountBMOImpl; |
| | | |
| | | @Autowired |
| | | private IUpdatePayFeeConfigDiscountBMO updatePayFeeConfigDiscountBMOImpl; |
| | | |
| | | @Autowired |
| | | private IDeletePayFeeConfigDiscountBMO deletePayFeeConfigDiscountBMOImpl; |
| | | |
| | |
| | | Assert.hasKeyAndValue(reqJson, "configId", "请求报文中未包含configId"); |
| | | Assert.hasKeyAndValue(reqJson, "discountId", "请求报文中未包含discountId"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含startTime"); |
| | | Assert.hasKeyAndValue(reqJson, "endTime", "请求报文中未包含endTime"); |
| | | |
| | | PayFeeConfigDiscountPo payFeeConfigDiscountPo = BeanConvertUtil.covertBean(reqJson, PayFeeConfigDiscountPo.class); |
| | | String paymaxEndTime = reqJson.getString("payMaxEndTime"); |
| | | if (StringUtil.isEmpty(paymaxEndTime)) { |
| | | //如果优惠最大时间为空,就默认为2037-12-31 00:00:00 |
| | | payFeeConfigDiscountPo.setPayMaxEndTime("2037-12-31 00:00:00"); |
| | | } |
| | | return savePayFeeConfigDiscountBMOImpl.save(payFeeConfigDiscountPo); |
| | | } |
| | | |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryPayFeeConfigDiscount", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryPayFeeConfigDiscount(@RequestParam(value = "communityId") String communityId, |
| | | @RequestParam(value = "configId", required = false) String configId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | PayFeeConfigDiscountDto payFeeConfigDiscountDto = new PayFeeConfigDiscountDto(); |
| | | payFeeConfigDiscountDto.setPage(page); |
| | | payFeeConfigDiscountDto.setRow(row); |
| | | payFeeConfigDiscountDto.setConfigId(configId); |
| | | payFeeConfigDiscountDto.setCommunityId(communityId); |
| | | return getPayFeeConfigDiscountBMOImpl.get(payFeeConfigDiscountDto); |
| | | } |