|
@@ -3,7 +3,6 @@ package com.fdkankan.ucenter.service.impl;
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.aliyun.oss.OSS;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
@@ -20,10 +19,7 @@ import com.fdkankan.ucenter.common.PageInfo;
|
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
|
import com.fdkankan.image.MatrixToImageWriterUtil;
|
|
|
import com.fdkankan.ucenter.common.constants.ConstantFilePath;
|
|
|
-import com.fdkankan.ucenter.common.constants.NacosProperty;
|
|
|
-import com.fdkankan.ucenter.common.constants.UploadFilePath;
|
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
|
-import com.fdkankan.ucenter.common.RedisKeyUtil;
|
|
|
import com.fdkankan.ucenter.common.utils.ShellUtil;
|
|
|
import com.fdkankan.ucenter.constant.CameraConstant;
|
|
|
import com.fdkankan.ucenter.constant.LoginConstant;
|
|
@@ -428,13 +424,15 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
folderList.addAll(sceneList);
|
|
|
}
|
|
|
sceneVoPage.setRecords(folderList);
|
|
|
- if(param.getFolderId() == null){
|
|
|
+ if(param.getFolderId() == null && param.getIsObj()!=1){
|
|
|
List<String> sourceList = param.getSourceList();
|
|
|
totalSceneNum = this.getCountByUserId(user.getId(),sourceList);
|
|
|
totalSceneNum += scenePlusService.getCountByUserId(user.getId(),sourceList);
|
|
|
totalSceneNum += sceneService.getCountByUserId(user.getId());
|
|
|
- }else {
|
|
|
+ }else if(param.getFolderId() != null ){
|
|
|
totalSceneNum = folderSceneService.getCountByFolderAndSon(param.getFolderId());
|
|
|
+ }else if(param.getIsObj() ==1){
|
|
|
+ totalSceneNum = this.getCountByLaserAndIsObj(user.getId());
|
|
|
}
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("pageInfo",PageInfo.PageInfo(sceneVoPage));
|
|
@@ -442,6 +440,32 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
+ private Long getCountByLaserAndIsObj(Long userId) {
|
|
|
+ Long proCount = 0L;
|
|
|
+ Long plusCount = 0L;
|
|
|
+ LambdaQueryWrapper<ScenePro> proWr = new LambdaQueryWrapper<>();
|
|
|
+ proWr.eq(ScenePro::getUserId,userId);
|
|
|
+ proWr.eq(ScenePro::getSceneSource,4);
|
|
|
+ proWr.eq(ScenePro::getIsObj,1);
|
|
|
+ proWr.eq(ScenePro::getIsUpgrade,0);
|
|
|
+ proCount = this.count(proWr);
|
|
|
+
|
|
|
+ LambdaQueryWrapper<ScenePlus> plusWr = new LambdaQueryWrapper<>();
|
|
|
+ plusWr.eq(ScenePlus::getUserId,userId);
|
|
|
+ plusWr.eq(ScenePlus::getSceneSource,4);
|
|
|
+ List<ScenePlus> list = scenePlusService.list(plusWr);
|
|
|
+ if(list.size() >0){
|
|
|
+ List<Long> plusIds = list.stream().map(ScenePlus::getId).collect(Collectors.toList());
|
|
|
+
|
|
|
+ LambdaQueryWrapper<ScenePlusExt> extWr = new LambdaQueryWrapper<>();
|
|
|
+ extWr.in(ScenePlusExt::getPlusId,plusIds);
|
|
|
+ extWr.eq(ScenePlusExt::getIsObj,1);
|
|
|
+ plusCount = scenePlusExtService.count(extWr);
|
|
|
+ }
|
|
|
+
|
|
|
+ return proCount +plusCount;
|
|
|
+ }
|
|
|
+
|
|
|
public List<String> getSceneSource(String sceneSource){
|
|
|
List<String> sceneSourceList ;
|
|
|
switch (sceneSource){
|