From a20fd1f5c8d0483bb3eb3547905027a9fcadabf5 Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Fri, 19 Aug 2022 10:03:14 +0800 Subject: [PATCH] =?UTF-8?q?cim=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resource/controller/CIMController.java | 30 +++++++++++++++++++ .../modules/resource/service/CIMService.java | 4 +++ .../resource/service/impl/CIMServiceImpl.java | 8 +++++ .../service/impl/ResourceServiceImpl.java | 7 ++--- .../service/impl/ResourceCarServiceImpl.java | 4 +-- .../io/renren/common/constant/Constant.java | 4 +++ 6 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 renren-admin/src/main/java/io/renren/modules/resource/controller/CIMController.java create mode 100644 renren-admin/src/main/java/io/renren/modules/resource/service/CIMService.java create mode 100644 renren-admin/src/main/java/io/renren/modules/resource/service/impl/CIMServiceImpl.java diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/CIMController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/CIMController.java new file mode 100644 index 00000000..d8729b81 --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/CIMController.java @@ -0,0 +1,30 @@ +package io.renren.modules.resource.controller; + +import io.renren.modules.resource.service.CIMService; +import io.renren.modules.sys.service.SysDeptService; +import io.swagger.annotations.Api; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 资源表 + * + * @author dg + * @since 1.0 2022-04-13 + */ +@RestController +@RequestMapping("/resource") +@Api(tags = "资源表") +public class CIMController { + + private static final Logger logger = LoggerFactory.getLogger(ResourceController.class); + + @Autowired + private io.renren.modules.resource.service.CIMService CIMService; + + @Autowired + private SysDeptService sysDeptService; +} diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/CIMService.java b/renren-admin/src/main/java/io/renren/modules/resource/service/CIMService.java new file mode 100644 index 00000000..f8df6b10 --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/CIMService.java @@ -0,0 +1,4 @@ +package io.renren.modules.resource.service; + +public interface CIMService { +} diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/CIMServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/CIMServiceImpl.java new file mode 100644 index 00000000..a7be7bdf --- /dev/null +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/CIMServiceImpl.java @@ -0,0 +1,8 @@ +package io.renren.modules.resource.service.impl; + +import io.renren.modules.resource.service.CIMService; +import org.springframework.stereotype.Service; + +@Service +public class CIMServiceImpl implements CIMService { +} diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index ed7354a2..09970282 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -307,13 +307,13 @@ public class ResourceServiceImpl extends CrudServiceImpl attrEntities = dto.getInfoList(); - List attrEntities_ = new ArrayList<>(); + List attrEntityList = new ArrayList<>(); if (attrEntities != null) { attrEntities.forEach(item -> { item.setDelFlag(ResourceEntityDelFlag.NORMAL.getFlag()); item.setDataResourceId(resourceID); attrDao.insert(item); - attrEntities_.add(item); + attrEntityList.add(item); }); } for (AttrEntity attrEntity : resourceEntity.getInfoList()) { @@ -321,7 +321,6 @@ public class ResourceServiceImpl extends CrudServiceImpl carEntities = resourceCarDao.selectByMap(selectMap); - //TODO: 固定资源id改为配置文件 - if (carEntities.isEmpty() || dto.getResourceId() == 8888888880000000001L) { + if (carEntities.isEmpty() || dto.getResourceId() == Constant.CEMERALISTID) { ResourceCarEntity carEntity = new ResourceCarEntity(); dto.setUserId(userId); BeanUtils.copyProperties(dto, carEntity); diff --git a/renren-common/src/main/java/io/renren/common/constant/Constant.java b/renren-common/src/main/java/io/renren/common/constant/Constant.java index 0aa7039f..b5a5402a 100644 --- a/renren-common/src/main/java/io/renren/common/constant/Constant.java +++ b/renren-common/src/main/java/io/renren/common/constant/Constant.java @@ -94,6 +94,10 @@ public interface Constant { * 代码生成参数KEY */ String DEV_TOOLS_PARAM_KEY = "DEV_TOOLS_PARAM_KEY"; + /** + * 将视频资源申请全部视为一个特殊能力,使用此ID + */ + Long CEMERALISTID = 8888888880000000001L; /** * 定时任务状态