From b5ba97c55fcf77bc6adb052d56301a4bcdc3c795 Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Wed, 27 Apr 2022 19:01:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E6=88=B7=E9=A6=96=E9=A1=B5=E5=8F=8A?= =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E6=90=9C=E7=B4=A2=E9=A1=B5=E9=9D=A2=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ResourceController.java | 6 --- .../resource/service/ResourceService.java | 2 - .../dao/ResourceCollectionDao.java | 2 +- .../service/ResourceCollectionService.java | 3 +- .../impl/ResourceCollectionServiceImpl.java | 4 +- .../controller/ResourceScoreController.java | 7 --- .../ResourceCollectionDao.xml | 48 ++++++++++++------- 7 files changed, 34 insertions(+), 38 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index 213bd7f3..fadd7ffc 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -17,15 +17,9 @@ import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; import springfox.documentation.annotations.ApiIgnore; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.File; -import java.io.IOException; import java.util.Map; /** diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java b/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java index f44c791b..9a06a2e8 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java @@ -6,8 +6,6 @@ import io.renren.modules.resource.dto.ResourceDTO; import io.renren.modules.resource.entity.AttrEntity; import io.renren.modules.resource.entity.ResourceEntity; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.util.List; /** diff --git a/renren-admin/src/main/java/io/renren/modules/resourceCollection/dao/ResourceCollectionDao.java b/renren-admin/src/main/java/io/renren/modules/resourceCollection/dao/ResourceCollectionDao.java index a09e6da4..2fb9b622 100644 --- a/renren-admin/src/main/java/io/renren/modules/resourceCollection/dao/ResourceCollectionDao.java +++ b/renren-admin/src/main/java/io/renren/modules/resourceCollection/dao/ResourceCollectionDao.java @@ -26,5 +26,5 @@ public interface ResourceCollectionDao extends BaseDao Integer delete4Resource(@Param("resourceIds") List idList); - Integer deleteByResourceIds(Long[] ids, Long id); + Integer deleteByResourceIds(@Param("resourceIds") Long[] resourceIds, @Param("userId") Long userId); } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resourceCollection/service/ResourceCollectionService.java b/renren-admin/src/main/java/io/renren/modules/resourceCollection/service/ResourceCollectionService.java index 2ac29f6f..646d2357 100644 --- a/renren-admin/src/main/java/io/renren/modules/resourceCollection/service/ResourceCollectionService.java +++ b/renren-admin/src/main/java/io/renren/modules/resourceCollection/service/ResourceCollectionService.java @@ -2,7 +2,6 @@ package io.renren.modules.resourceCollection.service; import com.baomidou.mybatisplus.core.metadata.IPage; import io.renren.common.service.CrudService; -import io.renren.modules.resourceCar.dto.ResourceCarDTO; import io.renren.modules.resourceCollection.dto.ResourceCollectionDTO; import io.renren.modules.resourceCollection.entity.ResourceCollectionEntity; @@ -19,7 +18,7 @@ public interface ResourceCollectionService extends CrudService list); - void deleteByIds(Long[] ids); + void deleteByIds(Long[] resourceIds); IPage selectPage(Map params); } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resourceCollection/service/impl/ResourceCollectionServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resourceCollection/service/impl/ResourceCollectionServiceImpl.java index 356293ab..8528a570 100644 --- a/renren-admin/src/main/java/io/renren/modules/resourceCollection/service/impl/ResourceCollectionServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resourceCollection/service/impl/ResourceCollectionServiceImpl.java @@ -80,8 +80,8 @@ public class ResourceCollectionServiceImpl extends CrudServiceImpl - update tb_resource_collection - set del_flag = 1, - update_date = now() - where 1 = 1 - and id in + UPDATE tb_resource_collection + SET del_flag = 1, + update_date = NOW() + WHERE 1 = 1 + AND id IN #{item} - + update tb_resource_collection set del_flag = 1, - update_date = NOW() - where 1 = 1 AND user_id = #{userId} + update_date = now() + where 1 = 1 and resource_id in #{item} + + + + UPDATE tb_resource_collection + SET del_flag = 1, + update_date = NOW() + WHERE 1 = 1 + AND user_id = #{userId} + AND resource_id in + + #{item} + \ No newline at end of file