fix
Helius
2021-11-08 4c2b61c51a5c2eec4c7e07945847517ddfb6914b
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/UniformMsgSentTask.java
@@ -55,14 +55,13 @@
    public void handle(Map<String,Object> param){
        try {
            JSONObject messageJsonParam=JSONObject.parseObject(param.get("messages").toString());
            if(!messageJsonParam.containsKey("companyId")||(!messageJsonParam.containsKey("templateCode"))){
            if(!param.containsKey("companyId")||(!param.containsKey("templateCode"))){
                LogUtil.error("小程序消息推送参数格式异常发送模板消息需要传JSONO字符串作为格式 例如:{\"companyId\":17,\"templateCode\":10000} companyId 、templateCode 是必须属性");
                return;
            }
            Long companyId = Long.parseLong( messageJsonParam.get("companyId").toString());
            Integer templateCode = Integer.parseInt( messageJsonParam.get("templateCode").toString());
            Long companyId = Long.parseLong( param.get("companyId").toString());
            Integer templateCode = Integer.parseInt( param.get("templateCode").toString());
            //获取公司微信配置参数
            BusParameterSettings xcxAppId = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_APPID, companyId);
@@ -82,7 +81,7 @@
            bulderParam.put("xcxAppId", xcxAppId.getParamValue());
            bulderParam.put("gzhAppid", gzhAppid.getParamValue());
            bulderParam.put("template_id", template.getUuid());
            bulderParam.put("messageJsonParam", messageJsonParam);
            bulderParam.put("messageJsonParam", param);
            //调用模板计算出消息体
            Map msgResult = templateMessageBulder.buildMsg(bulderParam);