Commit bbe80da1 by jx-art

供应商接口测试调用~

parent 21bb4b30
...@@ -9,12 +9,13 @@ package com.netease.mail.yanxuan.change.web.controller; ...@@ -9,12 +9,13 @@ package com.netease.mail.yanxuan.change.web.controller;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.netease.mail.yanxuan.change.biz.service.impl.InteriorChangeConfigServiceImpl;
import com.netease.mail.yanxuan.change.integration.flow.supplier.req.SupplierGoodsInfoReq;
import com.netease.mail.yanxuan.change.integration.flow.supplier.req.SupplierRelatedUserReq;
import com.netease.mail.yanxuan.change.integration.flow.supplier.rsp.SupplierGoodsInfoRsp;
import com.netease.mail.yanxuan.change.integration.flow.supplier.rsp.SupplierUserRsp;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.netease.mail.yanxuan.change.biz.service.rpc.TodoService; import com.netease.mail.yanxuan.change.biz.service.rpc.TodoService;
...@@ -54,30 +55,26 @@ public class TestController { ...@@ -54,30 +55,26 @@ public class TestController {
} }
@Autowired @Autowired
private FlowRpcSupplierSendService service; private FlowRpcSupplierSendService supplierSendService;
@PostMapping("/test") @PostMapping("/test1")
public AjaxResponse<List<SupplierSimpleRsp>> test1(@RequestParam String name){ public String test1(@RequestBody List<Long> itemIds){
SupplierSearchRemoteReq req = new SupplierSearchRemoteReq(); return supplierSendService.queryGoodsPurchase(itemIds);
req.setSearchText(name);
return service.queryByConditionForQc(req);
} }
@GetMapping("/query/supplier/infos") @PostMapping("/test2")
public AjaxResponse<List<SupplierSimpleRsp>> queryByConditionForQc(@RequestParam(name = "searchText") String searchText){ public AjaxResponse<List<SupplierUserRsp>> test2(@RequestBody SupplierRelatedUserReq req){
SupplierSearchRemoteReq req = new SupplierSearchRemoteReq(); return supplierSendService.querySupplierRelatedUser(req);
req.setSearchText(searchText);
//暂时使用模拟数据
//AjaxResponse<List<SupplierSimpleRsp>> listAjaxResponse = service.queryByConditionForQc(req);
AjaxResponse<List<SupplierSimpleRsp>> listAjaxResponse = new AjaxResponse<List<SupplierSimpleRsp>>();
List<SupplierSimpleRsp> suppliers = new ArrayList<>();
SupplierSimpleRsp supplierSimpleRsp1 = new SupplierSimpleRsp("YX0778","gyhtest1009");
SupplierSimpleRsp supplierSimpleRsp2 = new SupplierSimpleRsp("YX0528","gyhtest1010");
suppliers.add(supplierSimpleRsp1);
suppliers.add(supplierSimpleRsp2);
listAjaxResponse.setData(suppliers);
listAjaxResponse.setCode(200);
//return supplierSendService.queryByConditionForQc(req); 暂用模拟数据
return listAjaxResponse;
} }
@PostMapping("/test3")
public AjaxResponse<List<SupplierSimpleRsp>> test3(@RequestBody SupplierSearchRemoteReq req){
return supplierSendService.queryByConditionForQc(req);
}
@PostMapping("/test4")
public AjaxResponse<List<SupplierGoodsInfoRsp>> test4(@RequestBody SupplierGoodsInfoReq req){
return supplierSendService.SupplierGoodsInfoBySupplier(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