|  |  |  | 
|---|
|  |  |  | package com.doumee.core.wx.wxPlat; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import cn.emay.sdk.util.json.gson.JsonObject; | 
|---|
|  |  |  | import com.alibaba.fastjson.JSONObject; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
|---|
|  |  |  | import com.doumee.biz.system.SystemDictDataBiz; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.core.utils.DateUtil; | 
|---|
|  |  |  | import com.doumee.core.utils.Http; | 
|---|
|  |  |  | import com.doumee.core.utils.HttpsUtil; | 
|---|
|  |  |  | import com.doumee.dao.business.MemberMapper; | 
|---|
|  |  |  | import com.doumee.dao.business.VisitsMapper; | 
|---|
|  |  |  | import com.doumee.dao.business.WxNoticeConfigMapper; | 
|---|
|  |  |  | import com.doumee.dao.business.model.*; | 
|---|
|  |  |  | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import me.chanjar.weixin.common.error.WxErrorException; | 
|---|
|  |  |  | import me.chanjar.weixin.mp.api.WxMpService; | 
|---|
|  |  |  | import me.chanjar.weixin.mp.bean.template.WxMpTemplateData; | 
|---|
|  |  |  | import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage; | 
|---|
|  |  |  | import org.apache.commons.lang3.StringUtils; | 
|---|
|  |  |  | import org.apache.commons.lang3.time.DateFormatUtils; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.stereotype.Component; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  | 
|---|
|  |  |  | paramMap.put("touser", openId); | 
|---|
|  |  |  | paramMap.put("data", dataMap); | 
|---|
|  |  |  | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); | 
|---|
|  |  |  | log.warn("·==++--·推送微信模板信息内容:{}", JSONObject.toJSONString(paramMap)); | 
|---|
|  |  |  | log.error("·==++--·推送微信模板信息内容:{}", JSONObject.toJSONString(paramMap)); | 
|---|
|  |  |  | if(StringUtils.isBlank(response)){ | 
|---|
|  |  |  | log.warn("·==++--·推送微信模板信息:{}·--++==·", "失败"); | 
|---|
|  |  |  | log.error("·==++--·推送微信模板信息:{}·--++==·", "失败"); | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | JSONObject json = JSONObject.parseObject(response); | 
|---|
|  |  |  | log.warn("·==++--·推送微信模板信息:{}·--++==·", Constants.equalsInteger(json.getInteger("errcode"),Constants.ZERO)?"成功":"失败"+json.getString("errmsg")); | 
|---|
|  |  |  | log.error("·==++--·推送微信模板信息:{}·--++==·", Constants.equalsInteger(json.getInteger("errcode"),Constants.ZERO)?"成功":"失败"+json.getString("errmsg")); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|