|
@@ -175,12 +175,9 @@ import java.text.DateFormat;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.Duration;
|
|
|
-import java.time.Instant;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.LocalTime;
|
|
|
-import java.time.ZoneId;
|
|
|
-import java.time.temporal.TemporalAdjusters;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
import java.util.function.Function;
|
|
@@ -242,16 +239,16 @@ public class ApiController {
|
|
|
private final WmPlatformQuizTestResultService platformQuizTestResultService;
|
|
|
|
|
|
private static final String[] RANDOM_QUIZ_URL = {
|
|
|
- "https://lit.yaoyi.net/s/785f65dc549b4b99b5a26da5b4dbcc15",
|
|
|
- "https://lit.yaoyi.net/s/a26d3dfe2e3b44efa2afdd33d756b285",
|
|
|
- "https://lit.yaoyi.net/s/26267505363c428ebc7717b841ed88f7",
|
|
|
- "https://lit.yaoyi.net/s/c1610eb36b22480c934b2ea12233ee89",
|
|
|
- "https://lit.yaoyi.net/s/12a5ca1fc3af4c43a7d7239376032a87",
|
|
|
- "https://lit.yaoyi.net/s/b095a052880147d3a9d967cde3a6d060",
|
|
|
- "https://lit.yaoyi.net/s/b7b6f385852144f3a7402dc844a777ea",
|
|
|
- "https://lit.yaoyi.net/s/711885d5f83840cea76b7715cdd7359a",
|
|
|
- "https://lit.yaoyi.net/s/3c5bac674e1b43c29aab87459216b6ea",
|
|
|
- "https://lit.yaoyi.net/s/dc7f31f6d632493596e1d2e0f8345de9"
|
|
|
+ "生长抑素测试题一|https://lit.yaoyi.net/s/a26d3dfe2e3b44efa2afdd33d756b285",
|
|
|
+ "生长抑素测试题二|https://lit.yaoyi.net/s/26267505363c428ebc7717b841ed88f7",
|
|
|
+ "生长抑素测试题三|https://lit.yaoyi.net/s/c1610eb36b22480c934b2ea12233ee89",
|
|
|
+ "胸腺法新测试题一|https://lit.yaoyi.net/s/12a5ca1fc3af4c43a7d7239376032a87",
|
|
|
+ "胸腺法新测试题二|https://lit.yaoyi.net/s/b095a052880147d3a9d967cde3a6d060",
|
|
|
+ "胸腺法新测试题三|https://lit.yaoyi.net/s/b7b6f385852144f3a7402dc844a777ea",
|
|
|
+ "阿托西班测试题一|https://lit.yaoyi.net/s/711885d5f83840cea76b7715cdd7359a",
|
|
|
+ "阿托西班测试题二|https://lit.yaoyi.net/s/3c5bac674e1b43c29aab87459216b6ea",
|
|
|
+ "阿托西班测试题三|https://lit.yaoyi.net/s/dc7f31f6d632493596e1d2e0f8345de9"
|
|
|
+
|
|
|
};
|
|
|
|
|
|
/**
|
|
@@ -321,8 +318,22 @@ public class ApiController {
|
|
|
break;
|
|
|
case "801":
|
|
|
configMap.put("801", getTaskContentConfigByTaskTypeId("801"));
|
|
|
- int random = new Random().nextInt(RANDOM_QUIZ_URL.length);
|
|
|
- configMap.put("randomUrl", RANDOM_QUIZ_URL[random]);
|
|
|
+
|
|
|
+ HnqzUser user = SecurityUtils.getUser();
|
|
|
+
|
|
|
+
|
|
|
+ String yycUsername = user != null ? user.getUsername() : "";
|
|
|
+
|
|
|
+ List<Map<String, String>> urls = Stream.of(RANDOM_QUIZ_URL).map(url -> {
|
|
|
+ String[] split = url.split("\\|");
|
|
|
+ Map<String, String> quizInfoMap = new HashMap<>(2);
|
|
|
+ quizInfoMap.put("label", split[0]);
|
|
|
+ quizInfoMap.put("url", split[1] + "?yycUsername=" + yycUsername + "&yycPkgId=");
|
|
|
+ return quizInfoMap;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+
|
|
|
+
|
|
|
+ configMap.put("urls", urls);
|
|
|
break;
|
|
|
default:
|
|
|
configMap = getTaskContentConfigByTaskTypeId(taskTypeId);
|