Commit 3cb4aef6 by 程裕兵

feat:rebind xcx appid

parent 2b5ec953
...@@ -36,6 +36,7 @@ import com.jiejing.message.enums.MsgChannelEnum; ...@@ -36,6 +36,7 @@ import com.jiejing.message.enums.MsgChannelEnum;
import com.jiejing.message.event.SendCommonMsgEvent; import com.jiejing.message.event.SendCommonMsgEvent;
import com.jiejing.paycenter.api.merchant.request.ApplyMerchantRequest; import com.jiejing.paycenter.api.merchant.request.ApplyMerchantRequest;
import com.jiejing.paycenter.common.enums.merchant.SubChannelOpenTypeEnums; import com.jiejing.paycenter.common.enums.merchant.SubChannelOpenTypeEnums;
import com.jiejing.paycenter.common.model.request.SubChannelConfigInfo;
import com.jiejing.paycenter.common.model.vo.AuthSubChannelVO; import com.jiejing.paycenter.common.model.vo.AuthSubChannelVO;
import com.jiejing.paycenter.common.model.vo.ConfigSubChannelVO; import com.jiejing.paycenter.common.model.vo.ConfigSubChannelVO;
import com.jiejing.paycenter.common.model.vo.MerchantVO; import com.jiejing.paycenter.common.model.vo.MerchantVO;
...@@ -413,9 +414,14 @@ public class StudioMerchantServiceImpl implements StudioMerchantService { ...@@ -413,9 +414,14 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
if (null == oldMerchantId) { if (null == oldMerchantId) {
return; return;
} }
List<String> systemXcxAppIds = configService.getDefaultBrandSubChannelInfo().getSubChannelConfigs()
.stream().filter(e -> SubChannelConfigTypeEnums.WX_XCX_OFFLINE == e.getConfigType())
.map(SubChannelConfigInfo::getAppId).collect(Collectors.toList());
MerchantVO merchant = merchantRpcService.getByMerchantId(oldMerchantId); MerchantVO merchant = merchantRpcService.getByMerchantId(oldMerchantId);
merchant.getSubChannelConfigs().stream() merchant.getSubChannelConfigs().stream()
.filter(e -> SubChannelConfigTypeEnums.WX_XCX_OFFLINE.name().equals(e.getConfigType())) .filter(e -> SubChannelConfigTypeEnums.WX_XCX_OFFLINE.name().equals(e.getConfigType()))
.filter(e -> !systemXcxAppIds.contains(e.getAppId()))
.forEach( .forEach(
config -> merchantRpcService.bindAppIdWxXcxOffline(merchant.getChannelNo(), newMerchantId, config -> merchantRpcService.bindAppIdWxXcxOffline(merchant.getChannelNo(), newMerchantId,
config.getAppId())); config.getAppId()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment