SceneProServiceImpl.java 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. package com.fdkankan.manage.service.impl;
  2. import cn.hutool.core.io.FileUtil;
  3. import cn.hutool.json.JSONUtil;
  4. import com.alibaba.fastjson.JSONObject;
  5. import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  6. import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
  7. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  8. import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  9. import com.fdkankan.common.constant.SceneConstant;
  10. import com.fdkankan.fyun.face.FYunFileServiceInterface;
  11. import com.fdkankan.manage.common.OssPath;
  12. import com.fdkankan.manage.common.ResultCode;
  13. import com.fdkankan.manage.exception.BusinessException;
  14. import com.fdkankan.manage.common.PageInfo;
  15. import com.fdkankan.common.util.*;
  16. import com.fdkankan.manage.httpClient.client.FdKKClient;
  17. import com.fdkankan.manage.httpClient.service.LaserService;
  18. import com.fdkankan.manage.common.CameraConstant;
  19. import com.fdkankan.manage.entity.*;
  20. import com.fdkankan.manage.mapper.ISceneProMapper;
  21. import com.fdkankan.manage.service.*;
  22. import com.fdkankan.manage.util.SceneStatusUtil;
  23. import com.fdkankan.manage.vo.request.SceneParam;
  24. import com.fdkankan.manage.vo.response.CameraDataVo;
  25. import com.fdkankan.manage.vo.response.GroupByCount;
  26. import com.fdkankan.manage.vo.response.SceneVo;
  27. import lombok.extern.slf4j.Slf4j;
  28. import org.apache.commons.lang3.StringUtils;
  29. import org.springframework.beans.factory.annotation.Autowired;
  30. import org.springframework.beans.factory.annotation.Value;
  31. import org.springframework.stereotype.Service;
  32. import org.springframework.util.ObjectUtils;
  33. import javax.annotation.Resource;
  34. import java.io.File;
  35. import java.util.*;
  36. import java.util.concurrent.CompletableFuture;
  37. import java.util.stream.Collectors;
  38. /**
  39. * <p>
  40. * pro场景表 服务实现类
  41. * </p>
  42. *
  43. * @author
  44. * @since 2022-06-16
  45. */
  46. @Service
  47. @Slf4j
  48. public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro> implements ISceneProService {
  49. @Autowired
  50. private ICameraService cameraService;
  51. @Autowired
  52. ICameraDetailService cameraDetailService;
  53. @Autowired
  54. ISceneService sceneService;
  55. @Autowired
  56. ISceneCopyLogService copyLogService;
  57. @Autowired
  58. IUserIncrementService userIncrementService;
  59. @Autowired
  60. IIncrementTypeService incrementTypeService;
  61. @Autowired
  62. ISceneProEditService sceneProEditService;
  63. @Autowired
  64. FYunFileServiceInterface fYunFileServiceInterface;
  65. @Autowired
  66. IScenePlusService scenePlusService;
  67. @Autowired
  68. IScene3dNumService scene3dNumService;
  69. @Autowired
  70. ISceneCopyLogService sceneCopyLogService;
  71. @Autowired
  72. IScenePlusExtService scenePlusExtService;
  73. @Autowired
  74. LaserService laserService;
  75. @Autowired
  76. FdKKClient fdKKClient;
  77. @Override
  78. public ScenePro getByNum(String num) {
  79. LambdaQueryWrapper<ScenePro> wrapper = new LambdaQueryWrapper<>();
  80. wrapper.eq(ScenePro::getNum,num);
  81. wrapper.eq(ScenePro::getIsUpgrade,0);
  82. List<ScenePro> list = this.list(wrapper);
  83. if(list == null || list.size() <=0){
  84. return null;
  85. }
  86. return list.get(0);
  87. }
  88. @Override
  89. public HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList) {
  90. HashMap<Long,Long> map = new HashMap<>();
  91. List<GroupByCount> result = this.getBaseMapper().getCountGroupByUserId(userIdList);
  92. result.forEach(entity ->map.put(entity.getId(),entity.getCount()));
  93. return map;
  94. }
  95. @Override
  96. public HashMap<Long, Long> getCountGroupByCameraId(List<Long> cameraIds) {
  97. HashMap<Long,Long> map = new HashMap<>();
  98. List<GroupByCount> result = this.getBaseMapper().getCountGroupByCameraId(cameraIds);
  99. result.forEach(entity ->map.put(entity.getId(),entity.getCount()));
  100. return map;
  101. }
  102. @Override
  103. public void unbindCamera(Long cameraId) {
  104. LambdaUpdateWrapper<ScenePro> wrapper = new LambdaUpdateWrapper<>();
  105. wrapper.set(ScenePro::getUserId,null)
  106. .eq(ScenePro::getCameraId,cameraId);
  107. wrapper.eq(ScenePro::getIsUpgrade,0);
  108. this.update(wrapper);
  109. }
  110. @Override
  111. public List<ScenePro> getListByCameraId(Long cameraId) {
  112. LambdaQueryWrapper<ScenePro> wrapper = new LambdaQueryWrapper<>();
  113. wrapper.eq(ScenePro::getCameraId,cameraId);
  114. wrapper.eq(ScenePro::getIsUpgrade,0);
  115. return this.list(wrapper);
  116. }
  117. /**
  118. * @param payStatus -2 封存,为 1 解封
  119. */
  120. @Override
  121. public void lockOrUnLockBySpace(CameraDetail cameraDetail, Long cameraId, Integer payStatus) {
  122. LambdaQueryWrapper<ScenePro> wrapper = new LambdaQueryWrapper<>();
  123. LambdaQueryWrapper<ScenePlus> plusWr = new LambdaQueryWrapper<>();
  124. Long totalSpace = cameraDetail.getTotalSpace();
  125. UserIncrement userIncrement = userIncrementService.getByCameraId(cameraId);
  126. if(userIncrement!=null){
  127. IncrementType incrementType = incrementTypeService.getById(userIncrement.getIncrementTypeId());
  128. if(incrementType!=null){
  129. if(incrementType.getCameraCapacity() == -1){
  130. totalSpace = -1L;
  131. }else {
  132. totalSpace = incrementType.getCameraCapacity() * 1024 * 1024L;
  133. }
  134. }
  135. }
  136. log.info("lockOrUnLockBySpace---cameraId:{},payStatus:{},totalSpace:{},useSpace{}",
  137. cameraId,payStatus,totalSpace,cameraDetail.getUsedSpace());
  138. if(payStatus == 1){ //解封,判断用户权益,用户会员权益无限容量
  139. wrapper.orderByAsc(ScenePro::getCreateTime);
  140. plusWr.orderByAsc(ScenePlus::getCreateTime);
  141. wrapper.eq(ScenePro::getPayStatus,-2);
  142. plusWr.eq(ScenePlus::getPayStatus,-2);
  143. }else {
  144. if (totalSpace >= cameraDetail.getUsedSpace()) {
  145. // 总容量大于已使用容量,不予封存
  146. return;
  147. }
  148. wrapper.orderByDesc(ScenePro::getCreateTime);
  149. plusWr.orderByDesc(ScenePlus::getCreateTime);
  150. wrapper.eq(ScenePro::getPayStatus,1);
  151. plusWr.eq(ScenePlus::getPayStatus,1);
  152. }
  153. wrapper.eq(ScenePro::getCameraId,cameraId)
  154. .eq(ScenePro::getIsUpgrade,0);
  155. plusWr.eq(ScenePlus::getCameraId,cameraId);
  156. List<ScenePro> list = this.list(wrapper);
  157. List<ScenePlus> plusList = scenePlusService.list(plusWr);
  158. Long beyondSpace = Math.abs(cameraDetail.getUsedSpace() - totalSpace);
  159. Long accumulateSpace = 0L;
  160. List<Long> lockedIds = new ArrayList<>();
  161. if(payStatus == 1){
  162. Long doSpace = getScenePlusLockedIds(lockedIds, plusList, totalSpace, beyondSpace, accumulateSpace);
  163. beyondSpace -= doSpace;
  164. getSceneLockedIds(lockedIds,list,totalSpace,beyondSpace,accumulateSpace);
  165. }else {
  166. Long doSpace = getSceneLockedIds(lockedIds, list, totalSpace, beyondSpace, accumulateSpace);
  167. beyondSpace -= doSpace;
  168. getScenePlusLockedIds(lockedIds,plusList,totalSpace,beyondSpace,accumulateSpace);
  169. }
  170. lockOrUnLockScenes(lockedIds,payStatus);
  171. }
  172. private Long getSceneLockedIds(List<Long> lockedIds ,List<ScenePro> list,Long count,Long beyondSpace,Long accumulateSpace){
  173. if (list != null && list.size() > 0){
  174. for (ScenePro scenePro : list){
  175. accumulateSpace += scenePro.getSpace();
  176. if (count ==-1 && accumulateSpace.compareTo(beyondSpace) > 0){
  177. return accumulateSpace - scenePro.getSpace();
  178. }
  179. lockedIds.add(scenePro.getId());
  180. }
  181. }
  182. return accumulateSpace;
  183. }
  184. private Long getScenePlusLockedIds(List<Long> lockedIds , List<ScenePlus> list, Long count, Long beyondSpace, Long accumulateSpace){
  185. if (list != null && list.size() > 0){
  186. List<Long> plusIds = list.parallelStream().map(ScenePlus::getId).collect(Collectors.toList());
  187. HashMap<Long, ScenePlusExt> byPlusIds = scenePlusExtService.getByPlusIds(plusIds);
  188. for (ScenePlus scenePlus : list){
  189. ScenePlusExt scenePlusExt = byPlusIds.get(scenePlus.getId());
  190. accumulateSpace += scenePlusExt.getSpace();
  191. if (count ==-1 && accumulateSpace.compareTo(beyondSpace) > 0){
  192. return accumulateSpace - scenePlusExt.getSpace();
  193. }
  194. lockedIds.add(scenePlus.getId());
  195. }
  196. }
  197. return accumulateSpace;
  198. }
  199. // payStatus 为 -2 封存,为 1 解封
  200. private void lockOrUnLockScenes(List<Long> lockedIds,Integer payStatus) {
  201. if (lockedIds == null || lockedIds.size() == 0){
  202. return;
  203. }
  204. LambdaUpdateWrapper<ScenePro> updateWrapper = new LambdaUpdateWrapper<>();
  205. updateWrapper.set(ScenePro::getPayStatus,payStatus)
  206. .eq(ScenePro::getIsUpgrade,0)
  207. .in(ScenePro::getId,lockedIds);
  208. this.update(updateWrapper);
  209. LambdaUpdateWrapper<ScenePlus> updatePlusWrapper = new LambdaUpdateWrapper<>();
  210. updatePlusWrapper.set(ScenePlus::getPayStatus,payStatus)
  211. .in(ScenePlus::getId,lockedIds);
  212. scenePlusService.update(updatePlusWrapper);
  213. this.updateOssStatus(lockedIds,payStatus);
  214. }
  215. /**
  216. * 修改oss status.json中 payStatus
  217. */
  218. private void updateOssStatus(List<Long> lockedIds, Integer payStatus) {
  219. LambdaQueryWrapper<ScenePro> proWr = new LambdaQueryWrapper<>();
  220. proWr.eq(ScenePro::getIsUpgrade,0);
  221. proWr.in(ScenePro::getId,lockedIds);
  222. List<ScenePro> proList = this.list(proWr);
  223. LambdaQueryWrapper<ScenePlus> pluWr = new LambdaQueryWrapper<>();
  224. pluWr.in(ScenePlus::getId,lockedIds);
  225. List<ScenePlus> plusList = scenePlusService.list(pluWr);
  226. for (ScenePro scenePro : proList) {
  227. this.updateOssStatus(String.format(OssPath.v3_statusPath,scenePro.getNum()),payStatus);
  228. }
  229. for (ScenePlus scenePlus : plusList) {
  230. this.updateOssStatus(String.format(OssPath.v4_statusPath,scenePlus.getNum()),payStatus);
  231. }
  232. }
  233. /**
  234. * 从oss中获取文件,并重写,上传替换
  235. */
  236. private void updateOssStatus(String path,Integer payStatus) {
  237. try {
  238. if(!fYunFileServiceInterface.fileExist(path)){
  239. return;
  240. }
  241. String data = fYunFileServiceInterface.getFileContent("4dkankan",path);
  242. if(StringUtils.isBlank(data)){
  243. return;
  244. }
  245. JSONObject jsonObject = JSONObject.parseObject(data);
  246. jsonObject.put("payStatus",payStatus);
  247. String json = JSONUtil.toJsonStr(jsonObject);
  248. FileUtils.writeFile(OssPath.localStatusPath ,json);
  249. log.info("updateOssStatus--localPath:{},ossPath:{}",OssPath.localStatusPath,path);
  250. fYunFileServiceInterface.uploadFile(OssPath.localStatusPath,path);
  251. }catch (Exception e){
  252. e.printStackTrace();
  253. }finally {
  254. FileUtil.del(OssPath.localStatusPath);
  255. }
  256. }
  257. @Override
  258. public PageInfo pageList(SceneParam param) {
  259. if(param.getType() == 2){ //深时
  260. return laserService.pageList(param);
  261. }
  262. if(param.getType() == 3){ //双目lite
  263. return sceneService.pageList(param);
  264. }
  265. Page<SceneVo> page = this.getBaseMapper().pageList(new Page<>(param.getPageNum(),param.getPageSize()),param);
  266. List<SceneVo> records = page.getRecords();
  267. HashMap<String,SceneCopyLog> map = null;
  268. if(records.size() >0){
  269. List<String> numList = records.parallelStream().map(SceneVo::getNum).collect(Collectors.toList());
  270. map = copyLogService.getByNewNumList(numList);
  271. }
  272. for (SceneVo record : page.getRecords()) {
  273. record.setStatusString(SceneStatusUtil.getStatusString(record));
  274. if(map !=null ){
  275. SceneCopyLog sceneCopyLog = map.get(record.getNum());
  276. if(sceneCopyLog != null){
  277. record.setCopyTime(sceneCopyLog.getCreateTime());
  278. record.setIsCopy(true);
  279. }
  280. }
  281. }
  282. return PageInfo.PageInfo(page);
  283. }
  284. @Override
  285. public void move(SceneParam param) {
  286. Camera camera = cameraService.getBySnCode(param.getSnCode());
  287. if(camera == null){
  288. throw new BusinessException(ResultCode.CAMERA_SN_NOT_EXIST);
  289. }
  290. CameraDetail cameraDetail = cameraDetailService.getByCameraId(camera.getId());
  291. if(cameraDetail == null){
  292. throw new BusinessException(ResultCode.CAMERA_SN_NOT_EXIST);
  293. }
  294. ScenePro scenePro = this.getByNum(param.getNum());
  295. ScenePlus scenePlus = scenePlusService.getByNum(param.getNum());
  296. if((scenePro == null || scenePro.getCameraId() == null ) && (scenePlus== null || scenePlus.getCameraId() == null)){
  297. throw new BusinessException(SceneConstant.FAILURE_CODE_5005, SceneConstant.FAILURE_MSG_5005);
  298. }
  299. Integer status = scenePro == null ? scenePlus.getSceneStatus() : scenePro.getStatus();
  300. if(status == 0){
  301. throw new BusinessException(SceneConstant.FAILURE_CODE_5037, SceneConstant.FAILURE_MSG_5037);
  302. }
  303. Long cameraId = scenePro == null ? scenePlus.getCameraId() : scenePro.getCameraId();
  304. Long space = scenePro == null ? 0 :scenePro.getSpace();
  305. if(scenePlus !=null){
  306. ScenePlusExt scenePlusExt = scenePlusExtService.getByPlusId(scenePlus.getId());
  307. space = scenePlusExt.getSpace();
  308. }
  309. space = space == null ? 0 :space;
  310. Long newUseSpace = space + cameraDetail.getUsedSpace();
  311. Long totalSpace = cameraDetail.getTotalSpace();
  312. UserIncrement userIncrement = userIncrementService.getByCameraId(cameraId);
  313. if(userIncrement!=null){
  314. IncrementType incrementType = incrementTypeService.getById(userIncrement.getIncrementTypeId());
  315. if(incrementType!=null){
  316. if(incrementType.getCameraCapacity() == -1){
  317. totalSpace = -1L;
  318. }else {
  319. totalSpace = incrementType.getCameraCapacity() * 1024 * 1024L;
  320. }
  321. }
  322. }
  323. //深时场景无限容量
  324. if(cameraDetail.getType() != 10 && totalSpace !=-1 && newUseSpace > totalSpace){
  325. throw new BusinessException(ResultCode.CAMERA_SPACE_ERROR);
  326. }
  327. Camera oldCamera = cameraService.getById(cameraId);
  328. if(oldCamera == null){
  329. throw new BusinessException(ResultCode.CAMERA_NOT_EXIST);
  330. }
  331. CameraDetail oldCameraDetail = cameraDetailService.getByCameraId(oldCamera.getId());
  332. if(oldCameraDetail == null){
  333. throw new BusinessException(ResultCode.CAMERA_NOT_EXIST);
  334. }
  335. if(!oldCameraDetail.getType().equals(cameraDetail.getType())){
  336. throw new BusinessException(ResultCode.CAMERA_TYPE_NOT_ERROR);
  337. }
  338. Long oldUseSpace = oldCameraDetail.getUsedSpace() - space < 0 ? 0 : oldCameraDetail.getUsedSpace() - space;
  339. oldCameraDetail.setUsedSpace(oldUseSpace);
  340. Long subSpace = oldCameraDetail.getTotalSpace() - oldUseSpace;
  341. if(cameraDetail.getType() != 10 && subSpace >0){ //有剩余容量解封容量内场景
  342. this.lockOrUnLockBySpace(oldCameraDetail,oldCameraDetail.getCameraId(),1);
  343. }
  344. cameraDetailService.updateById(oldCameraDetail);
  345. cameraDetail.setUsedSpace(newUseSpace);
  346. cameraDetailService.updateById(cameraDetail);
  347. if(scenePro!=null){
  348. LambdaUpdateWrapper<ScenePro> wrapper = new LambdaUpdateWrapper<>();
  349. wrapper.eq(ScenePro::getId,scenePro.getId());
  350. wrapper.set(ScenePro::getCameraId,camera.getId());
  351. wrapper.set(ScenePro::getUserId,cameraDetail.getUserId());
  352. this.update(wrapper);
  353. }
  354. if(scenePlus!=null){
  355. LambdaUpdateWrapper<ScenePlus> wrapper = new LambdaUpdateWrapper<>();
  356. wrapper.eq(ScenePlus::getId,scenePlus.getId());
  357. wrapper.set(ScenePlus::getCameraId,camera.getId());
  358. wrapper.set(ScenePlus::getUserId,cameraDetail.getUserId());
  359. scenePlusService.update(wrapper);
  360. }
  361. if(cameraDetail.getType() == 10){ //深时场景
  362. laserService.move(param.getNum(),oldCamera.getSnCode(),camera.getSnCode());
  363. }
  364. }
  365. @Override
  366. public void copy(String sceneNum) throws Exception {
  367. ScenePro scenePro = this.getByNum(sceneNum);
  368. ScenePlus scenePlus = scenePlusService.getByNum(sceneNum);
  369. if((scenePro == null || scenePro.getCameraId() == null ) && (scenePlus== null || scenePlus.getCameraId() == null)){
  370. throw new BusinessException(SceneConstant.FAILURE_CODE_5005, SceneConstant.FAILURE_MSG_5005);
  371. }
  372. Long cameraId = scenePro == null ? scenePlus.getCameraId() : scenePro.getCameraId();
  373. Camera camera = cameraService.getById(cameraId);
  374. if(camera == null){
  375. throw new BusinessException(CameraConstant.FAILURE_CODE_6029, CameraConstant.FAILURE_MSG_6029);
  376. }
  377. CameraDetail detailEntity = cameraDetailService.getByCameraId(cameraId);
  378. if(detailEntity == null){
  379. throw new BusinessException(CameraConstant.FAILURE_CODE_6029, CameraConstant.FAILURE_MSG_6029);
  380. }
  381. if(detailEntity.getType() == 10){
  382. throw new BusinessException(ResultCode.SS_NO_COPY);
  383. }
  384. HashMap<String, Object> param = new HashMap<>();
  385. param.put("num",sceneNum);
  386. fdKKClient.copyScene(param,"m_a_n_a_g_e");
  387. }
  388. @Override
  389. public void deleteByNum(String num) {
  390. ScenePro scenePro = this.getByNum(num);
  391. if(scenePro!=null){
  392. this.removeById(scenePro.getId());
  393. }
  394. Scene scene = sceneService.getByNum(num);
  395. if(scene!=null){
  396. sceneService.removeById(scene.getId());
  397. }
  398. ScenePlus scenePlus = scenePlusService.getByNum(num);
  399. if(scenePlus!=null){
  400. scenePlusService.removeById(scenePlus.getId());
  401. }
  402. laserService.delete(num);
  403. }
  404. @Override
  405. public Long getKkCount(List<String> asList, String startTime) {
  406. LambdaQueryWrapper<ScenePro> wrapper = new LambdaQueryWrapper<>();
  407. wrapper.in(ScenePro::getSceneSource,asList);
  408. wrapper.eq(ScenePro::getIsUpgrade,0);
  409. wrapper.lt(ScenePro::getCreateTime,startTime);
  410. long count = this.count(wrapper);
  411. LambdaQueryWrapper<ScenePlus> wrapper2 = new LambdaQueryWrapper<>();
  412. wrapper2.in(ScenePlus::getSceneSource,asList);
  413. wrapper2.lt(ScenePlus::getCreateTime,startTime);
  414. long count1 = scenePlusService.count(wrapper2);
  415. return count + count1;
  416. }
  417. @Override
  418. public Long getSsCount(List<String> asList, String startTime) {
  419. LambdaQueryWrapper<ScenePro> wrapper = new LambdaQueryWrapper<>();
  420. wrapper.in(ScenePro::getSceneSource,asList);
  421. wrapper.eq(ScenePro::getIsUpgrade,0);
  422. wrapper.lt(ScenePro::getCreateTime,startTime);
  423. LambdaQueryWrapper<ScenePlus> wrapper2 = new LambdaQueryWrapper<>();
  424. wrapper2.in(ScenePlus::getSceneSource,asList);
  425. wrapper2.lt(ScenePlus::getCreateTime,startTime);
  426. long count = scenePlusService.count(wrapper2);
  427. return this.count(wrapper) + count;
  428. }
  429. @Override
  430. public Long getSsObjCount(List<String> asList, String startTime) {
  431. LambdaQueryWrapper<ScenePro> wrapper = new LambdaQueryWrapper<>();
  432. wrapper.in(ScenePro::getSceneSource,asList);
  433. wrapper.eq(ScenePro::getIsUpgrade,0);
  434. wrapper.lt(ScenePro::getCreateTime,startTime);
  435. wrapper.eq(ScenePro::getIsObj,1);
  436. LambdaQueryWrapper<ScenePlus> wrapper2 = new LambdaQueryWrapper<>();
  437. wrapper2.in(ScenePlus::getSceneSource,asList);
  438. wrapper2.lt(ScenePlus::getCreateTime,startTime);
  439. List<ScenePlus> list = scenePlusService.list(wrapper2);
  440. List<Long> plusIds = list.stream().map(ScenePlus::getId).collect(Collectors.toList());
  441. long count = 0L;
  442. if(plusIds.size() >0){
  443. LambdaQueryWrapper<ScenePlusExt> wrapper3 = new LambdaQueryWrapper<>();
  444. wrapper3.in(ScenePlusExt::getPlusId,plusIds);
  445. wrapper3.eq(ScenePlusExt::getIsObj,1);
  446. count = scenePlusExtService.count(wrapper3);
  447. }
  448. return this.count(wrapper) + count;
  449. }
  450. }