Commit d2cb88b0 by jx-art

对接供应商模糊查询

parent 6d0b8026
...@@ -39,6 +39,12 @@ public class AppConfig { ...@@ -39,6 +39,12 @@ public class AppConfig {
@Value("${change.goods.principal.email:grp.gyhtest1001@corp.netease.com}") @Value("${change.goods.principal.email:grp.gyhtest1001@corp.netease.com}")
private String defaultEmail; private String defaultEmail;
@Value("${searchName:aa}")
private String searchName;
@Value("${searchUid:wb.mulongfei@mesg.corp.netease.com}")
private String searchUid;
/** /**
* 变更管理QM * 变更管理QM
*/ */
......
package com.netease.mail.yanxuan.change.web.controller;
import com.netease.mail.yanxuan.change.biz.config.AppConfig;
import com.netease.mail.yanxuan.change.integration.flow.supplier.FlowRpcSupplierService;
import com.netease.mail.yanxuan.change.integration.flow.supplier.rsp.SupplierInfoRsp;
import com.netease.yanxuan.flowx.sdk.meta.controller.communal.AjaxResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @author WangJiaXiang
* @date 2022/12/7/007$
*/
@RestController
@RequestMapping("/supplier")
public class SupplierController {
@Autowired
private FlowRpcSupplierService rpcSupplierService;
@Autowired
private AppConfig appConfig;
@GetMapping("/query/supplier/infos")
public AjaxResponse<List<SupplierInfoRsp>> querySupplierInfos(
@RequestParam(name = "name",required = false )String name,
@RequestParam(name = "uid",required = false)String uid,
@RequestParam(name = "fuzzySearchText") String fuzzySearchText){
if (name == null){
name = appConfig.getSearchName();
}
if (uid == null){
uid = appConfig.getSearchUid();
}
return rpcSupplierService.getSupplierInfo(name,uid,fuzzySearchText);
}
}
...@@ -71,31 +71,6 @@ public class TestController { ...@@ -71,31 +71,6 @@ public class TestController {
return AjaxResult.success(); return AjaxResult.success();
} }
@Autowired
private FlowRpcSupplierService rpcSupplierService;
@GetMapping("/test1")
public AjaxResponse<List<SupplierInfoRsp>> test1(@RequestParam(name = "fuzzySearchText") String fuzzySearchText){
return rpcSupplierService.getSupplierInfo("aa","wb.mulongfei@mesg.corp.netease.com",fuzzySearchText);
}
@Autowired
private FlowRpcSupplierSendService supplierSendService;
@PostMapping("/test2")
public AjaxResponse<List<SupplierUserRsp>> test2(@RequestBody SupplierRelatedUserReq req) {
return supplierSendService.querySupplierRelatedUser(req);
}
@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);
}
@PostMapping("/submit") @PostMapping("/submit")
public AjaxResult<Void> submit(Long id) { public AjaxResult<Void> submit(Long id) {
......
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