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

[商户][修改][合同补录查询问题]

release_toaliyun_real
gongbiao 7 лет назад
Родитель
Сommit
2144080ed1
3 измененных файлов: 33 добавлений и 0 удалений
  1. +11
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java
  2. +16
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java
  3. +6
    -0
      mallinkService/src/main/resources/mapper/WxMerchantMapper.xml

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

@@ -97,6 +97,9 @@ public class WxMerchant implements Serializable {
@Transient
private List<WxLevelConfig> levelConfigList;

@Transient
private Integer rentShopType;

/*租户ID**/
@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
private String tenantId;
@@ -399,6 +402,14 @@ public class WxMerchant implements Serializable {
this.isPublic = isPublic;
}

public Integer getRentShopType() {
return rentShopType;
}

public void setRentShopType(Integer rentShopType) {
this.rentShopType = rentShopType;
}

public static enum Field
{
Id_ASC("`id` ASC"),Id_DESC("`id` DESC")


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

@@ -98,6 +98,22 @@ public class WxMerchantServiceImpl implements WxMerchantService {
merchant.setRentalStartDate(collect.get(0).getRentalStartDate());
merchant.setRentalEndDate(collect.get(0).getRentalEndDate());
}
if (record.getRentShopType() != null) {
WxMerchantShop wxMerchantShop = new WxMerchantShop();
wxMerchantShop.setMerchantId(merchant.getId());
wxMerchantShop.setIsDel(EnumDelStatus.NOT_DEL.getCode());
List<Map<String, Object>> shops = new ArrayList<>();
List<WxMerchantShop> wxMerchantShopList = wxMerchantShopMapper.findList(wxMerchantShop);
for (WxMerchantShop merchantShop : wxMerchantShopList) {
WxShop shop = new WxShop();
record.setId(merchantShop.getShopId());
List<Map<String, Object>> shoplist = wxShopMapper.findListMap(shop);
if (shoplist.size() > 0) {
shops.add(shoplist.get(0));
}
}
merchant.setShoplist(shops);
}
}

PageInfo<WxMerchant> pageInfo = new PageInfo<>(merchants);


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

@@ -84,6 +84,12 @@
<if test=" null != email ">
and `email` = #{email}
</if>
<if test=" null != rentShopType ">
and id in(
select merchant_id from wx_rent_contract where tenant_id=#{tenantId} and rent_shop_type=1 and merchant_id is
not null and status not in(1,2,3,4)
)
</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">


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