Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
e0467a47
Commit
e0467a47
authored
Jul 23, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature-ecw-node:新增前端下拉框获取网点信息接口
parent
a55d456d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
4 deletions
+49
-4
NodeController.java
...udao/module/ecw/controller/admin/node/NodeController.java
+15
-4
NodeSimpleRespVO.java
...module/ecw/controller/admin/node/vo/NodeSimpleRespVO.java
+20
-0
NodeConvert.java
...cn/iocoder/yudao/module/ecw/convert/node/NodeConvert.java
+2
-0
NodeService.java
...cn/iocoder/yudao/module/ecw/service/node/NodeService.java
+7
-0
NodeServiceImpl.java
...ocoder/yudao/module/ecw/service/node/NodeServiceImpl.java
+5
-0
No files found.
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/controller/admin/node/NodeController.java
View file @
e0467a47
...
...
@@ -4,7 +4,9 @@ import cn.hutool.core.collection.CollectionUtil;
import
cn.iocoder.yudao.module.system.api.user.AdminUserApi
;
import
cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
io.swagger.annotations.*
;
...
...
@@ -17,11 +19,13 @@ import java.util.stream.Collectors;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
operatelog
.
core
.
enums
.
OperateTypeEnum
.*;
import
cn.iocoder.yudao.module.ecw.controller.admin.node.vo.*
;
...
...
@@ -83,6 +87,13 @@ public class NodeController {
return
success
(
NodeConvert
.
INSTANCE
.
convertList
(
list
));
}
@GetMapping
(
"/list-all-simple"
)
@ApiOperation
(
value
=
"获得服务网点精简信息列表"
,
notes
=
"主要用于前端的下拉选项"
)
public
CommonResult
<
List
<
NodeSimpleRespVO
>>
getNodeListAllSimple
()
{
List
<
NodeDO
>
list
=
nodeService
.
getNodeList
();
return
success
(
NodeConvert
.
INSTANCE
.
convertListSimple
(
list
));
}
@GetMapping
(
"/page"
)
@ApiOperation
(
"获得服务网点分页"
)
// @PreAuthorize("@ss.hasPermission('ecw:node:query')")
...
...
@@ -113,13 +124,13 @@ public class NodeController {
.
filter
(
t
->
t
.
getAdminId
()
!=
null
)
.
map
(
NodeDO:
:
getAdminId
)
.
collect
(
Collectors
.
toList
());
if
(
CollectionUtil
.
isEmpty
(
userIdList
))
return
;
if
(
CollectionUtil
.
isEmpty
(
userIdList
))
return
;
List
<
AdminUserRespDTO
>
userList
=
adminUserApi
.
getUsers
(
userIdList
);
Map
<
Long
,
String
>
userNameMap
=
userList
.
stream
()
.
collect
(
Collectors
.
toMap
(
AdminUserRespDTO:
:
getId
,
AdminUserRespDTO:
:
getNickname
,
(
v1
,
v2
)->
v2
));
.
collect
(
Collectors
.
toMap
(
AdminUserRespDTO:
:
getId
,
AdminUserRespDTO:
:
getNickname
,
(
v1
,
v2
)
->
v2
));
nodeList
.
forEach
(
t
->
{
Long
adminId
=
t
.
getAdminId
();
if
(
adminId
!=
null
&&
userNameMap
.
containsKey
(
adminId
))
{
if
(
adminId
!=
null
&&
userNameMap
.
containsKey
(
adminId
))
{
t
.
setAdminName
(
userNameMap
.
get
(
adminId
));
}
});
...
...
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/controller/admin/node/vo/NodeSimpleRespVO.java
0 → 100644
View file @
e0467a47
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
controller
.
admin
.
node
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
@ApiModel
(
"网点精简信息 Response VO"
)
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
NodeSimpleRespVO
{
@ApiModelProperty
(
value
=
""
,
required
=
true
)
private
Long
id
;
@ApiModelProperty
(
value
=
"中文标题"
)
private
String
titleZh
;
@ApiModelProperty
(
value
=
"英文标题"
)
private
String
titleEn
;
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/convert/node/NodeConvert.java
View file @
e0467a47
...
...
@@ -27,6 +27,8 @@ public interface NodeConvert {
List
<
NodeRespVO
>
convertList
(
List
<
NodeDO
>
list
);
List
<
NodeSimpleRespVO
>
convertListSimple
(
List
<
NodeDO
>
list
);
PageResult
<
NodeRespVO
>
convertPage
(
PageResult
<
NodeDO
>
page
);
List
<
NodeExcelVO
>
convertList02
(
List
<
NodeDO
>
list
);
...
...
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/node/NodeService.java
View file @
e0467a47
...
...
@@ -51,6 +51,13 @@ public interface NodeService {
*/
List
<
NodeDO
>
getNodeList
(
Collection
<
Long
>
ids
);
/**
* 获得服务网点列表
*
* @return 所有服务网点列表
*/
List
<
NodeDO
>
getNodeList
();
/**
* 获得服务网点分页
*
...
...
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/node/NodeServiceImpl.java
View file @
e0467a47
...
...
@@ -71,6 +71,11 @@ public class NodeServiceImpl implements NodeService {
return
nodeMapper
.
selectBatchIds
(
ids
);
}
@Override
public
List
<
NodeDO
>
getNodeList
()
{
return
nodeMapper
.
selectList
();
}
@Override
public
PageResult
<
NodeDO
>
getNodePage
(
NodePageReqVO
pageReqVO
)
{
return
nodeMapper
.
selectPage
(
pageReqVO
);
...
...
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