| @@ -71,7 +71,7 @@ public class WxCouponOrderReservationController extends BaseController { | |||||
| if(EnumCouponOrderReservationStatus.getReservationFinish().contains(sortReservation.getStatus())){ | if(EnumCouponOrderReservationStatus.getReservationFinish().contains(sortReservation.getStatus())){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"预约单已完成"); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"预约单已完成"); | ||||
| } | } | ||||
| reservation.setRemark("B用户"+getLoginBUser().getPhone()+"修改信息"); | |||||
| return wxCouponOrderReservationService.saveOrUpdate(reservation); | return wxCouponOrderReservationService.saveOrUpdate(reservation); | ||||
| } | } | ||||
| @@ -107,6 +107,7 @@ public class WxCouponOrderReservationController extends BaseController { | |||||
| updReservation.setId(reservation.getId()); | updReservation.setId(reservation.getId()); | ||||
| updReservation.setStatus(reservation.getStatus()); | updReservation.setStatus(reservation.getStatus()); | ||||
| updReservation.setRemark(reservation.getRemark()); | updReservation.setRemark(reservation.getRemark()); | ||||
| reservation.setRemark("B用户"+getLoginBUser().getPhone()+"修改状态"); | |||||
| wxCouponOrderReservationService.saveOrUpdate(updReservation); | wxCouponOrderReservationService.saveOrUpdate(updReservation); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -784,7 +784,7 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| floor = Long.parseLong(floorId); | floor = Long.parseLong(floorId); | ||||
| } | } | ||||
| List<Long> merchantIds = wxMerchantService.getFloorBuildMerchantIds(tenantEntity, null, building, floor, 0, 0); | List<Long> merchantIds = wxMerchantService.getFloorBuildMerchantIds(tenantEntity, null, building, floor, 0, 0); | ||||
| if (null != merchantIds) { | |||||
| if (merchantIds != null) { | |||||
| query.put("ids", merchantIds); | query.put("ids", merchantIds); | ||||
| } | } | ||||
| List<Map<String,Object>> mapList = wxMerchantMapper.findBusByFloorId(query); | List<Map<String,Object>> mapList = wxMerchantMapper.findBusByFloorId(query); | ||||
| @@ -125,8 +125,11 @@ public class WxCouponOrderReservationServiceImpl implements WxCouponOrderReserva | |||||
| Long id = wxCouponOrderReservationMapper.getIdByCouponOrder(record.getCouponOrderId(),record.getTenantId()); | Long id = wxCouponOrderReservationMapper.getIdByCouponOrder(record.getCouponOrderId(),record.getTenantId()); | ||||
| record.setId(id); | record.setId(id); | ||||
| } | } | ||||
| if (record.getId() == null) { | if (record.getId() == null) { | ||||
| record.setStatus(EnumCouponOrderReservationStatus.reservation.getCode()); | |||||
| if(record.getStatus() == null){ | |||||
| record.setStatus(EnumCouponOrderReservationStatus.reservation.getCode()); | |||||
| } | |||||
| //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); | //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); | ||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| record.setId(idWorker.nextId()); | record.setId(idWorker.nextId()); | ||||
| @@ -134,6 +137,9 @@ public class WxCouponOrderReservationServiceImpl implements WxCouponOrderReserva | |||||
| record.setUpdateDate(now); | record.setUpdateDate(now); | ||||
| wxCouponOrderReservationMapper.insert(record); | wxCouponOrderReservationMapper.insert(record); | ||||
| } else { | } else { | ||||
| if(record.getRemark() == null){ | |||||
| record.setRemark(""); | |||||
| } | |||||
| record.setUpdateDate(now); | record.setUpdateDate(now); | ||||
| wxCouponOrderReservationMapper.updateById(record); | wxCouponOrderReservationMapper.updateById(record); | ||||
| } | } | ||||
| @@ -1180,9 +1180,8 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| if (null == couponMerchantIds || couponMerchantIds.size() <=0 ) { | if (null == couponMerchantIds || couponMerchantIds.size() <=0 ) { | ||||
| record.setId(-999L); | record.setId(-999L); | ||||
| return; | return; | ||||
| }else { | |||||
| merchantIds.addAll(couponMerchantIds); | |||||
| } | } | ||||
| merchantIds.addAll(couponMerchantIds); | |||||
| } | } | ||||
| String phone = StringUtils.trimToNull(record.getPhone()); | String phone = StringUtils.trimToNull(record.getPhone()); | ||||
| @@ -1195,8 +1194,14 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| record.setId(-999L); | record.setId(-999L); | ||||
| return; | return; | ||||
| } | } | ||||
| if(merchantIds.size() > 0){ | |||||
| if(merchantIds.size() > 0){ | |||||
| merchantIds.retainAll(userMerchantIds); | merchantIds.retainAll(userMerchantIds); | ||||
| if (merchantIds.size() <= 0) { | |||||
| record.setId(-999L); | |||||
| return; | |||||
| } | |||||
| }else{ | |||||
| merchantIds.addAll(userMerchantIds); | |||||
| } | } | ||||
| } | } | ||||
| @@ -1204,14 +1209,19 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| Long building = record.getBuilding(); | Long building = record.getBuilding(); | ||||
| Long floor = record.getFloor(); | Long floor = record.getFloor(); | ||||
| List<Long> floorMerchantIds = getFloorBuildMerchantIds(record, floorRule, building, floor, 0, 0); | List<Long> floorMerchantIds = getFloorBuildMerchantIds(record, floorRule, building, floor, 0, 0); | ||||
| if (null == floorMerchantIds || floorMerchantIds.size() <=0 ) { | |||||
| record.setId(-999L); | |||||
| return; | |||||
| } | |||||
| if(merchantIds.size() > 0){ | |||||
| merchantIds.retainAll(floorMerchantIds); | |||||
| if(floorMerchantIds != null){ | |||||
| if(merchantIds.size() > 0){ | |||||
| merchantIds.retainAll(floorMerchantIds); | |||||
| if (merchantIds.size() <= 0) { | |||||
| record.setId(-999L); | |||||
| return; | |||||
| } | |||||
| }else{ | |||||
| merchantIds.addAll(floorMerchantIds); | |||||
| } | |||||
| } | } | ||||
| // if(EnumProfitSharingUse.YES.getCode().equals(record.getIsUse())){ | // if(EnumProfitSharingUse.YES.getCode().equals(record.getIsUse())){ | ||||
| // if(merchantIds.size() > 0){ | // if(merchantIds.size() > 0){ | ||||
| // merchantIds.retainAll(isUseMerchantIds); | // merchantIds.retainAll(isUseMerchantIds); | ||||