|
|
@@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.webflux.launchadmin.global.BaseException;
|
|
|
+import com.webflux.launchadmin.mysql.controller.applet.req.ByListIdReturnUnlockId;
|
|
|
import com.webflux.launchadmin.mysql.controller.applet.res.AppletH5Data;
|
|
|
import com.webflux.launchadmin.mysql.controller.applet.res.DataRes;
|
|
|
import com.webflux.launchadmin.mysql.entity.applet.AppletIds;
|
|
|
@@ -276,4 +277,28 @@ public class AppletService implements AppletServiceInterface {
|
|
|
});
|
|
|
return RStatus.success(dataResMono);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Mono<RStatus<ByListIdReturnUnlockId>> byListIdReturnUnlockId(ByListIdReturnUnlockId request) {
|
|
|
+ List<Long> ids = request.getIds();
|
|
|
+ String unique = request.getUnique();
|
|
|
+ Mono<ByListIdReturnUnlockId> byListIdReturnUnlockIdMono = Flux.fromIterable(ids)
|
|
|
+ .flatMap(id -> reactiveRedisTemplates.opsForValue().get(unique + "-" + id)
|
|
|
+ .switchIfEmpty(Mono.just("2")).flatMap(f -> {
|
|
|
+ if (Objects.nonNull(f) && "1".equals(f)) {
|
|
|
+ return Mono.just(id);
|
|
|
+ } else {
|
|
|
+ return Mono.just(-1L);
|
|
|
+ }
|
|
|
+ })).collectList().flatMap(list -> {
|
|
|
+ List<Long> collect = list.stream().distinct().filter(aLong -> aLong != -1L).collect(Collectors.toList());
|
|
|
+ ByListIdReturnUnlockId byListIdReturnUnlockId = new ByListIdReturnUnlockId();
|
|
|
+ byListIdReturnUnlockId.setUnique(unique);
|
|
|
+ byListIdReturnUnlockId.setIds(collect);
|
|
|
+ return Mono.just(byListIdReturnUnlockId);
|
|
|
+ });
|
|
|
+ return RStatus.success(byListIdReturnUnlockIdMono);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|