Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit aec41828
authored
Apr 21, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:查询所有门店接口修改,将默认值放在controller
1 parent
f3a9e2e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
aus-admin/src/main/java/com/glsx/usedcar/web/rest/vr/VrOrgController.java
aus-core/src/main/java/com/glsx/usedcar/module/vrsystem/service/VrOrgService.java
aus-admin/src/main/java/com/glsx/usedcar/web/rest/vr/VrOrgController.java
View file @
aec4182
...
...
@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
...
...
@@ -33,6 +34,10 @@ public class VrOrgController {
@GetMapping
(
"/stores"
)
@Operation
(
summary
=
"门店下拉列表"
,
description
=
"查询所有门店(orgType=2),默认在第一个插入(-1, 广联)"
)
public
BaseResp
<
List
<
VrOrgStoreRespVO
>>
listAllStores
()
{
return
BaseResp
.
success
(
vrOrgService
.
listAllStores
());
List
<
VrOrgStoreRespVO
>
stores
=
new
ArrayList
<>();
// 默认在第一个插入(-1, 广联)
stores
.
add
(
VrOrgStoreRespVO
.
builder
().
vrOrgId
(-
1L
).
vrOrgName
(
"广联"
).
build
());
stores
.
addAll
(
vrOrgService
.
listAllStores
());
return
BaseResp
.
success
(
stores
);
}
}
aus-core/src/main/java/com/glsx/usedcar/module/vrsystem/service/VrOrgService.java
View file @
aec4182
...
...
@@ -129,18 +129,14 @@ public class VrOrgService {
}
/**
* 查询所有门店(orgType=2)下拉列表
,默认在第一个插入(-1, 广联)
* 查询所有门店(orgType=2)下拉列表
*/
public
List
<
VrOrgStoreRespVO
>
listAllStores
()
{
List
<
VrOrg
>
stores
=
vrOrgRepository
.
findByOrgTypeAndDeleteFlagOrderBySortOrderAsc
(
2
,
DeleteFlag
.
NOT_DELETED
.
getCode
());
List
<
VrOrgStoreRespVO
>
result
=
new
ArrayList
<>();
// 默认在第一个插入(-1, 广联)
result
.
add
(
VrOrgStoreRespVO
.
builder
().
vrOrgId
(-
1L
).
vrOrgName
(
"广联"
).
build
());
stores
.
forEach
(
org
->
result
.
add
(
VrOrgStoreRespVO
.
builder
()
return
stores
.
stream
().
map
(
org
->
VrOrgStoreRespVO
.
builder
()
.
vrOrgId
(
org
.
getId
())
.
vrOrgName
(
org
.
getOrgName
())
.
build
()));
return
result
;
.
build
()).
collect
(
Collectors
.
toList
());
}
/**
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment