From 038cdab4c7ff31000b35d6d8ac03e95c4fa399fe Mon Sep 17 00:00:00 2001
From: wangzhijiang <12345678>
Date: Thu, 3 Mar 2022 16:22:25 +0800
Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84=E6=94=B6=E8=97=8F-=E5=8F=96?=
=?UTF-8?q?=E6=B6=88=E6=94=B6=E8=97=8F=20=E5=90=8C=E6=97=B6=E5=8F=96?=
=?UTF-8?q?=E6=B6=88=E8=AE=A2=E9=98=85=E3=80=82=20=E6=94=B6=E8=97=8F?=
=?UTF-8?q?=E3=80=81=E8=AE=A2=E9=98=85=E6=9F=A5=E8=AF=A2=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=20=E7=8A=B6=E6=80=81=E5=AD=97=E6=AE=B5=E4=B8=AD=E8=8B=B1?=
=?UTF-8?q?=E6=96=87=E5=88=87=E6=8D=A2=E3=80=81=E6=A0=B9=E6=8D=AE=E7=8A=B6?=
=?UTF-8?q?=E6=80=81=E6=9F=A5=E8=AF=A2=E4=BF=AE=E6=94=B9=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/xml/OnlCgformCollectionMapper.xml | 5 +-
.../impl/OnlCgformCollectionServiceImpl.java | 63 +++++++++++++++++--
.../controller/DomainUserRelController.java | 9 +++
.../mapper/xml/OnlCgformSubscribeMapper.xml | 5 +-
.../impl/OnlCgformSubscribeServiceImpl.java | 15 +++--
5 files changed, 85 insertions(+), 12 deletions(-)
diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/collection/mapper/xml/OnlCgformCollectionMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/collection/mapper/xml/OnlCgformCollectionMapper.xml
index 8bee10736..445bf7e94 100644
--- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/collection/mapper/xml/OnlCgformCollectionMapper.xml
+++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/collection/mapper/xml/OnlCgformCollectionMapper.xml
@@ -30,7 +30,10 @@
and bdl.title like concat(concat('%',#{params.title}),'%')
- and bdl.state = #{params.state}
+ and bdl.state in
+
+ #{item}
+
order by occ.create_time desc
diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/collection/service/impl/OnlCgformCollectionServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/collection/service/impl/OnlCgformCollectionServiceImpl.java
index ee96074c8..e213739b2 100644
--- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/collection/service/impl/OnlCgformCollectionServiceImpl.java
+++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/collection/service/impl/OnlCgformCollectionServiceImpl.java
@@ -14,6 +14,8 @@ import com.jero.modules.collection.entity.OnlCgformCollection;
import com.jero.modules.collection.mapper.OnlCgformCollectionMapper;
import com.jero.modules.collection.service.IOnlCgformCollectionService;
import com.jero.modules.ocr.util.LineHumpUtil;
+import com.jero.modules.subscribe.entity.OnlCgformSubscribe;
+import com.jero.modules.subscribe.mapper.OnlCgformSubscribeMapper;
import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import org.apache.commons.collections4.CollectionUtils;
@@ -21,6 +23,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.*;
@@ -40,6 +43,8 @@ public class OnlCgformCollectionServiceImpl extends ServiceImpl documentIdList = new ArrayList<>();
+ documentIdList.add(onlCgformCollection.getDocumentId());
+
+ //删除订阅
+ deleteSubscribe(documentIdList);
+
+ removeById(id);
+ }catch (Exception ex){
+ log.error("取消收藏失败:" + ex.getMessage());
+ throw new JeroBootException("取消收藏失败!");
+ }
}
/**
@@ -77,6 +95,7 @@ public class OnlCgformCollectionServiceImpl extends ServiceImpl ids) {
for (String id : ids) {
boolean checkData = checkData(id);
@@ -84,7 +103,20 @@ public class OnlCgformCollectionServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>();
+ queryWrapper.lambda().in(OnlCgformCollection::getId,ids);
+ List onlCgformCollections = super.baseMapper.selectList(queryWrapper);
+ List documentIdList = onlCgformCollections.stream().map(OnlCgformCollection::getDocumentId).distinct().collect(Collectors.toList());
+
+ //删除订阅
+ deleteSubscribe(documentIdList);
+
+ removeByIds(ids);
+ }catch (Exception ex){
+ log.error("批量取消收藏失败:" + ex.getMessage());
+ throw new JeroBootException("批量取消收藏失败!");
+ }
}
/**
@@ -196,25 +228,31 @@ public class OnlCgformCollectionServiceImpl extends ServiceImpl> records = result.getRecords();
- dataDispose(records);
+ dataDispose(records,params);
return result;
}
- public void dataDispose(List