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

fix wxshop

release_toaliyun_real
winter 4 лет назад
Родитель
Сommit
c7833221f7
5 измененных файлов: 27 добавлений и 10 удалений
  1. +4
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxShop.java
  2. +2
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java
  3. +6
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxShopServiceImpl.java
  4. +11
    -0
      mallinkService/src/main/resources/mapper/WxRentContractMapper.xml
  5. +4
    -9
      mallinkService/src/main/resources/mapper/WxShopMapper.xml

+ 4
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxShop.java Просмотреть файл

@@ -12,6 +12,7 @@ import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@TableName(value = "wx_shop")
@Data
@@ -20,7 +21,9 @@ import java.util.Date;
public class WxShop extends TenantEntity {

protected Long id;

@TableField(exist = false)
private List<Long> notInIdList;

@TableField(exist = false)
private Long rentContractId;


+ 2
- 0
mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java Просмотреть файл

@@ -59,4 +59,6 @@ public interface WxRentContractMapper extends CommonMapper<WxRentContract, Long>

List<Map<String, Object>> currentValidByMerchantId(WxRentContract rentContract);
List<Long> getUsedRentShopIds(WxRentContract wxRentContract);
}

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

@@ -475,6 +475,12 @@ public class WxShopServiceImpl implements WxShopService {
@Override
public PageInfo<Map<String, Object>> listShopFromContract(WxShop wxShop, Integer pageIndex, Integer pageSize) {
PageHelper.startPage(pageIndex, pageSize);
WxRentContract wxRentContractQ = new WxRentContract();
wxRentContractQ.updateTenantInfo(wxShop);
List<Long> usedShopIds = wxRentContractMapper.getUsedRentShopIds(wxRentContractQ);
if (null != usedShopIds && usedShopIds.size() > 0 ) {
wxShop.setNotInIdList(usedShopIds);
}
List<Map<String,Object>> shops = wxShopMapper.listShopFromContract(wxShop);
if (null != shops) {
Map<Long, String> floorMap = this.getFloorMap(wxShop);


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

@@ -536,6 +536,17 @@
</foreach>
</if>
</select>
<select id="getUsedRentShopIds" parameterType="com.iformall.domain.po.WxRentContract" resultType="Long">
SELECT distinct shop_id FROM wx_rent_contract WHERE status in(1,2,3,4,8)
and rent_shop_type=2
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
</select>
</mapper>


+ 4
- 9
mallinkService/src/main/resources/mapper/WxShopMapper.xml Просмотреть файл

@@ -461,16 +461,11 @@
<if test=" null != status">
and s.`status` = #{status}
</if>
<if test="null!=status and status==1 and type!=null and type==2">
<if test="null != notInIdList and null!=status and status==1 and type!=null and type==2">
and s.id not in(
SELECT shop_id FROM wx_rent_contract WHERE status in(1,2,3,4,8)
and rent_shop_type=2
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
<foreach collection="notInIdList" index="index" item="notInIdItem" open="(" separator="," close=")">
#{notInIdItem}
</foreach>
)
</if>
<if test=" null != type ">


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