Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yanxuan-qc-change-system
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
胡园园
yanxuan-qc-change-system
Commits
24ce3d65
Commit
24ce3d65
authored
Dec 08, 2022
by
jx-art
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
角色关联查询,解析
parent
3d52af49
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
13 deletions
+14
-13
FlowRpcSupplierInfoService.java
...integration/flow/supplier/FlowRpcSupplierInfoService.java
+1
-1
FlowRpcSupplierInfoServiceImpl.java
...on/flow/supplier/impl/FlowRpcSupplierInfoServiceImpl.java
+8
-9
SupplierUserRsp.java
...change/integration/flow/supplier/rsp/SupplierUserRsp.java
+1
-1
TestController.java
...se/mail/yanxuan/change/web/controller/TestController.java
+4
-2
No files found.
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/flow/supplier/FlowRpcSupplierInfoService.java
View file @
24ce3d65
...
@@ -14,7 +14,7 @@ public interface FlowRpcSupplierInfoService {
...
@@ -14,7 +14,7 @@ public interface FlowRpcSupplierInfoService {
/**
/**
* 查询供应商关联角色
* 查询供应商关联角色
*/
*/
AjaxResponse
<
List
<
SupplierUserRsp
>
>
querySupplierRelatedUser
(
SupplierRelatedUserReq
req
);
List
<
SupplierUserRsp
>
querySupplierRelatedUser
(
SupplierRelatedUserReq
req
);
...
...
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/flow/supplier/impl/FlowRpcSupplierInfoServiceImpl.java
View file @
24ce3d65
package
com
.
netease
.
mail
.
yanxuan
.
change
.
integration
.
flow
.
supplier
.
impl
;
package
com
.
netease
.
mail
.
yanxuan
.
change
.
integration
.
flow
.
supplier
.
impl
;
import
com.alibaba.fastjson.JSON
;
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.FlowRpcSupplierInfoService
;
import
com.netease.mail.yanxuan.change.integration.flow.supplier.req.SupplierRelatedUserReq
;
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.mail.yanxuan.change.integration.flow.supplier.rsp.SupplierUserRsp
;
...
@@ -28,15 +30,12 @@ public class FlowRpcSupplierInfoServiceImpl implements FlowRpcSupplierInfoServic
...
@@ -28,15 +30,12 @@ public class FlowRpcSupplierInfoServiceImpl implements FlowRpcSupplierInfoServic
Logger
logger
=
LoggerFactory
.
getLogger
(
FlowRpcSupplierInfoServiceImpl
.
class
);
Logger
logger
=
LoggerFactory
.
getLogger
(
FlowRpcSupplierInfoServiceImpl
.
class
);
@Override
@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"
;
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
<>();
JSONObject
supplierUserRsp
=
rpcTemplate
.
postJson
(
url
,
JSON
.
toJSONString
(
req
),
500
,
new
RpcObjectHandler
<>(
JSONObject
.
class
));
params
.
put
(
"searchType"
,
req
.
getSearchType
());
Object
data
=
supplierUserRsp
.
get
(
"data"
);
params
.
put
(
"supplierIdList"
,
req
.
getSupplierIdList
());
List
<
SupplierUserRsp
>
objects
=
JSONArray
.
parseArray
(
data
.
toString
(),
SupplierUserRsp
.
class
);
String
s
=
JSON
.
toJSONString
(
req
);
logger
.
error
(
"请求返回结果"
+
objects
);
logger
.
error
(
s
);
return
objects
;
Object
supplierUserRsp
=
rpcTemplate
.
postJson
(
url
,
s
,
500
,
new
RpcObjectHandler
<>(
Object
.
class
));
logger
.
error
(
"请求返回结果"
+
supplierUserRsp
.
toString
());
return
null
;
}
}
}
}
yanxuan-qc-change-system-integration/src/main/java/com/netease/mail/yanxuan/change/integration/flow/supplier/rsp/SupplierUserRsp.java
View file @
24ce3d65
...
@@ -14,7 +14,7 @@ public class SupplierUserRsp {
...
@@ -14,7 +14,7 @@ public class SupplierUserRsp {
/**
/**
* 供应商ID
* 供应商ID
*/
*/
private
Integer
supplierId
;
private
String
supplierId
;
/**
/**
* 角色ID(1-采购 2-计划 3-SQE 4-商品开发) 以及名称
* 角色ID(1-采购 2-计划 3-SQE 4-商品开发) 以及名称
...
...
yanxuan-qc-change-system-web/src/main/java/com/netease/mail/yanxuan/change/web/controller/TestController.java
View file @
24ce3d65
...
@@ -6,10 +6,11 @@
...
@@ -6,10 +6,11 @@
*/
*/
package
com
.
netease
.
mail
.
yanxuan
.
change
.
web
.
controller
;
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.FlowRpcSupplierInfoService
;
import
com.netease.mail.yanxuan.change.integration.flow.supplier.req.SupplierRelatedUserReq
;
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.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.beans.factory.annotation.Autowired
;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -82,7 +83,7 @@ public class TestController {
...
@@ -82,7 +83,7 @@ public class TestController {
private
FlowRpcSupplierInfoService
supplierInfoService
;
private
FlowRpcSupplierInfoService
supplierInfoService
;
@PostMapping
(
"/test"
)
@PostMapping
(
"/test"
)
public
AjaxResponse
<
List
<
SupplierUserRsp
>
>
test
(
@RequestBody
SupplierRelatedUserReq
req
)
{
public
List
<
SupplierUserRsp
>
test
(
@RequestBody
SupplierRelatedUserReq
req
)
{
return
supplierInfoService
.
querySupplierRelatedUser
(
req
);
return
supplierInfoService
.
querySupplierRelatedUser
(
req
);
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment