|
|
|
@@ -15,6 +15,8 @@ import com.iformall.mapper.WxCouponPresentMapper; |
|
|
|
import com.iformall.mq.MqBaseProducer; |
|
|
|
import com.iformall.service.WxAppinfoService; |
|
|
|
import com.iformall.service.WxCouponPresentService; |
|
|
|
import com.iformall.service.msg.impl.SendSmsServiceImpl; |
|
|
|
|
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@@ -103,4 +105,32 @@ public class WxCouponPresentServiceImpl implements WxCouponPresentService { |
|
|
|
logger.info("系统发卡发送短信结束"); |
|
|
|
logger.info("》》》》》》》》》》》"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
private SendSmsServiceImpl sendSmsService; |
|
|
|
@Override |
|
|
|
public void tttttttttttttt() { |
|
|
|
WxCouponPassword couponPassword = wxCouponPasswordMapper.selectById(483888264577998850L); |
|
|
|
TenantEntity tenantEntity = new TenantEntity(); |
|
|
|
tenantEntity.setTenantId("789"); |
|
|
|
|
|
|
|
Map<String, String> msgReplaceMap = new HashMap(); |
|
|
|
msgReplaceMap.put("id", couponPassword.getId().toString()); |
|
|
|
msgReplaceMap.put("app", "富茂链客"); |
|
|
|
msgReplaceMap.put("title", "饼干消费卡"); |
|
|
|
msgReplaceMap.put("pw", couponPassword.getPassword()); |
|
|
|
WxMsgRecord wxMsgRecord = new WxMsgRecord(); |
|
|
|
wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode()); |
|
|
|
wxMsgRecord.setModelType(EnumMsgModel.COUPON_CARD_SEND.getCode()); |
|
|
|
wxMsgRecord.setReceiver("18600671341"); |
|
|
|
wxMsgRecord.updateTenantInfo(tenantEntity); |
|
|
|
wxMsgRecord.setDynamicContentMap(msgReplaceMap); |
|
|
|
try { |
|
|
|
sendSmsService.send(wxMsgRecord); |
|
|
|
} catch (Exception e) { |
|
|
|
// TODO Auto-generated catch block |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |