Commit ba21d2f9 by jx-art

测试 调用商品执行人接口

parent e1e04146
Pipeline #42978 failed with stages
in 1 minute 30 seconds
......@@ -8,7 +8,7 @@ import com.netease.mail.yanxuan.change.common.enums.ChangeSubjectEnum;
import com.netease.mail.yanxuan.change.dal.entity.ChangeConfig;
import com.netease.mail.yanxuan.change.dal.meta.model.po.ChangeCommanderPO;
import com.netease.mail.yanxuan.change.dal.meta.model.rpc.GoodsResponseSqeRpc;
import com.netease.mail.yanxuan.change.integration.flow.GoodsRpcService;
import com.netease.mail.yanxuan.change.integration.flow.QcApiRpcService;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
......@@ -26,7 +26,7 @@ public class InteriorChangeConfigServiceImpl implements InteriorChangeConfigServ
private ChangeConfigService changeConfigService;
@Autowired
private GoodsRpcService goodsRpcService;
private QcApiRpcService qcApiRpcService;
@Override
public String queryCommanderInfo(ChangeCommanderPO changeCommander) {
......@@ -78,7 +78,7 @@ public class InteriorChangeConfigServiceImpl implements InteriorChangeConfigServ
} else if (commander.equals("计划")) {
} else if (commander.equals("SQE")) {
String detail = goodsRpcService.getDetail(Integer.valueOf(goods));
String detail = qcApiRpcService.getDetail(Integer.valueOf(goods));
JSONObject jsonObject = JSONObject.parseObject(detail);
GoodsResponseSqeRpc data = jsonObject.getObject("data", GoodsResponseSqeRpc.class);
if (data != null){
......
package com.netease.mail.yanxuan.change.integration.flow;
import com.netease.yanxuan.missa.client.annotation.MissaClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
* @author WangJiaXiang
* @date 2022/11/23/023$
*/
@Service
@MissaClient(serviceCode = "yanxuan-pfu-api")
public interface PfuApiRpcService {
/**
* 根据商品ID查看对应的执行人
* @param goodsId
* @return
*/
@PostMapping(value = "/api/negotiation/queryExecuteUserByItemId")
String getDetail(@RequestBody List<Long> goodsId);
}
package com.netease.mail.yanxuan.change.integration.flow;
import com.netease.yanxuan.flowx.sdk.meta.controller.communal.AjaxResponse;
import com.netease.yanxuan.missa.client.annotation.MissaClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -13,8 +12,8 @@ import org.springframework.web.bind.annotation.RequestParam;
@Service
@MissaClient(serviceCode = "yanxuan-qc-api")
public interface GoodsRpcService {
public interface QcApiRpcService {
//查询商品的SQE
@GetMapping(value = "/xhr/item/basic/sqe.json")
String getDetail(@RequestParam("itemId") Integer itemId);
......
......@@ -4,8 +4,10 @@ import com.netease.mail.yanxuan.change.common.bean.AjaxResult;
import com.netease.mail.yanxuan.change.biz.service.change.AdminChangeConfigService;
import com.netease.mail.yanxuan.change.dal.meta.model.req.ChangeConfigQueryReq;
import com.netease.mail.yanxuan.change.dal.meta.model.req.ChangeConfigReq;
import com.netease.mail.yanxuan.change.integration.flow.PfuApiRpcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @author WangJiaXiang
......@@ -99,5 +101,13 @@ public class ChangeConfigController {
return service.queryConfigType();
}
@Autowired
private PfuApiRpcService pfuApiRpcService;
@PostMapping("/test")
public String queryExecuteUserByItemId(@RequestBody List<Long> goodsId){
return pfuApiRpcService.getDetail(goodsId);
}
}
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