Commit 54e54fec by zhaolianjie

Merge remote-tracking branch 'origin/master'

2 parents 43dae2c0 af45663d
......@@ -40,13 +40,7 @@ import javax.annotation.Resource;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import java.util.stream.Stream;
......@@ -111,7 +105,7 @@ public class FeiShuEventController {
@PostMapping("/msg_card")
public JSONObject msgCardEvent(@RequestBody String s) throws Exception {
JSONObject reqJsonObject = JSON.parseObject(s);
System.out.println(s);
log.info("msgCardEvent s {}",s);
if (reqJsonObject.containsKey("challenge")) {
return reqJsonObject;
}
......@@ -168,6 +162,12 @@ public class FeiShuEventController {
noticePain.setStatus(1);
painService.update(noticePain);
massageService.updateSingleMassageMsgCardWhenBegin(noticePain.getMessageId());
//加急
//发送应用内提醒
JSONObject noticeMsg = new JSONObject();
noticeMsg.put("user_id_list", Collections.singletonList(noticePain.getOpenId()));
log.info("发送应用内容消息提醒");
feiShuApiService.patchUrgentApp(noticePain.getMessageId(), noticeMsg);
//按摩群中同步发送按摩进度信息
FeiShuMsgDTO feiShuMsgDTO = new FeiShuMsgDTO();
String msg = "当前按摩进度:" + String.format("<at user_id=\\\"%s\\\">%s</at>", noticePain.getOpenId(), noticePain.getName());
......
......@@ -449,7 +449,7 @@ public class FeiShuApiService {
public String queryChatId() {
List<ChatMessage> list = chatMessageService.findAll();
if (CollectionUtil.isEmpty(list) || list.size() > 1) {
if (CollectionUtil.isEmpty(list)) {
return null;
}
List<ChatMessage> remainList = list.stream().filter(chatMessage1 -> ObjectUtil.equal(chatMessage1.getType(), 11)
......
......@@ -164,7 +164,7 @@ public class MassageNoticeScheduleService {
@Scheduled(cron = "0 0 19 * * ?")
public void deleteChatList() {
String chatId = feiShuApiService.queryChatId();
if (StringUtils.isEmpty(chatId)) {
if (StringUtils.isEmpty(chatId) || chatId.equals(feiShuConfig.getChatId())) {
return;
}
feiShuApiService.deleteChatList(chatId);
......@@ -175,7 +175,7 @@ public class MassageNoticeScheduleService {
* 当天时间2:55,给第一波三个人更新卡片,并发送应用内提醒
*/
// @Async
@Scheduled(cron = "0 55 14 ? * THU")
/*@Scheduled(cron = "0 55 14 ? * THU")
public void massageStart() {
List<Pain> pains = painService.findListAsc(3);
// String msg = "{\"text\":\"当前按摩进度:<at user_id=\\\"%s\\\">%s</at> <at user_id=\\\"%s\\\">%s</at> <at user_id=\\\"%s\\\">%s</at>\"}";
......@@ -205,6 +205,6 @@ public class MassageNoticeScheduleService {
feiShuMsgDTO.setReceiveId(chatId);
feiShuApiService.sendMsg(feiShuMsgDTO, "chat_id");
}
}*/
}
......@@ -65,7 +65,7 @@
</where>
</select>
<update id="updateByOpenId" parameterType="java.lang.Integer">
<update id="updateByOpenId">
update t_pain set open_id = #{robOpenId},
name = #{robName} where open_id = #{oldOpenId}
</update>
......
......@@ -7,7 +7,7 @@
{
"tag": "div",
"text": {
"content": "1. 按摩时间15:00-17:30;\n2. 按摩时长每人15分钟,3人一组,按照图片顺序从上至下依次进行;\n3. 按完记得在自己的卡片上点击完成哦,系统会自动通知下一位成员;\n4. 点击放弃,名额将会发送到大群秒杀,先到先得;\n5. 有事暂时来不了,可以推迟到队伍最后;\n",
"content": "1. 按摩时间15:00-17:30;\n2. 按摩时长每人15分钟,3人一组,按照图片顺序从上至下依次进行;\n3. 点击放弃,名额将会发送到大群秒杀,先到先得;\n4. 有事暂时来不了,可以推迟到队伍最后;\n",
"tag": "lark_md"
}
},
......@@ -23,7 +23,7 @@
"header": {
"template": "red",
"title": {
"content": "🔔 叮~今日份B27-14按摩名单,记得给我投票哦!",
"content": "🔔 叮~今日份B27-14按摩名单",
"tag": "plain_text"
}
}
......
......@@ -7,7 +7,7 @@
{
"tag": "div",
"text": {
"content": "欢呼吧,你本周有按摩名额哦!记得给我投票哦!",
"content": "欢呼吧,你本周有按摩名额哦!",
"tag": "lark_md"
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!