Commit b330812c by “zcwang”

Merge remote-tracking branch 'origin/feature-changeFlow-221110' into feature-changeFlow-221110

parents 2a4700d5 b8b667a3
......@@ -14,7 +14,7 @@ public interface FlowRpcSupplierInfoService {
/**
* 查询供应商关联角色
*/
AjaxResponse<List<SupplierUserRsp>> querySupplierRelatedUser(SupplierRelatedUserReq req);
List<SupplierUserRsp> querySupplierRelatedUser(SupplierRelatedUserReq req);
......
package com.netease.mail.yanxuan.change.integration.flow.supplier.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.netease.mail.yanxuan.change.integration.flow.supplier.FlowRpcSupplierInfoService;
import com.netease.mail.yanxuan.change.integration.flow.supplier.req.SupplierRelatedUserReq;
import com.netease.mail.yanxuan.change.integration.flow.supplier.rsp.SupplierUserRsp;
......@@ -28,15 +30,12 @@ public class FlowRpcSupplierInfoServiceImpl implements FlowRpcSupplierInfoServic
Logger logger = LoggerFactory.getLogger(FlowRpcSupplierInfoServiceImpl.class);
@Override
public AjaxResponse<List<SupplierUserRsp>> querySupplierRelatedUser(SupplierRelatedUserReq req) {
public List<SupplierUserRsp> querySupplierRelatedUser(SupplierRelatedUserReq req) {
String url = "http://127.0.0.1:8550/proxy/test-v1.yanxuan-supplier-ms.service.mailsaas/api/supplier/batchGetSupplierRelatedUser.json";
HashMap<String, Object> params = new HashMap<>();
params.put("searchType",req.getSearchType());
params.put("supplierIdList",req.getSupplierIdList());
String s = JSON.toJSONString(req);
logger.error(s);
Object supplierUserRsp = rpcTemplate.postJson(url, s,500,new RpcObjectHandler<>(Object.class));
logger.error("请求返回结果"+supplierUserRsp.toString());
return null;
JSONObject supplierUserRsp = rpcTemplate.postJson(url, JSON.toJSONString(req),500,new RpcObjectHandler<>(JSONObject.class));
Object data = supplierUserRsp.get("data");
List<SupplierUserRsp> objects = JSONArray.parseArray(data.toString(), SupplierUserRsp.class);
logger.error("请求返回结果"+objects);
return objects;
}
}
......@@ -14,7 +14,7 @@ public class SupplierUserRsp {
/**
* 供应商ID
*/
private Integer supplierId;
private String supplierId;
/**
* 角色ID(1-采购 2-计划 3-SQE 4-商品开发) 以及名称
......
......@@ -6,10 +6,11 @@
*/
package com.netease.mail.yanxuan.change.web.controller;
import com.netease.mail.yanxuan.change.biz.service.change.ChangeConfigService;
import com.netease.mail.yanxuan.change.dal.meta.model.po.ChangeConfigPo;
import com.netease.mail.yanxuan.change.integration.flow.supplier.FlowRpcSupplierInfoService;
import com.netease.mail.yanxuan.change.integration.flow.supplier.req.SupplierRelatedUserReq;
import com.netease.mail.yanxuan.change.integration.flow.supplier.rsp.SupplierUserRsp;
import com.netease.yanxuan.flowx.sdk.meta.controller.communal.AjaxResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*;
......@@ -82,7 +83,7 @@ public class TestController {
private FlowRpcSupplierInfoService supplierInfoService;
@PostMapping("/test")
public AjaxResponse<List<SupplierUserRsp>> test(@RequestBody SupplierRelatedUserReq req) {
public List<SupplierUserRsp> test(@RequestBody SupplierRelatedUserReq req) {
return supplierInfoService.querySupplierRelatedUser(req);
}
}
\ No newline at end of file
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