From 52e9e1ceaa06fea0b80b61216c0ec45c4192f19b Mon Sep 17 00:00:00 2001 From: xhxu Date: Mon, 16 May 2022 15:34:58 +0800 Subject: [PATCH] //add im buser --- .../java/com/iformall/config/ShiroConfig.java | 2 +- .../iformall/domain/vo/WxCouponOrderBVo.java | 1 + .../impl/WxCouponOrderServiceImpl.java | 22 +++++++++++++++++++ .../service/impl/WxTopicServiceImpl.java | 2 +- 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/config/ShiroConfig.java b/mallinkAdmin/src/main/java/com/iformall/config/ShiroConfig.java index b4d7b4d5b..ae5031ad3 100644 --- a/mallinkAdmin/src/main/java/com/iformall/config/ShiroConfig.java +++ b/mallinkAdmin/src/main/java/com/iformall/config/ShiroConfig.java @@ -147,7 +147,7 @@ public class ShiroConfig { filterChainDefinitionMap.put("/wxDeviceScreenAd/**", "anon"); // filterChainDefinitionMap.put("/role/**", "corsFilter,token"); //商场初始化init - filterChainDefinitionMap.put("/wxProjectConfig/**", "anon"); +// filterChainDefinitionMap.put("/wxProjectConfig/**", "anon"); // //test // filterChainDefinitionMap.put("/merchantPoi/spuSync", "anon"); diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java index c0a73e3a1..fe207d290 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java @@ -136,6 +136,7 @@ public class WxCouponOrderBVo extends WxCouponOrder { @io.swagger.annotations.ApiModelProperty(value="b端用户姓名",name="bUserName") private String bUserName; + @Excel(name = "商户操作人", width = 50, orderNum = "5") @io.swagger.annotations.ApiModelProperty(value="b端用户手机号",name="bUserPhone") private String bUserPhone; @Excel(name = "所属商户", width = 50, orderNum = "3") diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java index 8fb7845b6..200879653 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java @@ -843,6 +843,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { //循环list,获取 cUserId List cUserIdList = new ArrayList(); + List bUserIdList = new ArrayList(); // List merchantIdList = new ArrayList(); List couponIdList = new ArrayList(); for (int i = 0 ; i < list.size() ; i ++ ) { @@ -851,6 +852,11 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { if (null != cusrid && (!cUserIdList.contains(cusrid))) { cUserIdList.add(cusrid); } + Long bUserId = bo.getBUserId(); + if(null != bUserId && (!bUserIdList.contains(bUserId))){ + bUserIdList.add(bUserId); + } + // Long bmerchantId = bo.getBMerchantId(); // if (null != bmerchantId && (!merchantIdList.contains(bmerchantId))) { // merchantIdList.add(bmerchantId); @@ -860,6 +866,19 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { couponIdList.add(couponId); } } + + Map buserPhoneMap = new HashMap(); + if(bUserIdList.size() > 0){ + WxMerchantBUser buserQ = new WxMerchantBUser(); + buserQ.updateTenantInfo(tenantEntity); + buserQ.setIds(bUserIdList); + List bUserList = wxMerchantBUserMapper.findSimpleList(buserQ); + if(null != bUserList && bUserList.size() > 0){ + for (WxMerchantBUser bUser: bUserList) { + buserPhoneMap.put(bUser.getId(),bUser.getPhone()); + } + } + } Map merchantNameMap = new HashMap(); // if (null != merchantIdList && merchantIdList.size() > 0 ) { @@ -990,6 +1009,9 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { co.setVerifyMerchantName(merchantNameMap.get(bMechantId)); } //co.setChannelType();) + if(null != co.getBUserId()){ + co.setBUserPhone(buserPhoneMap.get(co.getBUserId())); + } retList.add(co); } catch (IllegalAccessException e) { diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxTopicServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxTopicServiceImpl.java index dede4bbb3..167b8db0f 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxTopicServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxTopicServiceImpl.java @@ -236,7 +236,7 @@ public class WxTopicServiceImpl implements WxTopicService { @Override public WxTopic findCById(WxTopic record) { WxTopic wxTopic = wxTopicMapper.selectById(record.getId()); - if(EnumWxTopicType.SPECIAL_TOPIC.getCode().equals(wxTopic.getTopicType())){ + if(null != wxTopic && EnumWxTopicType.SPECIAL_TOPIC.getCode().equals(wxTopic.getTopicType())){ WxCouponChannel wxCouponChannel = new WxCouponChannel(); wxCouponChannel.updateTenantInfo(wxTopic); wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());