Commit a2aefa4e by huluobin

update

parent cf73f626
......@@ -68,25 +68,27 @@ public class TechniqueSkuServiceImpl extends ServiceImpl<TechniqueSkuMapper, Tec
@Override
public List<TechniqueCategory> queryTechniqueCategoryAggregate(Integer scheduleServeId) {
ScheduleServe scheduleServe = scheduleServeMapper.selectById(scheduleServeId);
BaseServe baseServe = baseServeMapper.selectById(scheduleServe.getServeId());
List<TechniqueSku> techniqueSkuList = this.list();
LambdaQueryWrapper<TechniqueCategory> wrapper = new LambdaQueryWrapper<>();
ScheduleServe subRemoveArmor = scheduleServeMapper.subRemoveArmor(scheduleServeId, scheduleServe.getSchId());
ScheduleServe subExtend = scheduleServeMapper.subExtend(scheduleServeId, scheduleServe.getSchId());
if (scheduleServeId != null) {
ScheduleServe scheduleServe = scheduleServeMapper.selectById(scheduleServeId);
BaseServe baseServe = baseServeMapper.selectById(scheduleServe.getServeId());
List<TechniqueSku> techniqueSkuList = this.list();
ScheduleServe subRemoveArmor = scheduleServeMapper.subRemoveArmor(scheduleServeId, scheduleServe.getSchId());
ScheduleServe subExtend = scheduleServeMapper.subExtend(scheduleServeId, scheduleServe.getSchId());
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);
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));
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