This commit is contained in:
JyuHsin
2025-06-19 10:33:25 +08:00
parent 29e1641208
commit 81a5d6f7ab
4 changed files with 35 additions and 8 deletions
+12 -3
View File
@@ -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<Map<String, String>> 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());
@@ -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<msgUser> 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;
}
@@ -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
@@ -157,8 +157,8 @@ layout("/layouts/platform.html"){
</el-descriptions>
<el-row type="flex" justify="end" align="center" style="padding: 20px">
<el-button @click="$refs.guava.index()">取消</el-button>
<el-button @click="onAudit(2)" type="info">退回修改</el-button>
<el-button @click="onAudit(3)" type="info">拒绝</el-button>
<el-button @click="onAudit(2)" type="danger">退回修改</el-button>
<el-button @click="onAudit(3)" type="danger">拒绝</el-button>
<el-button @click="onAudit(4)" type="primary">通过</el-button>
</el-row>
</el-form>