Commit 6d96b46e by huzhenkun

收发一体

parent 656f260d
...@@ -27,7 +27,7 @@ public interface BookClockKeywordBiz { ...@@ -27,7 +27,7 @@ public interface BookClockKeywordBiz {
* @param userWxId * @param userWxId
* @return * @return
*/ */
Boolean sendKeywordMessage(BookClockInfoDTO bookClockInfoDTO, String userWxId, String wechatGroupId); Boolean sendKeywordMessage(BookClockInfoDTO bookClockInfoDTO, String userWxId, String wechatGroupId,String wxId);
/** /**
* 获取微信群某一动作动作关键词 * 获取微信群某一动作动作关键词
......
...@@ -154,7 +154,7 @@ public class BookClockKeywordBizImpl implements BookClockKeywordBiz { ...@@ -154,7 +154,7 @@ public class BookClockKeywordBizImpl implements BookClockKeywordBiz {
*/ */
@Override @Override
@ParamLog("为微信群打卡关键词,发送关键词信息") @ParamLog("为微信群打卡关键词,发送关键词信息")
public Boolean sendKeywordMessage(BookClockInfoDTO bookClockInfoDTO, String userWxId,String wechatGroupId) { public Boolean sendKeywordMessage(BookClockInfoDTO bookClockInfoDTO, String userWxId,String wechatGroupId, String wxId) {
//发送TOPIC进行相关操作 //发送TOPIC进行相关操作
Long originId = bookClockInfoDTO.getOriginId(); Long originId = bookClockInfoDTO.getOriginId();
String originType = bookClockInfoDTO.getOriginType(); String originType = bookClockInfoDTO.getOriginType();
...@@ -170,10 +170,12 @@ public class BookClockKeywordBizImpl implements BookClockKeywordBiz { ...@@ -170,10 +170,12 @@ public class BookClockKeywordBizImpl implements BookClockKeywordBiz {
pushBookClockKeywordDTO.setClassifyId(bookClockInfoDTO.getClassifyId()); pushBookClockKeywordDTO.setClassifyId(bookClockInfoDTO.getClassifyId());
pushBookClockKeywordDTO.setAdviserId(bookClockInfoDTO.getCreateUser()); pushBookClockKeywordDTO.setAdviserId(bookClockInfoDTO.getCreateUser());
pushBookClockKeywordDTO.setBookClockInfoId(bookClockInfoDTO.getBookClockInfoId()); pushBookClockKeywordDTO.setBookClockInfoId(bookClockInfoDTO.getBookClockInfoId());
String robotId = wechatGroupConsr.getRobotIdByGroupId(wechatGroupId); // 收发一体--20190716-HZK
//String robotId = wechatGroupConsr.getRobotIdByGroupId(wechatGroupId);
Long wechatUserId = readerConsr.getWechatUserId(userWxId, bookClockInfoDTO.getChannelId()); Long wechatUserId = readerConsr.getWechatUserId(userWxId, bookClockInfoDTO.getChannelId());
pushBookClockKeywordDTO.setWechatUserId(wechatUserId); pushBookClockKeywordDTO.setWechatUserId(wechatUserId);
pushBookClockKeywordDTO.setRobotId(robotId); pushBookClockKeywordDTO.setRobotId(wxId);
if(OriginTypeEnum.APP.value.equalsIgnoreCase(originType)){ if(OriginTypeEnum.APP.value.equalsIgnoreCase(originType)){
AppDto appDto = appConsr.getBaseById(originId); AppDto appDto = appConsr.getBaseById(originId);
if(null == appDto){ if(null == appDto){
......
...@@ -58,7 +58,7 @@ public class WxGroupSendTextListener { ...@@ -58,7 +58,7 @@ public class WxGroupSendTextListener {
if (!ListUtils.isEmpty(allRobotWxIds) && !allRobotWxIds.contains(wechatUserId) && !StringUtil.isEmpty(sendTextDTO.getTextContent())) { if (!ListUtils.isEmpty(allRobotWxIds) && !allRobotWxIds.contains(wechatUserId) && !StringUtil.isEmpty(sendTextDTO.getTextContent())) {
BookClockInfoDTO bookClockInfoDTO = bookClockCheck.checkKeywordIsClock(sendTextDTO.getTextContent().trim(), sendTextDTO.getWechatGroupId()); BookClockInfoDTO bookClockInfoDTO = bookClockCheck.checkKeywordIsClock(sendTextDTO.getTextContent().trim(), sendTextDTO.getWechatGroupId());
if(null != bookClockInfoDTO){ if(null != bookClockInfoDTO){
bookClockKeywordBiz.sendKeywordMessage(bookClockInfoDTO, wechatUserId,sendTextDTO.getWechatGroupId()); bookClockKeywordBiz.sendKeywordMessage(bookClockInfoDTO, wechatUserId,sendTextDTO.getWechatGroupId(),sendTextDTO.getWxId());
}else{ }else{
final long l = System.currentTimeMillis(); final long l = System.currentTimeMillis();
bookKeywordBiz.sendKeywordMessage(sendTextDTO.getTextContent().trim(), sendTextDTO.getWechatGroupId(), wechatUserId, sendTextDTO.getWxId()); bookKeywordBiz.sendKeywordMessage(sendTextDTO.getTextContent().trim(), sendTextDTO.getWechatGroupId(), wechatUserId, sendTextDTO.getWxId());
......
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