|
|
|
@@ -8,12 +8,13 @@ import com.iformall.common.IdWorker; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
import com.iformall.enums.EnumMsgModel; |
|
|
|
import com.iformall.enums.EnumMsgSendStatus; |
|
|
|
import com.iformall.enums.EnumVerifyCode; |
|
|
|
import com.iformall.domain.po.msg.WxMsgRecord; |
|
|
|
import com.iformall.enums.*; |
|
|
|
import com.iformall.mapper.*; |
|
|
|
import com.iformall.mq.MqBaseProducer; |
|
|
|
import com.iformall.service.WxMsgValidationcodeService; |
|
|
|
import com.iformall.utils.*; |
|
|
|
import org.apache.commons.collections.map.HashedMap; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@@ -48,6 +49,9 @@ public class WxMsgValidationcodeServiceImpl implements WxMsgValidationcodeServic |
|
|
|
@Autowired |
|
|
|
WxMsgCallbackMapper wxMsgCallbackMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
MqBaseProducer mqBaseProducer; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageInfo<WxMsgValidationcode> listAsPage(WxMsgValidationcode record, Integer pageIndex, Integer pageSize) { |
|
|
|
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMsgValidationcodeMapper.findList(record)); |
|
|
|
@@ -107,7 +111,6 @@ public class WxMsgValidationcodeServiceImpl implements WxMsgValidationcodeServic |
|
|
|
wxMsgValidationcodeModel = wxMsgValidationcodeModelMapper.findList(wxMsgValidationcodeModel).get(0); |
|
|
|
wxMsgValidationcode.setSignature(wxMsgValidationcodeModel.getSignature()); |
|
|
|
|
|
|
|
|
|
|
|
String secret = wxMsgConfig.getSecret(); |
|
|
|
String bid = wxMsgConfig.getBid(); |
|
|
|
String publickey = wxMsgConfig.getPublickey(); |
|
|
|
@@ -121,6 +124,21 @@ public class WxMsgValidationcodeServiceImpl implements WxMsgValidationcodeServic |
|
|
|
wxMsgValidationcode.setMsg(msg); |
|
|
|
String notifyUrl = wxMsgConfig.getNotifyurl(); |
|
|
|
Integer modelId = wxMsgValidationcodeModel.getModelId(); |
|
|
|
|
|
|
|
|
|
|
|
//给发起人发送驳回消息 |
|
|
|
// Map<String,String> msgReplaceMap = new HashedMap(); |
|
|
|
// msgReplaceMap.put("contract",(String)getVariableByKey(variables,"contractNumber")); |
|
|
|
// msgReplaceMap.put("page",Constant.adminPage); |
|
|
|
// WxMsgRecord wxMsgRecord = new WxMsgRecord(); |
|
|
|
// wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode()); |
|
|
|
// wxMsgRecord.setModelType(EnumMsgModel.VALIDATION_CODE.getCode()); |
|
|
|
// wxMsgRecord.setReceiver(wxMsgValidationcode.getPhone()); |
|
|
|
// wxMsgRecord.setTenantId(wxMsgConfig.getTenantId()); |
|
|
|
// wxMsgRecord.setDynamicContentMap(msgReplaceMap); |
|
|
|
// mqBaseProducer.sendMessage(wxMsgRecord, EnumMsgMqTopic.DEFAULT.getCode(),EnumMsgMqTag.DEFAULT.getCode(),EnumMsgMqKey.DEFAULT.getCode()); |
|
|
|
|
|
|
|
|
|
|
|
String result = WiwideUtil.sendMsg(secret, bid, publickey, phone, signature, msg, notifyUrl, EnumVerifyCode.YES.getCode().toString(), modelId); |
|
|
|
JSONObject jsonObjectResult = JSONObject.parseObject(result); |
|
|
|
String ret = jsonObjectResult.get("ret").toString(); |
|
|
|
|