old mode 100644
new mode 100755
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.rentingAppointment.RentingAppointmentDto; |
| | | import com.java110.dto.store.StoreDto; |
| | | import com.java110.po.rentingAppointment.RentingAppointmentPo; |
| | | import com.java110.user.bmo.rentingAppointment.IDeleteRentingAppointmentBMO; |
| | | import com.java110.user.bmo.rentingAppointment.IGetRentingAppointmentBMO; |
| | | import com.java110.user.bmo.rentingAppointment.ISaveRentingAppointmentBMO; |
| | | import com.java110.user.bmo.rentingAppointment.IUpdateRentingAppointmentBMO; |
| | | import com.java110.user.bmo.rentingAppointment.*; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private IGetRentingAppointmentBMO getRentingAppointmentBMOImpl; |
| | | |
| | | @Autowired |
| | | private IConfirmRentingBMO confirmRentingBMOImpl; |
| | | |
| | | /** |
| | | * 微信保存消息模板 |
| | |
| | | @RequestMapping(value = "/updateRentingAppointment", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateRentingAppointment(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "tenantName", "请求报文中未包含tenantName"); |
| | | Assert.hasKeyAndValue(reqJson, "tenantSex", "请求报文中未包含tenantSex"); |
| | | Assert.hasKeyAndValue(reqJson, "tenantTel", "请求报文中未包含tenantTel"); |
| | | Assert.hasKeyAndValue(reqJson, "appointmentTime", "请求报文中未包含appointmentTime"); |
| | | // Assert.hasKeyAndValue(reqJson, "tenantName", "请求报文中未包含tenantName"); |
| | | // Assert.hasKeyAndValue(reqJson, "tenantSex", "请求报文中未包含tenantSex"); |
| | | // Assert.hasKeyAndValue(reqJson, "tenantTel", "请求报文中未包含tenantTel"); |
| | | // Assert.hasKeyAndValue(reqJson, "appointmentTime", "请求报文中未包含appointmentTime"); |
| | | Assert.hasKeyAndValue(reqJson, "appointmentId", "appointmentId不能为空"); |
| | | |
| | | |
| | |
| | | @RequestMapping(value = "/queryRentingAppointment", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryRentingAppointment(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | @RequestParam(value = "row") int row, |
| | | @RequestParam(value = "state", required = false) String state, |
| | | @RequestParam(value = "tenantName", required = false) String tenantName, |
| | | @RequestParam(value = "tenantTel", required = false) String tenantTel |
| | | ) { |
| | | RentingAppointmentDto rentingAppointmentDto = new RentingAppointmentDto(); |
| | | rentingAppointmentDto.setPage(page); |
| | | rentingAppointmentDto.setRow(row); |
| | | rentingAppointmentDto.setStoreId(storeId); |
| | | if (!StoreDto.STORE_ADMIN.equals(storeId)) { |
| | | rentingAppointmentDto.setStoreId(storeId); |
| | | } |
| | | rentingAppointmentDto.setState(state); |
| | | rentingAppointmentDto.setTenantName(tenantName); |
| | | rentingAppointmentDto.setTenantTel(tenantTel); |
| | | return getRentingAppointmentBMOImpl.get(rentingAppointmentDto); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 确认租房 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /rentingAppointment/confirmRenting |
| | | * @path /app/rentingAppointment/confirmRenting |
| | | */ |
| | | @RequestMapping(value = "/confirmRenting", method = RequestMethod.POST) |
| | | public ResponseEntity<String> confirmRenting(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "appointmentId", "appointmentId不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "rentingId", "rentingId不能为空"); |
| | | |
| | | RentingAppointmentPo rentingAppointmentPo = BeanConvertUtil.covertBean(reqJson, RentingAppointmentPo.class); |
| | | return confirmRentingBMOImpl.confirm(rentingAppointmentPo); |
| | | } |
| | | |
| | | |
| | | } |