Commit a2aefa4e by huluobin

update

parent cf73f626
...@@ -68,25 +68,27 @@ public class TechniqueSkuServiceImpl extends ServiceImpl<TechniqueSkuMapper, Tec ...@@ -68,25 +68,27 @@ public class TechniqueSkuServiceImpl extends ServiceImpl<TechniqueSkuMapper, Tec
@Override @Override
public List<TechniqueCategory> queryTechniqueCategoryAggregate(Integer scheduleServeId) { public List<TechniqueCategory> queryTechniqueCategoryAggregate(Integer scheduleServeId) {
List<TechniqueSku> techniqueSkuList = this.list();
LambdaQueryWrapper<TechniqueCategory> wrapper = new LambdaQueryWrapper<>();
if (scheduleServeId != null) {
ScheduleServe scheduleServe = scheduleServeMapper.selectById(scheduleServeId); ScheduleServe scheduleServe = scheduleServeMapper.selectById(scheduleServeId);
BaseServe baseServe = baseServeMapper.selectById(scheduleServe.getServeId()); BaseServe baseServe = baseServeMapper.selectById(scheduleServe.getServeId());
ScheduleServe subRemoveArmor = scheduleServeMapper.subRemoveArmor(scheduleServeId, scheduleServe.getSchId()); ScheduleServe subRemoveArmor = scheduleServeMapper.subRemoveArmor(scheduleServeId, scheduleServe.getSchId());
ScheduleServe subExtend = scheduleServeMapper.subExtend(scheduleServeId, scheduleServe.getSchId()); ScheduleServe subExtend = scheduleServeMapper.subExtend(scheduleServeId, scheduleServe.getSchId());
List<TechniqueSku> techniqueSkuList = this.list();
LambdaQueryWrapper<TechniqueCategory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(TechniqueCategory::getServiceTypeId, baseServe.getTypeId()); wrapper.eq(TechniqueCategory::getServiceTypeId, baseServe.getTypeId());
if (subRemoveArmor != null) { if (subRemoveArmor != null) {
wrapper.ne(TechniqueCategory::getName, TECH_REMOVE_ARMOR); wrapper.ne(TechniqueCategory::getName, TECH_REMOVE_ARMOR);
} }
if (subExtend != null) { if (subExtend != null) {
wrapper.ne(TechniqueCategory::getName, TECH_EXTEND); wrapper.ne(TechniqueCategory::getName, TECH_EXTEND);
} }
}
List<TechniqueCategory> techniqueCategoryList = techniqueCategoryMapper.selectList(wrapper); List<TechniqueCategory> techniqueCategoryList = techniqueCategoryMapper.selectList(wrapper);
Map<Integer, List<TechniqueSku>> integerListMap = techniqueSkuList.stream().collect(Collectors.groupingBy(TechniqueSku::getTechniqueCategoryId)); Map<Integer, List<TechniqueSku>> integerListMap = techniqueSkuList.stream().collect(Collectors.groupingBy(TechniqueSku::getTechniqueCategoryId));
techniqueCategoryList.forEach(techniqueCategory -> { techniqueCategoryList.forEach(techniqueCategory -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment