From 0537e743b59ef8c12b17f21b4e081ed02382fb35 Mon Sep 17 00:00:00 2001
From: bamanker <27054792@qq.com>
Date: Sat, 6 May 2023 10:41:37 +0800
Subject: [PATCH] =?UTF-8?q?0.1.3=EF=BC=9A=E6=A0=B9=E6=8D=AE=E5=BE=AE?=
=?UTF-8?q?=E4=BF=A1=E5=85=AC=E4=BC=97=E5=8F=B7=E6=A8=A1=E6=9D=BF=E6=B6=88?=
=?UTF-8?q?=E6=81=AF=E6=9C=80=E6=96=B0=E8=A7=84=E5=88=99=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E4=BA=86=E6=8E=A8=E9=80=81=E4=BF=A1=E6=81=AF=E6=A0=BC=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 2 +-
.../dailylove/config/DailyLoveConfigure.java | 4 +--
.../controller/PushDailyController.java | 36 +++++++++----------
src/main/resources/bootstrap.yml | 4 +--
4 files changed, 22 insertions(+), 24 deletions(-)
diff --git a/pom.xml b/pom.xml
index bbc8db5..5724c74 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
com.bamanker
dailyLove
- 0.1.2
+ 0.1.3
dailyLove
dailyLove
diff --git a/src/main/java/com/bamanker/dailylove/config/DailyLoveConfigure.java b/src/main/java/com/bamanker/dailylove/config/DailyLoveConfigure.java
index ae25ff5..8062298 100644
--- a/src/main/java/com/bamanker/dailylove/config/DailyLoveConfigure.java
+++ b/src/main/java/com/bamanker/dailylove/config/DailyLoveConfigure.java
@@ -7,9 +7,8 @@ import org.springframework.stereotype.Component;
@Component
@RefreshScope
public class DailyLoveConfigure {
-
// public static String Access_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={0}&secret={1}";
-// public static String Send_URL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token={0}";
+ // public static String Send_URL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token={0}";
public static String Color_quality;
public static String Color_morning;
public static String Color_chineseDate;
@@ -26,7 +25,6 @@ public class DailyLoveConfigure {
public static String Color_dailyEn;
public static String Color_gbir;
public static String Color_bbir;
-
public static String Color_cbir;
public static String Color_loveDay;
public static String Color_remark;
diff --git a/src/main/java/com/bamanker/dailylove/controller/PushDailyController.java b/src/main/java/com/bamanker/dailylove/controller/PushDailyController.java
index 80aa30b..0296878 100644
--- a/src/main/java/com/bamanker/dailylove/controller/PushDailyController.java
+++ b/src/main/java/com/bamanker/dailylove/controller/PushDailyController.java
@@ -94,21 +94,21 @@ public class PushDailyController {
log.debug("cbir_day:{}", catBirthdays);
resultVo.setAttribute("cbir_day", new DataItem(catBirthdays - 1 + "", DailyLoveConfigure.Color_cbir));
- String remark = "❤";
+ String words = "普通的一天";
if (DataUtils.getBirthdays(DailyLoveConfigure.Love_Day) == 1) {
- remark = "明天是恋爱周年纪念日!永远爱你~mua";
+ words = "明天是恋爱周年纪念日!永远爱你~mua";
} else if ((DataUtils.getLoveDays(DailyLoveConfigure.Love_Day)) % 100 == 1) {
- remark = "明天是恋爱百日纪念日!提前庆祝哦~";
+ words = "明天是恋爱百日纪念日!提前庆祝哦~";
} else if (girlBirthdays == 1) {
- remark = "明天是lili大宝贝的生日啦";
+ words = "明天是lili大宝贝的生日啦";
} else if (boyBirthdays == 1) {
- remark = "明天是songsong的生日!别忘了哦~";
+ words = "明天是ss的生日!别忘了哦~";
} else if (catBirthdays == 1) {
- remark = "明天是小离谱的生日!别忘了给她最爱的小鱼干!";
+ words = "明天是小离谱的生日!别忘了小鱼干!";
}
- resultVo.setAttribute("remark", new DataItem(remark, DailyLoveConfigure.Color_remark));
+ resultVo.setAttribute("words", new DataItem(words, DailyLoveConfigure.Color_remark));
int loveDays = DataUtils.getLoveDays(DailyLoveConfigure.Love_Day);
log.debug("love_day:{}", loveDays);
@@ -140,7 +140,7 @@ public class PushDailyController {
String weatherResp = dataRemoteClient.getWeather(param1);
Weather weather = JSONObject.parseObject(weatherResp).getJSONArray("result").getJSONObject(0).toJavaObject(Weather.class);
- ;
+
ResultVo resultVo = ResultVo.initializeResultVo(DailyLoveConfigure.Open_ID,
DailyLoveConfigure.Template_ID_Morning,
@@ -157,9 +157,9 @@ public class PushDailyController {
TianXinReqParam param2 = new TianXinReqParam();
param2.setKey(DailyLoveConfigure.TianXin_Key);
- String tipsResp = dataRemoteClient.getTips(param2);
- String tips = JSONObject.parseObject(tipsResp).getJSONArray("result").getJSONObject(0).getString("content");
- resultVo.setAttribute("tips", new DataItem(tips, DailyLoveConfigure.Color_tips));
+// String tipsResp = dataRemoteClient.getTips(param2);
+// String tips = JSONObject.parseObject(tipsResp).getJSONArray("result").getJSONObject(0).getString("content");
+// resultVo.setAttribute("tips", new DataItem(tips, DailyLoveConfigure.Color_tips));
String morningResp = dataRemoteClient.getMorning(param2);
String morning = JSONObject.parseObject(morningResp).getJSONArray("result").getJSONObject(0).getString("content");
@@ -195,21 +195,21 @@ public class PushDailyController {
log.debug("cbir_day:{}", catBirthdays);
resultVo.setAttribute("cbir_day", new DataItem(catBirthdays + "", DailyLoveConfigure.Color_cbir));
- String remark = "❤";
+ String words = "普通的一天";
if (DataUtils.getBirthdays(DailyLoveConfigure.Love_Day) == 0) {
- remark = "今天是恋爱周年纪念日!永远爱你~mua";
+ words = "今天是恋爱周年纪念日!永远爱你~mua";
} else if ((DataUtils.getLoveDays(DailyLoveConfigure.Love_Day)) % 100 == 0) {
- remark = "今天是恋爱百日纪念日!永远爱你~";
+ words = "今天是恋爱百日纪念日!永远爱你~";
} else if (girlBirthdays == 0) {
- remark = "今天是lili大宝贝的生日!生日快乐哟~";
+ words = "今天是lili宝贝的生日!生日快乐哟~";
} else if (boyBirthdays == 0) {
- remark = "今天是songsong的生日!别忘了好好爱他~";
+ words = "今天是ss的生日!别忘了好好爱他~";
} else if (catBirthdays == 0) {
- remark = "今天是小离谱的生日!别忘了给她最爱的小鱼干!";
+ words = "今天是小离谱的生日!别忘了小鱼干!";
}
- resultVo.setAttribute("remark", new DataItem(remark, DailyLoveConfigure.Color_remark));
+ resultVo.setAttribute("words", new DataItem(words, DailyLoveConfigure.Color_remark));
int loveDays = DataUtils.getLoveDays(DailyLoveConfigure.Love_Day);
log.debug("love_day:{}", loveDays);
diff --git a/src/main/resources/bootstrap.yml b/src/main/resources/bootstrap.yml
index 54ae38c..a9cdcab 100644
--- a/src/main/resources/bootstrap.yml
+++ b/src/main/resources/bootstrap.yml
@@ -35,8 +35,8 @@ wechat:
#ME: oo5bL6bK_4TC0tb-Wa5oiugTPVeQ
#LILI: oo5bL6QafHJa9zQNYKS0fIhFC0zM
open-id: oo5bL6QafHJa9zQNYKS0fIhFC0zM
- template-id-morning: 8y1RxNHUUA37MRzo7syW4B2Cl-SChiKkpYzA6EO4hG4
- template-id-night: BaOHtLQ1o4wBS8Dcjrbd3KeGUawjjg-6_aC_9ZOlL3E
+ template-id-morning: 1yx1fahCs923nOmMh0_KLWN0nXGKd8_pHQrfpdMblrQ
+ template-id-night: QG-5NBX-jip46ulGVsaE3Uhl30GUxvNmtKOxwMHFkx0
color:
now: '#99CCCC'