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
4c218184
Commit
4c218184
authored
Jul 19, 2022
by
shangtx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 订单列表调整
parent
7adf4109
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
0 deletions
+35
-0
ServiceCategoryController.java
.../admin/controller/category/ServiceCategoryController.java
+6
-0
OrderPageDTO.java
...nsiteservice/admin/controller/order/dto/OrderPageDTO.java
+2
-0
ServiceSubclassService.java
...ervice/admin/service/category/ServiceSubclassService.java
+24
-0
ServiceOrderBizMapper.xml
...src/main/resources/mapper/order/ServiceOrderBizMapper.xml
+3
-0
No files found.
admin/src/main/java/com/onsiteservice/admin/controller/category/ServiceCategoryController.java
View file @
4c218184
...
@@ -70,4 +70,10 @@ public class ServiceCategoryController {
...
@@ -70,4 +70,10 @@ public class ServiceCategoryController {
@CurrentUserId
Long
userId
)
{
@CurrentUserId
Long
userId
)
{
return
success
(
serviceSubclassService
.
saveOrUpdate
(
subclass
,
userId
));
return
success
(
serviceSubclassService
.
saveOrUpdate
(
subclass
,
userId
));
}
}
@ApiOperation
(
value
=
"获取可选小类"
,
notes
=
"作者: 商天翔"
)
@GetMapping
(
"/subclass-selectable"
)
public
Result
getSubClassSelectable
()
{
return
success
(
serviceSubclassService
.
getSubClassSelectable
());
}
}
}
admin/src/main/java/com/onsiteservice/admin/controller/order/dto/OrderPageDTO.java
View file @
4c218184
...
@@ -18,6 +18,8 @@ public class OrderPageDTO extends PageParams {
...
@@ -18,6 +18,8 @@ public class OrderPageDTO extends PageParams {
@ApiModelProperty
(
"客户服务手机号"
)
@ApiModelProperty
(
"客户服务手机号"
)
private
String
phone
;
private
String
phone
;
private
String
userName
;
@ApiModelProperty
(
"期望上门时间"
)
@ApiModelProperty
(
"期望上门时间"
)
private
Date
expectArrivalTimeBegin
;
private
Date
expectArrivalTimeBegin
;
private
Date
expectArrivalTimeEnd
;
private
Date
expectArrivalTimeEnd
;
...
...
admin/src/main/java/com/onsiteservice/admin/service/category/ServiceSubclassService.java
View file @
4c218184
package
com
.
onsiteservice
.
admin
.
service
.
category
;
package
com
.
onsiteservice
.
admin
.
service
.
category
;
import
com.onsiteservice.dao.common.AbstractMapper
;
import
com.onsiteservice.dao.common.AbstractMapper
;
import
com.onsiteservice.dao.mapper.service.ServiceCategoryMapper
;
import
com.onsiteservice.dao.mapper.service.ServiceSubclassMapper
;
import
com.onsiteservice.dao.util.EntityUtils
;
import
com.onsiteservice.dao.util.EntityUtils
;
import
com.onsiteservice.entity.category.ServiceCategory
;
import
com.onsiteservice.entity.category.ServiceSubclass
;
import
com.onsiteservice.entity.category.ServiceSubclass
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collector
;
import
java.util.stream.Collectors
;
/**
/**
* @author 商天翔
* @author 商天翔
* @date 2022-07-13 17:03
* @date 2022-07-13 17:03
...
@@ -15,6 +25,11 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -15,6 +25,11 @@ import org.springframework.transaction.annotation.Transactional;
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
class
ServiceSubclassService
extends
AbstractMapper
<
ServiceSubclass
>
{
public
class
ServiceSubclassService
extends
AbstractMapper
<
ServiceSubclass
>
{
@Resource
private
ServiceSubclassMapper
serviceSubclassMapper
;
@Resource
private
ServiceCategoryMapper
serviceCategoryMapper
;
/**
/**
* 保存或更新方法
* 保存或更新方法
*/
*/
...
@@ -29,4 +44,13 @@ public class ServiceSubclassService extends AbstractMapper<ServiceSubclass> {
...
@@ -29,4 +44,13 @@ public class ServiceSubclassService extends AbstractMapper<ServiceSubclass> {
}
}
public
List
<
Map
>
getSubClassSelectable
()
{
List
<
ServiceCategory
>
categories
=
serviceCategoryMapper
.
selectAll
();
Map
<
Integer
,
String
>
categoryMap
=
categories
.
stream
().
collect
(
Collectors
.
toMap
(
ServiceCategory:
:
getId
,
ServiceCategory:
:
getServiceName
));
List
<
ServiceSubclass
>
subclassList
=
serviceSubclassMapper
.
selectAll
();
return
subclassList
.
stream
().
sorted
(
Comparator
.
comparing
(
ServiceSubclass:
:
getCategoryId
))
.
map
(
sub
->
Map
.
of
(
"value"
,
sub
.
getId
(),
"label"
,
categoryMap
.
get
(
sub
.
getCategoryId
())
+
"-"
+
sub
.
getServiceName
()))
.
collect
(
Collectors
.
toList
());
}
}
}
admin/src/main/resources/mapper/order/ServiceOrderBizMapper.xml
View file @
4c218184
...
@@ -42,6 +42,9 @@
...
@@ -42,6 +42,9 @@
<if
test=
"param.address != null"
>
<if
test=
"param.address != null"
>
and t.address like "%"#{param.address}"%"
and t.address like "%"#{param.address}"%"
</if>
</if>
<if
test=
"param.userName != null"
>
and t2.user_name like "%"#{param.userName}"%"
</if>
</where>
</where>
order by
order by
<choose>
<choose>
...
...
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