Commit 41fe69ff by 程裕兵

feat:添加半屏小程序

parent 15ec7023
...@@ -60,6 +60,7 @@ import com.jiejing.paycenter.common.model.vo.SubChannelConfigVO; ...@@ -60,6 +60,7 @@ import com.jiejing.paycenter.common.model.vo.SubChannelConfigVO;
import com.jiejing.paycenter.common.model.vo.SubChannelVO; import com.jiejing.paycenter.common.model.vo.SubChannelVO;
import com.jiejing.studio.api.studio.vo.StudioVO; import com.jiejing.studio.api.studio.vo.StudioVO;
import com.jiejing.wechat.WeXcxService; import com.jiejing.wechat.WeXcxService;
import com.jiejing.wechat.vo.xcx.HalfScreenXcxAuthVO;
import com.jiejing.wechat.vo.xcx.HalfScreenXcxAuthVO.AuthXcxInfo; import com.jiejing.wechat.vo.xcx.HalfScreenXcxAuthVO.AuthXcxInfo;
import com.xiaomai.event.EventAgent; import com.xiaomai.event.EventAgent;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
...@@ -291,12 +292,12 @@ public class StudioMerchantServiceImpl implements StudioMerchantService { ...@@ -291,12 +292,12 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
@Override @Override
public void syncEmbeddedXcx() { public void syncEmbeddedXcx() {
List<AuthXcxInfo> list = this.listBoundAppIds(); String systemAppId = this.listSystemXcxAppIds().stream().findFirst().orElse(null);
List<AuthXcxInfo> list = this.listBoundAppIds(systemAppId);
if (CollectionUtil.isEmpty(list)) { if (CollectionUtil.isEmpty(list)) {
return; return;
} }
String systemAppId = this.listSystemXcxAppIds().stream().findFirst().orElse(null);
List<StudioEmbeddedXcxApply> applies = studioEmbeddedXcxApplyRpService.listByAuthorizerAppIds( List<StudioEmbeddedXcxApply> applies = studioEmbeddedXcxApplyRpService.listByAuthorizerAppIds(
wxComponentAppId, systemAppId, list.stream().map(AuthXcxInfo::getAppId).collect(Collectors.toList())); wxComponentAppId, systemAppId, list.stream().map(AuthXcxInfo::getAppId).collect(Collectors.toList()));
if (CollectionUtil.isEmpty(applies)) { if (CollectionUtil.isEmpty(applies)) {
...@@ -338,10 +339,19 @@ public class StudioMerchantServiceImpl implements StudioMerchantService { ...@@ -338,10 +339,19 @@ public class StudioMerchantServiceImpl implements StudioMerchantService {
}); });
} }
private List<AuthXcxInfo> listBoundAppIds() { private List<AuthXcxInfo> listBoundAppIds(String systemAppId) {
// TODO List<AuthXcxInfo> result = new ArrayList<>();
// weXcxService.getHalfScreenXcxAuthList();
return Lists.newArrayList(); int num = 100;
for (int start = 0; start < 10; start++) {
HalfScreenXcxAuthVO vo = weXcxService.listEmbeddedXcx(wxComponentAppId, systemAppId, start, num);
if (CollectionUtil.isEmpty(vo.getWxaEmbeddedList())) {
break;
}
result.addAll(vo.getWxaEmbeddedList());
}
return result;
} }
@Override @Override
......
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