Commit 02fb504e by jx-art

参数解析方式改变,请求邮件参数方式改变~

parent e2229cbc
Pipeline #43208 passed with stages
in 1 minute 31 seconds
package com.netease.mail.yanxuan.change.integration.email.service.impl; package com.netease.mail.yanxuan.change.integration.email.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.netease.mail.yanxuan.change.integration.email.email.EmailTemplateResponResult;
import com.netease.mail.yanxuan.change.integration.flow.email.EmailTemplateRpcService; import com.netease.mail.yanxuan.change.integration.flow.email.EmailTemplateRpcService;
import com.netease.yanxuan.flowx.sdk.meta.controller.communal.AjaxResponse;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -30,8 +30,8 @@ public class EmailTemplateServiceImpl { ...@@ -30,8 +30,8 @@ public class EmailTemplateServiceImpl {
params.put("templateCode", templateCode); params.put("templateCode", templateCode);
params.put("type", type); params.put("type", type);
logger.info(JSONObject.toJSONString("邮箱接口参数展示mockData={},templateCode={},type={}"),mockData,templateCode, type); logger.info(JSONObject.toJSONString("邮箱接口参数展示mockData={},templateCode={},type={}"),mockData,templateCode, type);
EmailTemplateResponResult emailTemplateResponResult = service.template(JSONObject.toJSONString(params)); AjaxResponse<String> response = service.template(params);
logger.info("请求后参数展示\n"+emailTemplateResponResult.toString()); logger.info("请求后参数展示\n"+response);
return emailTemplateResponResult.getData(); return response.getData();
} }
} }
package com.netease.mail.yanxuan.change.integration.flow.email; package com.netease.mail.yanxuan.change.integration.flow.email;
import com.netease.mail.yanxuan.change.integration.email.email.EmailTemplateResponResult; import com.netease.yanxuan.flowx.sdk.meta.controller.communal.AjaxResponse;
import com.netease.yanxuan.missa.client.annotation.MissaClient; import com.netease.yanxuan.missa.client.annotation.MissaClient;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.Map;
/** /**
* @author WangJiaXiang * @author WangJiaXiang
...@@ -14,7 +17,7 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -14,7 +17,7 @@ import org.springframework.web.bind.annotation.PostMapping;
public interface EmailTemplateRpcService { public interface EmailTemplateRpcService {
@PostMapping("/templates/flowx/template/assemble.json") @PostMapping("/templates/flowx/template/assemble.json")
EmailTemplateResponResult template(String json); AjaxResponse<String> template(@RequestBody Map<String,Object> params);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment