pref#hmc_答题按顺序排列、移动端题目未作答动态提示,发送短信打印发送内容

This commit is contained in:
Paidax
2025-12-16 18:19:15 +08:00
parent bf81537617
commit 1aea81aae1
3 changed files with 17 additions and 10 deletions
@@ -88,15 +88,15 @@ public class MsgApi {
String msgToken = getMsgToken();
// 封装发送消息的参数
NutMap map = createMessageMap(channels, sublist, mtype, title, content, imageUrl, link);
System.out.println(map);
log.info("短信发送内容:{}", map);
// 发送请求
JSONObject jsonObject = sendRequest(msgToken, map);
// 判断发送结果
int status = jsonObject.getInteger("code");
if (status == 200) {
log.info("=================================================================================================发送成功: {}", jsonObject.toJSONString());
log.info("==================================================发送成功: {}", jsonObject.toJSONString());
} else {
log.error("=================================================================================================发送失败: {}", jsonObject.toJSONString());
log.error("==================================================发送失败: {}", jsonObject.toJSONString());
throw new RuntimeException("Message sending failed with status code: " + status + ", Message: " + jsonObject.getString("message"));
}
}
@@ -144,15 +144,15 @@ public class MsgApi {
String msgToken = getMsgToken();
// 封装发送消息的参数
NutMap map = createMessageMap(channels, sublist, mtype, title, content, imageUrl, link);
System.out.println(map);
log.info("短信发送内容:{}", map);
// 发送请求
JSONObject jsonObject = sendRequest(msgToken, map);
// 判断发送结果
int status = jsonObject.getInteger("code");
if (status == 200) {
log.info("=================================================================================================发送成功: {}", jsonObject.toJSONString());
log.info("==================================================发送成功: {}", jsonObject.toJSONString());
} else {
log.error("=================================================================================================发送失败: {}", jsonObject.toJSONString());
log.error("==================================================发送失败: {}", jsonObject.toJSONString());
throw new RuntimeException("Message sending failed with status code: " + status + ", Message: " + jsonObject.getString("message"));
}
}
@@ -223,7 +223,7 @@ public class QsvSurveyServiceImpl extends BaseServiceImpl<QsvUserAnswerRecord> i
// List<JSONObject> answerExtList = answerRecords.stream().map(QsvUserAnswerRecord::getExtJson).toList();
// 查询活动题目列表
List<QsvSubject> subjects = dao().query(QsvSubject.class, Cnd.where("activityId", "=", activityId));
List<QsvSubject> subjects = dao().query(QsvSubject.class, Cnd.where("activityId", "=", activityId).asc("sortNum"));
// 将题目列表转换为Map
Map<String, QsvSubject> subjectMap = subjects.stream().collect(Collectors.toMap(QsvSubject::getId, v -> v));
// 获取题目ID列表
@@ -298,10 +298,17 @@ layout("/mobile/platform.html"){
return
}
} else if ("text" === subject.type) {
if (!subject.userFillContent) {
this.$toast.fail("第" + (i + 1) + "题未作答")
return
if(this.id==="726629ca0d074569bb1142353c5b932f"){
if([2,4,6,7,9].includes(i + 1)){
}
}else{
if (!subject.userFillContent) {
this.$toast.fail("第" + (i + 1) + "题未作答")
return
}
}
}
}
this.autoSubmit()