|
|
|
@@ -148,15 +148,16 @@ public class WxMsgServiceImpl implements WxMsgService { |
|
|
|
wxMsg.setCouponInject(null); |
|
|
|
wxMsg.setMsgType(EnumMsgRecordType.SMS_CALLBACK.getCode()); |
|
|
|
wxMsg.setReceiver(wxMsg.getPhones()); |
|
|
|
wxMsgMapper.insert(wxMsg); |
|
|
|
mqBaseProducer.sendMessage(wxMsg, EnumMsgMqTopic.DEFAULT.getCode(),EnumMsgMqTag.DEFAULT.getCode(),null); |
|
|
|
} |
|
|
|
}else if(wxMsg.getWay() == EnumSendWay.APPINFOR.getCode()){ |
|
|
|
wxMsgMapper.insert(wxMsg); |
|
|
|
batchSendAppinfo(wxMsg); |
|
|
|
}else{ |
|
|
|
return new ResultData(ErrorCode.MSG_REQUEST_PARAMS_ERROR); |
|
|
|
} |
|
|
|
|
|
|
|
wxMsgMapper.insert(wxMsg); |
|
|
|
return new ResultData(Result.SUCCESS, "消息已发送"); |
|
|
|
} else { |
|
|
|
wxMsg.setStatus(EnumMsgStatus.MSG_STATUS_NOT_SEND.getCode()); |
|
|
|
@@ -182,14 +183,16 @@ public class WxMsgServiceImpl implements WxMsgService { |
|
|
|
wxMsg.setWxMsgConfig(wxMsgConfig); |
|
|
|
wxMsg.setMsgType(EnumMsgRecordType.SMS_CALLBACK.getCode()); |
|
|
|
wxMsg.setReceiver(wxMsg.getPhones()); |
|
|
|
wxMsgMapper.updateById(wxMsg); |
|
|
|
mqBaseProducer.sendMessage(wxMsg, EnumMsgMqTopic.DEFAULT.getCode(),EnumMsgMqTag.DEFAULT.getCode(),EnumMsgMqKey.DEFAULT.getCode()); |
|
|
|
} |
|
|
|
}else if(wxMsg.getWay() == EnumSendWay.APPINFOR.getCode()){ |
|
|
|
wxMsgMapper.updateById(wxMsg); |
|
|
|
batchSendAppinfo(wxMsg); |
|
|
|
}else{ |
|
|
|
return new ResultData(ErrorCode.MSG_REQUEST_PARAMS_ERROR); |
|
|
|
} |
|
|
|
wxMsgMapper.updateById(wxMsg); |
|
|
|
|
|
|
|
return new ResultData(Result.SUCCESS, "消息已发送"); |
|
|
|
} else { |
|
|
|
//定时 |
|
|
|
|