|
@@ -2,15 +2,22 @@ package com.fdkankan.fusion.service.impl;
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.fdkankan.fusion.common.PageInfo;
|
|
|
import com.fdkankan.fusion.entity.ScenePlus;
|
|
|
import com.fdkankan.fusion.mapper.IScenePlusMapper;
|
|
|
+import com.fdkankan.fusion.request.CaseParam;
|
|
|
import com.fdkankan.fusion.request.DataParam;
|
|
|
import com.fdkankan.fusion.response.DataGroupVo;
|
|
|
import com.fdkankan.fusion.service.IScenePlusService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fdkankan.fusion.service.ISceneService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -23,7 +30,8 @@ import java.util.List;
|
|
|
@Service
|
|
|
|
|
|
public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlus> implements IScenePlusService {
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ ISceneService sceneService;
|
|
|
@Override
|
|
|
public ScenePlus getByNum(String sceneNum) {
|
|
|
LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
|
|
@@ -48,4 +56,15 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
|
|
|
wrapper.in(ScenePlus::getNum,numList);
|
|
|
return this.list(wrapper);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Page<ScenePlus> pageList(CaseParam param) {
|
|
|
+ Page<ScenePlus> page = this.getBaseMapper().scenePostPage(new Page<>(param.getPageNum(), param.getPageSize()),param);
|
|
|
+ List<String> collect = page.getRecords().stream().map(ScenePlus::getNum).collect(Collectors.toList());
|
|
|
+ HashMap<String, String> mappingMap = sceneService.getMappingMap(collect);
|
|
|
+ for (ScenePlus record : page.getRecords()) {
|
|
|
+ record.setMapping(mappingMap.get(record.getNum()));
|
|
|
+ }
|
|
|
+ return page;
|
|
|
+ }
|
|
|
}
|