From 7084976d7253c3de108699150656cdf07506fe75 Mon Sep 17 00:00:00 2001 From: "@jyuhsin" <729757837@qq.com> Date: Tue, 25 Mar 2025 11:23:50 +0800 Subject: [PATCH] commit --- .../controller/site/SiteManageController.java | 2 +- .../activity/models/ActivitySiteInfo.java | 6 + .../java/io/v/nutz/base/utils/SendMsg.java | 55 +------ .../components/activity/site/ReserveInfo.vue | 28 ++-- .../views/mobile/activity/site/reserve.html | 146 +++++++----------- .../platform/activity/site/SiteManage.html | 49 +++--- .../platform/activity/site/SiteReserve.html | 90 +++++------ 7 files changed, 149 insertions(+), 227 deletions(-) diff --git a/src/main/java/io/v/nutz/activity/controller/site/SiteManageController.java b/src/main/java/io/v/nutz/activity/controller/site/SiteManageController.java index 124a962..17f4043 100644 --- a/src/main/java/io/v/nutz/activity/controller/site/SiteManageController.java +++ b/src/main/java/io/v/nutz/activity/controller/site/SiteManageController.java @@ -72,7 +72,7 @@ public class SiteManageController { @At @ViReturn public Object doEdit(@Param("data") ActivitySiteInfo activitySiteInfo) { - siteInfoService.updateIgnoreNull(activitySiteInfo); + siteInfoService.update(activitySiteInfo); return null; } diff --git a/src/main/java/io/v/nutz/activity/models/ActivitySiteInfo.java b/src/main/java/io/v/nutz/activity/models/ActivitySiteInfo.java index 972e4a7..a487376 100644 --- a/src/main/java/io/v/nutz/activity/models/ActivitySiteInfo.java +++ b/src/main/java/io/v/nutz/activity/models/ActivitySiteInfo.java @@ -2,6 +2,7 @@ package io.v.nutz.activity.models; import lombok.Data; import org.nutz.dao.entity.annotation.*; +import org.nutz.lang.util.NutMap; import java.util.List; @@ -86,4 +87,9 @@ public class ActivitySiteInfo { @Comment("预约时间") @ColDefine(type = ColType.MYSQL_JSON) private List openWeekTime; + + @Column + @Comment("场地的禁用时间") + @ColDefine(type = ColType.MYSQL_JSON) + private List notApplyTimeList; } diff --git a/src/main/java/io/v/nutz/base/utils/SendMsg.java b/src/main/java/io/v/nutz/base/utils/SendMsg.java index 3b2e0ae..8d29007 100644 --- a/src/main/java/io/v/nutz/base/utils/SendMsg.java +++ b/src/main/java/io/v/nutz/base/utils/SendMsg.java @@ -45,67 +45,22 @@ public class SendMsg { * @throws IOException */ public void sendTextMesg(String toUser,String contentValue) throws IOException { - String token = getToken(CORPID,CORPSECRET); - String postData = createPostData(toUser, "text",AGENTID, "content", contentValue); - String response = post("utf-8", CONTENT_TYPE,"https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=", postData, token); - System.out.println("获取到的token======>" + token); - System.out.println("请求数据======>" + postData); - System.out.println("发送微信的响应数据======>" + response); + } public String getToken(String corpId, String corpSecret) throws IOException { - String resp = toAuth( "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" + corpId + "&corpsecret=" + corpSecret);//拼接字符串得到url - Map map = gson.fromJson(resp, - new TypeToken>() { - }.getType()); - System.out.println(map); - return map.get("access_token").toString(); + return ""; } protected String toAuth(String Get_Token_Url) throws IOException { - httpClient = HttpClients.createDefault(); - httpGet = new HttpGet(Get_Token_Url); - CloseableHttpResponse response = httpClient.execute(httpGet); - System.out.println(response.toString()); - String resp; - try { - HttpEntity entity = response.getEntity(); - System.out.println(response.getAllHeaders()); - resp = EntityUtils.toString(entity, "utf-8"); - EntityUtils.consume(entity); - } finally { - response.close(); - } - - return resp; + return ""; } private String createPostData(String touser, String msgtype, int agent_id, String contentKey, String contentValue) { - Map weChatData = new HashMap<>(); - weChatData.put("touser",touser); - weChatData.put("agentid",agent_id); - weChatData.put("msgtype",msgtype); - Map content = new HashMap(); - content.put(contentKey, contentValue); - weChatData.put("text",content); - System.out.println(gson.toJson(weChatData)); - return gson.toJson(weChatData); + return ""; } private String post(String charset, String contentType, String url, String data, String token) throws IOException { - CloseableHttpClient httpclient = HttpClients.createDefault(); - httpPost = new HttpPost(url + token); - httpPost.setHeader(CONTENT_TYPE, contentType); - httpPost.setEntity(new StringEntity(data, charset)); - CloseableHttpResponse response = httpclient.execute(httpPost); - String resp; - try { - HttpEntity entity = response.getEntity(); - resp = EntityUtils.toString(entity, charset); - EntityUtils.consume(entity); - } finally { - response.close(); - } - return resp; + return ""; } diff --git a/src/main/resources/static/components/activity/site/ReserveInfo.vue b/src/main/resources/static/components/activity/site/ReserveInfo.vue index a9b500e..012c4db 100644 --- a/src/main/resources/static/components/activity/site/ReserveInfo.vue +++ b/src/main/resources/static/components/activity/site/ReserveInfo.vue @@ -7,23 +7,23 @@ - -