From 81a5d6f7ab33c0406cc9849660b0a78a9305e9f1 Mon Sep 17 00:00:00 2001 From: JyuHsin <729757837@qq.com> Date: Thu, 19 Jun 2025 10:33:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/io/v/nutz/base/utils/MsgApi.java | 15 ++++++++++++--- .../TheRapyRecuperationConfigController.java | 15 +++++++++++++-- .../mobile/therapyRecuperation/lineList.html | 9 ++++++++- .../basicManage/schoolAudit.html | 4 ++-- 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/src/main/java/io/v/nutz/base/utils/MsgApi.java b/src/main/java/io/v/nutz/base/utils/MsgApi.java index 659428f..eb038e6 100644 --- a/src/main/java/io/v/nutz/base/utils/MsgApi.java +++ b/src/main/java/io/v/nutz/base/utils/MsgApi.java @@ -9,6 +9,8 @@ import io.v.nutz.base.enums.Env; import io.v.nutz.base.model.msgUser; import io.v.nutz.web.commons.base.Globals; import lombok.extern.slf4j.Slf4j; +import org.nutz.http.Header; +import org.nutz.http.Http; import org.nutz.integration.jedis.RedisService; import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.IocBean; @@ -17,6 +19,7 @@ import org.nutz.lang.Lang; import org.nutz.lang.util.NutMap; import java.util.List; +import java.util.Map; /** * @author zxy @@ -62,18 +65,24 @@ public class MsgApi { String msgToken = getMsgToken(); NutMap map = new NutMap(); + List> list = List.of(Map.of("type", "User", "name", "工会测试", "usreId", "LSGH0001")); + map.put("token", msgToken); - map.put("msgTitle", msgTitle); + map.put("msgtitle", msgTitle); map.put("msgContent", msgContent); - map.put("msgType", String.valueOf(msgType)); + map.put("msgType", msgType); map.put("sendStatus", sendStatus); map.put("sendChannel", sendChannel); map.put("sendMode", "normal"); - map.put("receivers", receivers); + map.put("receivers", Json.toJson(list)); map.put("waitLink", waitLink); //发送 map.put("sendMsgType", 1); + Header header = Header.create(); + org.nutz.http.Response response = Http.post3(MSG_API, Json.toJson(map), header, 200000); + System.out.println(response); + HttpRequest request = HttpUtil.createPost(MSG_API) .body(Json.toJson(map)); JSONObject jsonObject = JSON.parseObject(request.execute().body()); diff --git a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/controller/theRapyConfig/TheRapyRecuperationConfigController.java b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/controller/theRapyConfig/TheRapyRecuperationConfigController.java index 2fa9d1a..16505f4 100644 --- a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/controller/theRapyConfig/TheRapyRecuperationConfigController.java +++ b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/controller/theRapyConfig/TheRapyRecuperationConfigController.java @@ -1,6 +1,8 @@ package io.v.nutz.zhgh.therapyRecuperation.controller.theRapyConfig; import io.v.nutz.base.annontation.ViReturn; +import io.v.nutz.base.model.msgUser; +import io.v.nutz.base.utils.MsgApi; import io.v.nutz.zhgh.therapyRecuperation.model.TheRapyRecuperationBaseManagement; import io.v.nutz.zhgh.therapyRecuperation.model.TheRapyRecuperationConfig; import io.v.nutz.zhgh.therapyRecuperation.model.TheRapyRecuperationLine; @@ -40,6 +42,8 @@ public class TheRapyRecuperationConfigController { @Inject private Dao dao; + @Inject + private MsgApi msgApi; @At("") @@ -53,7 +57,14 @@ public class TheRapyRecuperationConfigController { @RequiresAuthentication @Aop(TransAop.READ_COMMITTED) public Object operation(TheRapyRecuperationConfig config, String[] lotDeleteList) { - if (Strings.isNotBlank(config.getId())) { + msgUser msgUser = new msgUser(); + msgUser.setType("User"); + msgUser.setUserId("LSGH0001"); + msgUser.setName("工会测试"); + List users = new ArrayList<>(); + users.add(msgUser); + msgApi.sendMsg("测试", "这是一条测试消息", 1, 1, "WeChat", users, ""); + /*if (Strings.isNotBlank(config.getId())) { if (Lang.isNotEmpty(lotDeleteList)) { dao.clear(TheRapyRecuperationLot.class, Cnd.where("id", "in", lotDeleteList)); } @@ -65,7 +76,7 @@ public class TheRapyRecuperationConfigController { dao.insert(collect); } else { dao.insertWith(config, "lots"); - } + }*/ return null; } diff --git a/src/main/resources/views/mobile/therapyRecuperation/lineList.html b/src/main/resources/views/mobile/therapyRecuperation/lineList.html index 4d9a1d5..de3c1c0 100644 --- a/src/main/resources/views/mobile/therapyRecuperation/lineList.html +++ b/src/main/resources/views/mobile/therapyRecuperation/lineList.html @@ -533,7 +533,7 @@ layout("/mobile/platform.html"){ this.selectLineList.forEach((item, index) => { item.name = '出行时间' + (index + 1) + ' :' + moment(item.playStartTime).format('YYYY-MM-DD') item.maxGroupSize = '最大报名数 :' + item.maxGroupSize - if (this.modifyConfig.familyInfo == 2) { + /*if (this.modifyConfig.familyInfo == 2) { item.subname = '已报人数:' + (item.signUpUserNum + item.signUpUserFamilyNum) + '(家属' + item.signUpUserFamilyNum + '人)' @@ -541,6 +541,13 @@ layout("/mobile/platform.html"){ item.subname = '已报人数:' + (item.signUpUserNum + item.signUpUserFamilyNum) + '(家属' + item.familyNumber + '人)' + }*/ + if (this.modifyConfig.familyInfo == 2) { + item.subname = '已报人数:' + + (item.signUpUserNum + item.signUpUserFamilyNum) + } else { + item.subname = '已报人数:' + + (item.signUpUserNum + item.signUpUserFamilyNum) } }) this.selectLinePopup = true diff --git a/src/main/resources/views/platform/theRapyRecuperation/basicManage/schoolAudit.html b/src/main/resources/views/platform/theRapyRecuperation/basicManage/schoolAudit.html index 530d360..5947fae 100644 --- a/src/main/resources/views/platform/theRapyRecuperation/basicManage/schoolAudit.html +++ b/src/main/resources/views/platform/theRapyRecuperation/basicManage/schoolAudit.html @@ -157,8 +157,8 @@ layout("/layouts/platform.html"){ 取消 - 退回修改 - 拒绝 + 退回修改 + 拒绝 通过