Commit 3eb3cdf2 by 阮思源

Merge branch 'feat-jinji3' into 'master'

紧急3

See merge request rays/pcloud-book!325
parents 3caeb115 2d5f001e
......@@ -49,6 +49,7 @@ import com.pcloud.book.keywords.vo.GuideVO;
import com.pcloud.book.keywords.vo.ReplyMessageVO;
import com.pcloud.book.keywords.vo.SetGuideVO;
import com.pcloud.book.keywords.vo.UpdateGuideVO;
import com.pcloud.book.util.common.ThreadPoolUtils;
import com.pcloud.book.weixinclock.dao.WeixinClockGroupClassifyDao;
import com.pcloud.book.weixinclock.dto.WeixinClockDto;
import com.pcloud.channelcenter.wechat.dto.AccountSettingDto;
......@@ -167,7 +168,7 @@ public class BookGuideBizImpl implements BookGuideBiz {
List<SelfRobotKeyword> selfRobotKeywords = selfRobotKeywordDao.getListByBookGroupId(bookGroupId);
if (!ListUtils.isEmpty(selfRobotKeywords)){
try {
String content="你可以通过以下方式唤醒我,让我知道你的学习需求";
String content="现在你试试回复我定制一套「背单词」读书计划 [ ]内关键词来唤醒我";
SendTextMessageVO voh = new SendTextMessageVO();
voh.setContent(content);
voh.setCode(SendMessageTypeEnum.SELF.getCode());
......@@ -181,22 +182,24 @@ public class BookGuideBizImpl implements BookGuideBiz {
} catch (InterruptedException e) {
log.error("发消息休眠5秒出错", e);
}
for (SelfRobotKeyword selfRobotKeyword:selfRobotKeywords){
try {
SendTextMessageVO vo = new SendTextMessageVO();
vo.setContent(selfRobotKeyword.getGuide());
vo.setCode(SendMessageTypeEnum.SELF.getCode());
vo.setWxId(agreeAddUserDTO.getRobotWxId());
vo.setAltId(agreeAddUserDTO.getRobotWxId());
vo.setWxGroupId(agreeAddUserDTO.getUserWxId());
vo.setIp(agreeAddUserDTO.getIp());
WxGroupSDK.sendTextMessage(vo);
log.info("临时demo发送个人号加好友信息"+vo.toString());
Thread.sleep(5000);
} catch (InterruptedException e) {
log.error("发消息休眠5秒出错", e);
ThreadPoolUtils.SEND_MESSAGE_THREAD_POOL.execute(()->{
for (SelfRobotKeyword selfRobotKeyword:selfRobotKeywords){
try {
SendTextMessageVO vo = new SendTextMessageVO();
vo.setContent(selfRobotKeyword.getGuide());
vo.setCode(SendMessageTypeEnum.SELF.getCode());
vo.setWxId(agreeAddUserDTO.getRobotWxId());
vo.setAltId(agreeAddUserDTO.getRobotWxId());
vo.setWxGroupId(agreeAddUserDTO.getUserWxId());
vo.setIp(agreeAddUserDTO.getIp());
WxGroupSDK.sendTextMessage(vo);
log.info("临时demo发送个人号加好友信息"+vo.toString());
Thread.sleep(1000*30);
} catch (InterruptedException e) {
log.error("发消息休眠5秒出错", e);
}
}
}
});
}
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment