|
|
@@ -98,8 +98,13 @@ public class IpadSendServer {
|
|
|
if(StringUtils.isNotEmpty(fsUser.getAppId())){
|
|
|
// 获取用户看过的小程序ID集合
|
|
|
List<String> miniAppList = Arrays.asList(fsUser.getAppId().split(","));
|
|
|
+ Map<String, Integer> miniSortMap = new HashMap<>();
|
|
|
+ for (int i = 0; i < miniAppList.size(); i++) {
|
|
|
+ miniSortMap.put(miniAppList.get(i), i);
|
|
|
+ }
|
|
|
// 根据小程序ID查询小程序列表
|
|
|
List<FsCoursePlaySourceConfig> configList = playSourceConfigService.selectByAppIds(miniAppList);
|
|
|
+ configList.sort(Comparator.comparing(e -> miniSortMap.getOrDefault(e.getAppid(), 100)));
|
|
|
// 过滤掉完全封禁(status=2)的小程序,只保留正常(status=0)和半封禁(status=1)的小程序
|
|
|
List<FsCoursePlaySourceConfig> availableList = configList.stream()
|
|
|
.filter(e -> e.getStatus() == null || e.getStatus() != 2)
|