Commit 3db0a744 by 程裕兵

feat:添加半屏小程序

parent 81347470
...@@ -57,14 +57,14 @@ public class StudioEmbeddedXcxApply implements Serializable { ...@@ -57,14 +57,14 @@ public class StudioEmbeddedXcxApply implements Serializable {
private String componentAppId; private String componentAppId;
/** /**
* 备注: 授权方appId(专属小程序) 是否允许为null: YES * 备注: 授权方appId(申请小程序appId) 是否允许为null: YES
*/ */
private String authorizerAppId; private String authorizerAppId;
/** /**
* 备注: 支付小程序appId 是否允许为null: YES * 备注: 半屏小程序appId 是否允许为null: YES
*/ */
private String appId; private String embeddedAppId;
/** /**
* 备注: 状态 是否允许为null: YES * 备注: 状态 是否允许为null: YES
...@@ -95,7 +95,7 @@ public class StudioEmbeddedXcxApply implements Serializable { ...@@ -95,7 +95,7 @@ public class StudioEmbeddedXcxApply implements Serializable {
public static final String AUTHORIZER_APP_ID = "authorizer_app_id"; public static final String AUTHORIZER_APP_ID = "authorizer_app_id";
public static final String APP_ID = "app_id"; public static final String EMBEDDED_APP_ID = "embedded_app_id";
public static final String STATE = "state"; public static final String STATE = "state";
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, studio_id, component_app_id, authorizer_app_id, app_id, state, message, create_time, update_time id, studio_id, component_app_id, embedded_app_id, authorizer_app_id, state, message, create_time, update_time
</sql> </sql>
</mapper> </mapper>
...@@ -39,7 +39,7 @@ public class StudioEmbeddedXcxApplyRpService extends ...@@ -39,7 +39,7 @@ public class StudioEmbeddedXcxApplyRpService extends
public Map<String, StudioEmbeddedXcxApply> mapByStudioIdAndAppId(Long studioId, public Map<String, StudioEmbeddedXcxApply> mapByStudioIdAndAppId(Long studioId,
String componentAppId, String embeddedAppId, List<String> appIds) { String componentAppId, String embeddedAppId, List<String> appIds) {
return this.listByStudioIdAndAppId(studioId, componentAppId, embeddedAppId, appIds) return this.listByStudioIdAndAppId(studioId, componentAppId, embeddedAppId, appIds)
.stream().collect(Collectors.toMap(StudioEmbeddedXcxApply::getAppId, e -> e)); .stream().collect(Collectors.toMap(StudioEmbeddedXcxApply::getAuthorizerAppId, e -> e));
} }
public List<StudioEmbeddedXcxApply> listByStudioIdAndAppId(Long studioId, String componentAppId, public List<StudioEmbeddedXcxApply> listByStudioIdAndAppId(Long studioId, String componentAppId,
...@@ -47,7 +47,7 @@ public class StudioEmbeddedXcxApplyRpService extends ...@@ -47,7 +47,7 @@ public class StudioEmbeddedXcxApplyRpService extends
QueryWrapper<StudioEmbeddedXcxApply> wrapper = new QueryWrapper<>(); QueryWrapper<StudioEmbeddedXcxApply> wrapper = new QueryWrapper<>();
wrapper.eq(StudioEmbeddedXcxApply.STUDIO_ID, studioId); wrapper.eq(StudioEmbeddedXcxApply.STUDIO_ID, studioId);
wrapper.eq(StudioEmbeddedXcxApply.COMPONENT_APP_ID, componentAppId); wrapper.eq(StudioEmbeddedXcxApply.COMPONENT_APP_ID, componentAppId);
wrapper.eq(StudioEmbeddedXcxApply.APP_ID, embeddedAppId); wrapper.eq(StudioEmbeddedXcxApply.EMBEDDED_APP_ID, embeddedAppId);
wrapper.in(StudioEmbeddedXcxApply.AUTHORIZER_APP_ID, appIds); wrapper.in(StudioEmbeddedXcxApply.AUTHORIZER_APP_ID, appIds);
return Optional.ofNullable(this.baseMapper.selectList(wrapper)).orElse(new ArrayList<>(1)); return Optional.ofNullable(this.baseMapper.selectList(wrapper)).orElse(new ArrayList<>(1));
} }
...@@ -57,7 +57,7 @@ public class StudioEmbeddedXcxApplyRpService extends ...@@ -57,7 +57,7 @@ public class StudioEmbeddedXcxApplyRpService extends
QueryWrapper<StudioEmbeddedXcxApply> wrapper = new QueryWrapper<>(); QueryWrapper<StudioEmbeddedXcxApply> wrapper = new QueryWrapper<>();
wrapper.eq(StudioEmbeddedXcxApply.STUDIO_ID, studioId); wrapper.eq(StudioEmbeddedXcxApply.STUDIO_ID, studioId);
wrapper.eq(StudioEmbeddedXcxApply.COMPONENT_APP_ID, componentAppId); wrapper.eq(StudioEmbeddedXcxApply.COMPONENT_APP_ID, componentAppId);
wrapper.eq(StudioEmbeddedXcxApply.APP_ID, embeddedAppId); wrapper.eq(StudioEmbeddedXcxApply.EMBEDDED_APP_ID, embeddedAppId);
wrapper.eq(StudioEmbeddedXcxApply.AUTHORIZER_APP_ID, appId); wrapper.eq(StudioEmbeddedXcxApply.AUTHORIZER_APP_ID, appId);
return Optional.ofNullable(this.baseMapper.selectList(wrapper)) return Optional.ofNullable(this.baseMapper.selectList(wrapper))
.orElse(new ArrayList<>(1)) .orElse(new ArrayList<>(1))
...@@ -68,7 +68,7 @@ public class StudioEmbeddedXcxApplyRpService extends ...@@ -68,7 +68,7 @@ public class StudioEmbeddedXcxApplyRpService extends
List<String> appIds) { List<String> appIds) {
QueryWrapper<StudioEmbeddedXcxApply> wrapper = new QueryWrapper<>(); QueryWrapper<StudioEmbeddedXcxApply> wrapper = new QueryWrapper<>();
wrapper.eq(StudioEmbeddedXcxApply.COMPONENT_APP_ID, componentAppId); wrapper.eq(StudioEmbeddedXcxApply.COMPONENT_APP_ID, componentAppId);
wrapper.eq(StudioEmbeddedXcxApply.APP_ID, embeddedAppId); wrapper.eq(StudioEmbeddedXcxApply.EMBEDDED_APP_ID, embeddedAppId);
wrapper.in(StudioEmbeddedXcxApply.AUTHORIZER_APP_ID, appIds); wrapper.in(StudioEmbeddedXcxApply.AUTHORIZER_APP_ID, appIds);
return Optional.ofNullable(this.baseMapper.selectList(wrapper)).orElse(new ArrayList<>(1)); return Optional.ofNullable(this.baseMapper.selectList(wrapper)).orElse(new ArrayList<>(1));
} }
......
...@@ -22,7 +22,7 @@ public class StudioEmbeddedXcxConvert { ...@@ -22,7 +22,7 @@ public class StudioEmbeddedXcxConvert {
record.setId(IdWorker.getId()); record.setId(IdWorker.getId());
record.setComponentAppId(componentAppId); record.setComponentAppId(componentAppId);
record.setAuthorizerAppId(appId); record.setAuthorizerAppId(appId);
record.setAppId(embeddedAppId); record.setEmbeddedAppId(embeddedAppId);
record.setStudioId(studioId); record.setStudioId(studioId);
record.setState(EmbededXcxEnum.INIT.getCode()); record.setState(EmbededXcxEnum.INIT.getCode());
record.setCreateTime(new Date()); record.setCreateTime(new Date());
...@@ -51,7 +51,7 @@ public class StudioEmbeddedXcxConvert { ...@@ -51,7 +51,7 @@ public class StudioEmbeddedXcxConvert {
public static List<Long> filterAppIds(List<StudioEmbeddedXcxApply> applies, List<String> appIds) { public static List<Long> filterAppIds(List<StudioEmbeddedXcxApply> applies, List<String> appIds) {
return applies.stream() return applies.stream()
.filter(e -> !EmbededXcxEnum.SUCCESS.getCode().equals(e.getState())) .filter(e -> !EmbededXcxEnum.SUCCESS.getCode().equals(e.getState()))
.filter(e -> appIds.contains(e.getAppId())) .filter(e -> appIds.contains(e.getAuthorizerAppId()))
.map(StudioEmbeddedXcxApply::getId) .map(StudioEmbeddedXcxApply::getId)
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
...@@ -61,9 +61,9 @@ public class StudioEmbeddedXcxConvert { ...@@ -61,9 +61,9 @@ public class StudioEmbeddedXcxConvert {
Map<String, AuthXcxInfo> map = authXcxInfos.stream() Map<String, AuthXcxInfo> map = authXcxInfos.stream()
.collect(Collectors.toMap(AuthXcxInfo::getAppId, e -> e)); .collect(Collectors.toMap(AuthXcxInfo::getAppId, e -> e));
return applies.stream() return applies.stream()
.filter(e -> null != map.get(e.getAppId())) .filter(e -> null != map.get(e.getAuthorizerAppId()))
.filter(e -> { .filter(e -> {
AuthXcxInfo info = map.get(e.getAppId()); AuthXcxInfo info = map.get(e.getAuthorizerAppId());
return EmbededXcxEnum.valueOf(e.getState()) != EmbededXcxEnum.getByWxCode( return EmbededXcxEnum.valueOf(e.getState()) != EmbededXcxEnum.getByWxCode(
Integer.parseInt(info.getStatus())); Integer.parseInt(info.getStatus()));
}) })
......
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