Просмотр исходного кода

[租赁合同][修改][店铺删除问题]

release_toaliyun_real
gongbiao 7 лет назад
Родитель
Сommit
a9abd78c8d
1 измененных файлов: 8 добавлений и 10 удалений
  1. +8
    -10
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java

+ 8
- 10
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Просмотреть файл

@@ -187,11 +187,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
//保存租赁合同信息
final IdWorker idWorker = IdWorker.get();
record.setId(idWorker.nextId());
if (record.getStartDate().after(record.getRentalStartDate())) {
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR, "起租开始时间不能大于计租开始时间");
}
int dayType = record.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_DAY.getCode()) ? Calendar.DAY_OF_MONTH : Calendar.MONTH;

//计租开始时间
Calendar instance = Calendar.getInstance();
instance.setTime(record.getRentalStartDate());
@@ -262,11 +258,12 @@ public class WxRentContractServiceImpl implements WxRentContractService {
}
} else {
WxShop wxShop = wxShopMapper.selectByPrimaryKey(shopId);
if (wxShop != null && wxShop.getStatus().equals(EnumShopStatus.RENT.getCode())) {
return new ResultData(ErrorCode.SHOP_IS_RENT.getCode(), "店铺 " + wxShop.getShopNumber() + " 已出租");
} else {
if (wxShop == null) {
return new ResultData(ErrorCode.SHOP_IS_NOT_FOUND.getCode(), "店铺 " + shopNumber + " 已删除");
}
if (wxShop.getStatus().equals(EnumShopStatus.RENT.getCode())) {
return new ResultData(ErrorCode.SHOP_IS_RENT.getCode(), "店铺 " + wxShop.getShopNumber() + " 已出租");
}
}
}
} else {
@@ -487,11 +484,12 @@ public class WxRentContractServiceImpl implements WxRentContractService {
}
} else {
WxShop wxShop = wxShopMapper.selectByPrimaryKey(shopId);
if (wxShop != null && wxShop.getStatus().equals(EnumShopStatus.RENT.getCode())) {
return new ResultData(ErrorCode.SHOP_IS_RENT.getCode(), "店铺 " + wxShop.getShopNumber() + " 已出租");
} else {
if (wxShop == null) {
return new ResultData(ErrorCode.SHOP_IS_NOT_FOUND.getCode(), "店铺 " + shopNumber + " 已删除");
}
if (wxShop.getStatus().equals(EnumShopStatus.RENT.getCode())) {
return new ResultData(ErrorCode.SHOP_IS_RENT.getCode(), "店铺 " + wxShop.getShopNumber() + " 已出租");
}
}
}
} else {


Загрузка…
Отмена
Сохранить