Explorar el Código

[租赁合同][修改][补录第一步判断店铺是否已出租]

release_toaliyun_real
gongbiao hace 7 años
padre
commit
9079250681
Se han modificado 1 ficheros con 7 adiciones y 7 borrados
  1. +7
    -7
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java

+ 7
- 7
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Ver fichero

@@ -636,22 +636,22 @@ public class WxRentContractServiceImpl implements WxRentContractService {
@Override
public ResultData hasRentStatus(WxRentContract record) {
String rentInfo = record.getRentInfo();
JSONArray rentInfoArray = JSONArray.parseArray(rentInfo);
int size = rentInfoArray.size();
if (size == 0) {
if (StringUtils.isEmpty(rentInfo)) {
return new ResultData(ErrorCode.SHOP_NOT_SELECTED);
}
String[] split = rentInfo.split(",");
int size = split.length;
//查询rent_info 包括 shopId
for (int i = 0; i < size; i++) {
JSONObject rentInfoObject = rentInfoArray.getJSONObject(i);
String shopId = split[i];
WxShop wxShop = wxShopMapper.selectByPrimaryKey(shopId);
WxRentContract wxRentContractQuery = new WxRentContract();
wxRentContractQuery.setTenantId(record.getTenantId());
Long shopId = rentInfoObject.getLong("shopId");
String shopNumber = rentInfoObject.getString("shopNumber");
String shopNumber = wxShop.getShopNumber();
if (shopId == null) {
return new ResultData(ErrorCode.SHOP_IS_NOT_FOUND.getCode(), "店铺 " + shopNumber + " 已删除");
}
wxRentContractQuery.setShopId(shopId);
wxRentContractQuery.setShopId(Long.valueOf(shopId));
int count = wxRentContractMapper.selectRentContractCountByShopId(wxRentContractQuery);
if (count > 0) {
return new ResultData(ErrorCode.SHOP_IS_RENT.getCode(), "店铺 " + shopNumber + " 已出租");


Cargando…
Cancelar
Guardar