Browse Source

Merge branch 'release_toaliyun_real' of https://git.malls.iformall.com/server/formallProject into release_toaliyun_real

release_toaliyun_real
xiaohu 1 year ago
parent
commit
c091220cda
3 changed files with 47 additions and 3 deletions
  1. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java
  2. +38
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxShopServiceImpl.java
  3. +7
    -0
      mallinkService/src/main/resources/mapper/WxMerchantMapper.xml

+ 2
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java View File

@@ -504,4 +504,6 @@ public class WxMerchant extends TenantEntity {
public Integer isAll;
@TableField(exist = false)
private List<Integer> privateRentShopTypeList;
@TableField(exist = false)
private List<String> createShopNumberList;
}

+ 38
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxShopServiceImpl.java View File

@@ -231,9 +231,8 @@ public class WxShopServiceImpl implements WxShopService {
merchantShopQ.setShopIdList(record.getIds());
merchantShopQ.setIsDel(0);
List<WxMerchantShop> merchantShopList = wxMerchantShopMapper.findList(merchantShopQ);
List<Long> merchantIds = new ArrayList<Long>();
if (null != merchantShopList && merchantShopList.size() > 0) {
List<Long> merchantIds = new ArrayList<Long>();
for (int i = 0 ;i < merchantShopList.size() ; i ++) {
WxMerchantShop ms = merchantShopList.get(i);
if (null != ms ) {
@@ -245,8 +244,44 @@ public class WxShopServiceImpl implements WxShopService {
}
}
}
merchantMap = getMerchantMap(record,merchantIds,merchantMap);
}
//还得查一下虚拟商户,如果店铺既有品牌商户关联,又有虚拟商户,则取虚拟商户。因为这种情况代表的是已售铺创建的品牌,不能创建合同,智能做营销。
WxShop sq = new WxShop();
sq.setId(record.getId());
sq.setIds(record.getIds());
sq.setIsDel(EnumYesOrNo.NO.getCode());
List<WxShop> shopList = wxShopMapper.findList(sq);
if (null != shopList && shopList.size() > 0 ) {
Map<String,Long> shopNumberMap = new HashMap<String,Long>();
List<String> shopNumberList = new ArrayList<String>();
for (int i = 0 ; i < shopList.size() ; i ++ ) {
WxShop s = shopList.get(i);
shopNumberMap.put(s.getShopNumber(), s.getId());
shopNumberList.add(s.getShopNumber());
}
WxMerchant mq = new WxMerchant();
mq.updateTenantInfo(record);
sq.setIsDel(EnumYesOrNo.NO.getCode());
mq.setCreateShopNumberList(shopNumberList);
List<WxMerchant> mlist = wxMerchantMapper.findList(mq);
if (null != mlist && mlist.size() > 0) {
for (int i = 0 ; i < mlist.size() ; i ++ ) {
WxMerchant m = mlist.get(i);
String createshopNumber = m.getCreateShopNumber();
if (StringUtils.isNotBlank(createshopNumber)) {
Long shopId = shopNumberMap.get(createshopNumber);
if (null != shopId) {
shopMerchantIdMap.put(shopId, m.getId());
}
}
if (!merchantIds.contains(m.getId())) {
merchantIds.add(m.getId());
}
}
}
}
merchantMap = getMerchantMap(record,merchantIds,merchantMap);
}
@Override


+ 7
- 0
mallinkService/src/main/resources/mapper/WxMerchantMapper.xml View File

@@ -198,6 +198,13 @@
</foreach>
</if>
<if test=" null != createShopNumberList and createShopNumberList.size > 0">
and m.`create_shop_number` in
<foreach collection="createShopNumberList" index="index" item="csItem" open="(" separator="," close=")">
#{csItem}
</foreach>
</if>
<if test=" null != adminTypes and adminTypes.size > 0">
and m.`is_admin` in
<foreach collection="adminTypes" index="index" item="typeItem" open="(" separator="," close=")">


Loading…
Cancel
Save