|
|
@ -48,7 +48,6 @@ import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
@ -149,7 +148,7 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { |
|
|
|
throw new WxSubscribeException("openId获取失败", "", ""); |
|
|
|
} |
|
|
|
|
|
|
|
/*//获取accessToken
|
|
|
|
//获取accessToken
|
|
|
|
String clientTypeRedis = null; |
|
|
|
if (WxmpMessageConstant.RESI.equals(msg.getClientType())) { |
|
|
|
clientTypeRedis = WxmpMessageConstant.RESI; |
|
|
@ -167,13 +166,6 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { |
|
|
|
String accessToken = (String) authorizerRefreshToken.get(WxmpMessageConstant.AUTHORIZER_ACCESS_TOKEN); |
|
|
|
if (StringUtils.isBlank(accessToken)) { |
|
|
|
throw new WxSubscribeException("accessToken获取失败", "", openId); |
|
|
|
}*/ |
|
|
|
String accessToken = ""; |
|
|
|
if("resi".equals(clientType)){ |
|
|
|
accessToken = "38_DhE3GSxKwJnUmh8tWKvIgczp-P_hHK8mpRlPkAh0z5slTuuJHtzLUa35NyhjUI4v-8A_VnOKGkuTSsG8vnB8Cv3vmctzf7wxrwGnhJ2dgbzfZ-yy7PHP5fTrwBiwi-48RPpjorrC39YyamZsKKPgADDSSX"; |
|
|
|
} |
|
|
|
if("gov".equals(clientType)){ |
|
|
|
accessToken = "38_9b_QK0ZsjJzTUn8pvXWBbSH2GYLZtobfJ2et1PVVEzDmBuU1pX6DZ9abHP1FDzakGxTNJboFgqR6bugTL2fqB1wIHgnlMcEzL48xo5J-s1IoDGgPZ-6LVcfigpTCOuJYFQrOcrcStcvfm1K0ETGgAMDIXK"; |
|
|
|
} |
|
|
|
|
|
|
|
//获取模板id
|
|
|
@ -360,15 +352,8 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { |
|
|
|
} |
|
|
|
List<GetTemplateListResultDTO> resultList = (List<GetTemplateListResultDTO>) mapToResult.getData(); |
|
|
|
return resultList; |
|
|
|
/*List<Object> resultList = (List<Object>) mapToResult.getData(); |
|
|
|
List<CustomerTemplateListResultDTO> list = new ArrayList<>(); |
|
|
|
//必须转换
|
|
|
|
for(Object f:resultList){ |
|
|
|
JSONObject json = JSON.parseObject(f.toString()); |
|
|
|
CustomerTemplateListResultDTO ff = ConvertUtils.mapToEntity(json, CustomerTemplateListResultDTO.class); |
|
|
|
list.add(ff); |
|
|
|
} |
|
|
|
return list;*/ |
|
|
|
//List<CustomerTemplateListResultDTO> list = ConvertUtils.sourceToTarget(resultList, CustomerTemplateListResultDTO.class);
|
|
|
|
//return list;
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -389,14 +374,8 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { |
|
|
|
logger.error("调用epmet_third服务获取客户小程序消息订阅模板数据失败"); |
|
|
|
throw new RenException(mapToResult.getCode()); |
|
|
|
} |
|
|
|
List<Object> resultList = (List<Object>) mapToResult.getData(); |
|
|
|
List<CustomerTemplateListResultDTO> list = new ArrayList<>(); |
|
|
|
//必须转换
|
|
|
|
for(Object f:resultList){ |
|
|
|
JSONObject json = JSON.parseObject(f.toString()); |
|
|
|
CustomerTemplateListResultDTO ff = ConvertUtils.mapToEntity(json, CustomerTemplateListResultDTO.class); |
|
|
|
list.add(ff); |
|
|
|
} |
|
|
|
List<CustomerTemplateListResultDTO> resultList = (List<CustomerTemplateListResultDTO>) mapToResult.getData(); |
|
|
|
List<CustomerTemplateListResultDTO> list = ConvertUtils.sourceToTarget(resultList, CustomerTemplateListResultDTO.class); |
|
|
|
return list; |
|
|
|
} |
|
|
|
|
|
|
|