Commit 41fe69ff by 程裕兵

feat:添加半屏小程序

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