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

[租赁合同][修改][判断店铺是否存在]

release_toaliyun_real
gongbiao 7 лет назад
Родитель
Сommit
82640dc922
2 измененных файлов: 4 добавлений и 0 удалений
  1. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  2. +3
    -0
      mallinkService/src/main/resources/mapper/WxRentContractMapper.xml

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

@@ -495,6 +495,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
return new ResultData(ErrorCode.SHOP_IS_NOT_FOUND.getCode(), "店铺 " + shopNumber + " 已删除");
}
wxRentContractQuery.setShopId(shopId);
wxRentContractQuery.setId(record.getId());
int count = wxRentContractMapper.selectRentContractCountByShopId(wxRentContractQuery);
if (count > 0) {
return new ResultData(ErrorCode.SHOP_IS_RENT.getCode(), "店铺 " + shopNumber + " 已出租");


+ 3
- 0
mallinkService/src/main/resources/mapper/WxRentContractMapper.xml Просмотреть файл

@@ -252,6 +252,9 @@
<select id="selectRentContractCountByShopId" parameterType="com.iformall.domain.po.WxRentContract" resultType="int">
select count(*) from wx_rent_contract where tenant_id=#{tenantId} and json_contains(json_extract(rent_info,'$[*].shopId'),concat('"',${shopId},'"')) and status in (2,3,4)
<if test="id!=null">
and id!=#{id}
</if>
</select>
<select id="selectRentContractByShopId" parameterType="com.iformall.domain.po.WxRentContract"


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