Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
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
huluobin
gogirl-miniapp-backend
Commits
cf73f626
Commit
cf73f626
authored
Jun 04, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
6983b8ad
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
5 deletions
+71
-5
ITechniqueSkuService.java
...ogirl/application/product/serve/ITechniqueSkuService.java
+3
-1
TechniqueSkuServiceImpl.java
...plication/product/serve/impl/TechniqueSkuServiceImpl.java
+31
-2
ScheduleServeMapper.java
...nfrastructure/mapper/order/serve/ScheduleServeMapper.java
+18
-0
TechniqueSkuController.java
...girl/interfaces/product/serve/TechniqueSkuController.java
+3
-2
ScheduleServeMapper.xml
src/main/resources/mapper/order/ScheduleServeMapper.xml
+16
-0
No files found.
src/main/java/com/gogirl/application/product/serve/ITechniqueSkuService.java
View file @
cf73f626
...
...
@@ -19,16 +19,18 @@ public interface ITechniqueSkuService extends IService<TechniqueSku> {
/**
* 查询所哟款式技法
*
* @return
*/
List
<
TechniqueSku
>
queryAll
();
/**
* 查询所有款式技法分组 包括默认数量 单选多选
*
* @return
*/
Map
<
String
,
List
<
TechniqueSku
>>
queryTechniqueSkuMap
();
List
<
TechniqueCategory
>
queryTechniqueCategoryAggregate
();
List
<
TechniqueCategory
>
queryTechniqueCategoryAggregate
(
Integer
scheduleServeId
);
}
src/main/java/com/gogirl/application/product/serve/impl/TechniqueSkuServiceImpl.java
View file @
cf73f626
...
...
@@ -3,9 +3,13 @@ package com.gogirl.application.product.serve.impl;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.gogirl.application.product.serve.ITechniqueSkuService
;
import
com.gogirl.domain.order.serve.ScheduleServe
;
import
com.gogirl.domain.product.serve.BaseServe
;
import
com.gogirl.domain.product.serve.TechniqueCategory
;
import
com.gogirl.domain.product.serve.TechniqueSku
;
import
com.gogirl.infrastructure.common.util.JsonUtilByFsJson
;
import
com.gogirl.infrastructure.mapper.order.serve.ScheduleServeMapper
;
import
com.gogirl.infrastructure.mapper.product.serve.BaseServeMapper
;
import
com.gogirl.infrastructure.mapper.product.serve.TechniqueCategoryMapper
;
import
com.gogirl.infrastructure.mapper.product.serve.TechniqueSkuMapper
;
import
org.springframework.stereotype.Service
;
...
...
@@ -53,10 +57,35 @@ public class TechniqueSkuServiceImpl extends ServiceImpl<TechniqueSkuMapper, Tec
return
result
;
}
@Resource
ScheduleServeMapper
scheduleServeMapper
;
@Resource
BaseServeMapper
baseServeMapper
;
private
final
String
TECH_REMOVE_ARMOR
=
"卸甲"
;
private
final
String
TECH_EXTEND
=
"光疗延长"
;
@Override
public
List
<
TechniqueCategory
>
queryTechniqueCategoryAggregate
()
{
public
List
<
TechniqueCategory
>
queryTechniqueCategoryAggregate
(
Integer
scheduleServeId
)
{
ScheduleServe
scheduleServe
=
scheduleServeMapper
.
selectById
(
scheduleServeId
);
BaseServe
baseServe
=
baseServeMapper
.
selectById
(
scheduleServe
.
getServeId
());
ScheduleServe
subRemoveArmor
=
scheduleServeMapper
.
subRemoveArmor
(
scheduleServeId
,
scheduleServe
.
getSchId
());
ScheduleServe
subExtend
=
scheduleServeMapper
.
subExtend
(
scheduleServeId
,
scheduleServe
.
getSchId
());
List
<
TechniqueSku
>
techniqueSkuList
=
this
.
list
();
List
<
TechniqueCategory
>
techniqueCategoryList
=
techniqueCategoryMapper
.
selectList
(
new
LambdaQueryWrapper
<>());
LambdaQueryWrapper
<
TechniqueCategory
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
TechniqueCategory:
:
getServiceTypeId
,
baseServe
.
getTypeId
());
if
(
subRemoveArmor
!=
null
)
{
wrapper
.
ne
(
TechniqueCategory:
:
getName
,
TECH_REMOVE_ARMOR
);
}
if
(
subExtend
!=
null
)
{
wrapper
.
ne
(
TechniqueCategory:
:
getName
,
TECH_EXTEND
);
}
List
<
TechniqueCategory
>
techniqueCategoryList
=
techniqueCategoryMapper
.
selectList
(
wrapper
);
Map
<
Integer
,
List
<
TechniqueSku
>>
integerListMap
=
techniqueSkuList
.
stream
().
collect
(
Collectors
.
groupingBy
(
TechniqueSku:
:
getTechniqueCategoryId
));
...
...
src/main/java/com/gogirl/infrastructure/mapper/order/serve/ScheduleServeMapper.java
View file @
cf73f626
...
...
@@ -24,4 +24,22 @@ public interface ScheduleServeMapper extends BaseMapper<ScheduleServe> {
List
<
ScheduleServe
>
selectUpdateStatusList
(
@Param
(
"schId"
)
Integer
schId
,
@Param
(
"serveId"
)
Integer
serveId
);
/**
* 服务的卸甲子服务
*
* @param scheduleServeId
* @return
*/
ScheduleServe
subRemoveArmor
(
@Param
(
"scheduleServeId"
)
Integer
scheduleServeId
,
@Param
(
"scheduleId"
)
Integer
scheduleId
);
/**
* 服务的延长子服务
*
* @param scheduleServeId
* @param scheduleId
* @return
*/
ScheduleServe
subExtend
(
@Param
(
"scheduleServeId"
)
Integer
scheduleServeId
,
@Param
(
"scheduleId"
)
Integer
scheduleId
);
}
src/main/java/com/gogirl/interfaces/product/serve/TechniqueSkuController.java
View file @
cf73f626
...
...
@@ -8,6 +8,7 @@ import com.gogirl.infrastructure.common.base.JsonResult;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
...
...
@@ -55,8 +56,8 @@ public class TechniqueSkuController {
@ApiOperation
(
"查询所有款式技法分组"
)
@GetMapping
(
"/technician/techniqueSku/queryTechniqueCategoryAggregate"
)
public
JsonResult
<
List
<
TechniqueCategory
>>
queryTechniqueCategoryAggregate
()
{
List
<
TechniqueCategory
>
techniqueCategoryList
=
techniqueSkuService
.
queryTechniqueCategoryAggregate
();
public
JsonResult
<
List
<
TechniqueCategory
>>
queryTechniqueCategoryAggregate
(
@RequestParam
(
required
=
false
)
Integer
scheduleServeId
)
{
List
<
TechniqueCategory
>
techniqueCategoryList
=
techniqueSkuService
.
queryTechniqueCategoryAggregate
(
scheduleServeId
);
return
JsonResult
.
success
(
techniqueCategoryList
);
}
...
...
src/main/resources/mapper/order/ScheduleServeMapper.xml
View file @
cf73f626
...
...
@@ -23,5 +23,21 @@
where sch_id = #{schId}
and (serve_id = #{serveId} or main_serve_id = #{serveId})
</select>
<select
id=
"subRemoveArmor"
resultType=
"com.gogirl.domain.order.serve.ScheduleServe"
>
select *
from scheduled_serve
where sch_id = #{scheduleId}
and main_serve_id = #{scheduleServeId}
and serve_name like concat('%', '卸甲', '%')
limit 1
</select>
<select
id=
"subExtend"
resultType=
"com.gogirl.domain.order.serve.ScheduleServe"
>
select *
from scheduled_serve
where sch_id = #{scheduleId}
and main_serve_id = #{scheduleServeId}
and serve_name like concat('%', '延长', '%')
limit 1
</select>
</mapper>
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