Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
O
on-site-service
Project
Project
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
external
on-site-service
Commits
7d97a9d0
Commit
7d97a9d0
authored
Aug 03, 2022
by
lining
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
cdc645da
2a545c98
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
13 deletions
+10
-13
ServiceCategoryController.java
...iniapp/controller/category/ServiceCategoryController.java
+3
-2
ServiceCategoryService.java
...vice/miniapp/service/category/ServiceCategoryService.java
+7
-11
No files found.
mini-app/src/main/java/com/onsiteservice/miniapp/controller/category/ServiceCategoryController.java
View file @
7d97a9d0
...
@@ -5,6 +5,7 @@ import com.onsiteservice.dao.common.page.PageInfoVO;
...
@@ -5,6 +5,7 @@ import com.onsiteservice.dao.common.page.PageInfoVO;
import
com.onsiteservice.dao.common.page.PageParams
;
import
com.onsiteservice.dao.common.page.PageParams
;
import
com.onsiteservice.miniapp.controller.category.dto.PageServiceCategoryDTO
;
import
com.onsiteservice.miniapp.controller.category.dto.PageServiceCategoryDTO
;
import
com.onsiteservice.miniapp.controller.category.vo.ServiceCategoryVO
;
import
com.onsiteservice.miniapp.controller.category.vo.ServiceCategoryVO
;
import
com.onsiteservice.miniapp.controller.category.vo.ServiceSubclassVO
;
import
com.onsiteservice.miniapp.service.category.ServiceCategoryService
;
import
com.onsiteservice.miniapp.service.category.ServiceCategoryService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -38,8 +39,8 @@ public class ServiceCategoryController {
...
@@ -38,8 +39,8 @@ public class ServiceCategoryController {
@ApiOperation
(
value
=
"查询服务子类(大类全部返回)"
)
@ApiOperation
(
value
=
"查询服务子类(大类全部返回)"
)
@GetMapping
(
"list"
)
@GetMapping
(
"list"
)
public
Result
<
List
<
Service
Category
VO
>>
list
(
@RequestParam
(
required
=
false
)
String
keyWord
)
{
public
Result
<
List
<
Service
Subclass
VO
>>
list
(
@RequestParam
(
required
=
false
)
String
keyWord
)
{
return
serviceCategoryService
.
list
(
keyWord
);
return
serviceCategoryService
.
selectByKeyWord
(
keyWord
);
}
}
...
...
mini-app/src/main/java/com/onsiteservice/miniapp/service/category/ServiceCategoryService.java
View file @
7d97a9d0
...
@@ -31,17 +31,6 @@ public class ServiceCategoryService extends AbstractMapper<ServiceCategory> {
...
@@ -31,17 +31,6 @@ public class ServiceCategoryService extends AbstractMapper<ServiceCategory> {
@Resource
@Resource
private
ServiceSubclassMapper
serviceSubclassMapper
;
private
ServiceSubclassMapper
serviceSubclassMapper
;
/**
* 分页查询列表
*/
/*public Result<PageInfoVO<ServiceCategoryVO>> getPage(PageServiceCategoryDTO dto) {
PageHelper.startPage(dto.getPage(), dto.getSize());
List<ServiceCategory> serviceCategoryList = serviceCategoryBizMapper.selectServiceCategoryPage(dto);
List<ServiceCategoryVO> serviceCategoryVOList = serviceCategoryList.parallelStream()
.map(e -> AttrCopyUtils.copy(e, new ServiceCategoryVO())).collect(Collectors.toList());
return ResultGenerator.success(new PageInfoVO<>(serviceCategoryVOList));
}*/
public
Result
<
List
<
ServiceCategoryVO
>>
list
(
String
keyWord
)
{
public
Result
<
List
<
ServiceCategoryVO
>>
list
(
String
keyWord
)
{
List
<
ServiceCategory
>
serviceCategoryList
=
serviceCategoryMapper
.
selectAllOrderBySequence
();
List
<
ServiceCategory
>
serviceCategoryList
=
serviceCategoryMapper
.
selectAllOrderBySequence
();
...
@@ -62,5 +51,12 @@ public class ServiceCategoryService extends AbstractMapper<ServiceCategory> {
...
@@ -62,5 +51,12 @@ public class ServiceCategoryService extends AbstractMapper<ServiceCategory> {
return
ResultGenerator
.
success
(
serviceCategoryVOList
);
return
ResultGenerator
.
success
(
serviceCategoryVOList
);
}
}
public
Result
<
List
<
ServiceSubclassVO
>>
selectByKeyWord
(
String
keyWord
)
{
List
<
ServiceSubclass
>
serviceSubclassList
=
serviceSubclassMapper
.
selectByServiceNameLike
(
keyWord
);
List
<
ServiceSubclassVO
>
serviceSubclassVOList
=
serviceSubclassList
.
parallelStream
()
.
map
(
e1
->
AttrCopyUtils
.
copy
(
e1
,
new
ServiceSubclassVO
())).
collect
(
Collectors
.
toList
());
return
ResultGenerator
.
success
(
serviceSubclassVOList
);
}
}
}
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