Explorar el Código

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

release_toaliyun_real
gongbiao hace 7 años
padre
commit
2144080ed1
Se han modificado 3 ficheros con 33 adiciones y 0 borrados
  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 Ver fichero

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


@Transient
private Integer rentShopType;

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


public Integer getRentShopType() {
return rentShopType;
}

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

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


+ 16
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java Ver fichero

@@ -98,6 +98,22 @@ public class WxMerchantServiceImpl implements WxMerchantService {
merchant.setRentalStartDate(collect.get(0).getRentalStartDate()); merchant.setRentalStartDate(collect.get(0).getRentalStartDate());
merchant.setRentalEndDate(collect.get(0).getRentalEndDate()); 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); PageInfo<WxMerchant> pageInfo = new PageInfo<>(merchants);


+ 6
- 0
mallinkService/src/main/resources/mapper/WxMerchantMapper.xml Ver fichero

@@ -84,6 +84,12 @@
<if test=" null != email "> <if test=" null != email ">
and `email` = #{email} and `email` = #{email}
</if> </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 "> <if test=" null != ids ">
and id in and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">


Cargando…
Cancelar
Guardar