From f07738b0704de983ed94e740facf6b6f5857cdef Mon Sep 17 00:00:00 2001 From: 20918 <2091823062@qq.com> Date: Tue, 20 Aug 2024 10:53:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=BD=E4=BD=93=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manager/TdPropertyEmentManager.java | 33 +++++++++++++++++-- .../system/mapper/TdPropertyEmentMapper.java | 4 +++ .../service/TdPropertyEmentService.java | 5 ++- .../impl/TdPropertyEmentServiceImpl.java | 11 ++++++- .../mapper/system/TdPropertyEmentMapper.xml | 17 ++++++++++ 5 files changed, 66 insertions(+), 4 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdPropertyEmentManager.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdPropertyEmentManager.java index e94c1ef..892fd86 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdPropertyEmentManager.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdPropertyEmentManager.java @@ -1,9 +1,18 @@ package com.ruoyi.web.controller.manager; +import cn.hutool.core.convert.Convert; +import cn.hutool.core.text.CharSequenceUtil; +import com.ruoyi.common.utils.ShiroUtils; +import com.ruoyi.system.domain.TdPropertyEment; +import com.ruoyi.system.domain.tdcase.TdCase; import com.ruoyi.system.service.TdPropertyEmentService; +import com.ruoyi.system.service.tdcase.TdCaseService; import org.springframework.stereotype.Component; import javax.annotation.Resource; +import java.util.Arrays; +import java.util.Date; +import java.util.List; /** * packageName com.ruoyi.web.controller.manager @@ -20,7 +29,27 @@ public class TdPropertyEmentManager { @Resource private TdPropertyEmentService tdPropertyEmentService; - - + public List selectEmentList(TdPropertyEment tdPropertyEment) { + return tdPropertyEmentService.selectEmentList(tdPropertyEment); + } + public boolean saveOrUpdate(TdPropertyEment tdPropertyEment) { + if (CharSequenceUtil.isBlank(tdPropertyEment.getId())) { + tdPropertyEment.setCreateTime(new Date()); + } + return tdPropertyEmentService.saveOrUpdate(tdPropertyEment); + } + + public TdPropertyEment selecttdEment(String id) { + return tdPropertyEmentService.getById(id); + } + + public boolean deletedEmentByids(String ids) { + List list = Arrays.asList(Convert.toStrArray(ids)); + return tdPropertyEmentService.removeByIds(list); + } + + public List selectList() { + return tdPropertyEmentService.lambdaQuery().list(); + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TdPropertyEmentMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TdPropertyEmentMapper.java index f8eecab..aaf773d 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TdPropertyEmentMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TdPropertyEmentMapper.java @@ -2,6 +2,9 @@ package com.ruoyi.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.system.domain.TdPropertyEment; +import com.ruoyi.system.domain.tdcase.TdCase; + +import java.util.List; /** * @author 13560 @@ -10,6 +13,7 @@ import com.ruoyi.system.domain.TdPropertyEment; * @Entity generator.domain.TdPropertyEment */ public interface TdPropertyEmentMapper extends BaseMapper { + public List selectEmentList(TdPropertyEment tdPropertyEment); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/TdPropertyEmentService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/TdPropertyEmentService.java index 62c1ea3..20a6151 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/TdPropertyEmentService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/TdPropertyEmentService.java @@ -2,6 +2,9 @@ package com.ruoyi.system.service; import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.system.domain.TdPropertyEment; +import com.ruoyi.system.domain.tdcase.TdCase; + +import java.util.List; /** * @author 13560 @@ -9,5 +12,5 @@ import com.ruoyi.system.domain.TdPropertyEment; * @createDate 2024-08-20 08:55:12 */ public interface TdPropertyEmentService extends IService { - + public List selectEmentList(TdPropertyEment tdPropertyEment); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdPropertyEmentServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdPropertyEmentServiceImpl.java index 46787aa..2a77ce4 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdPropertyEmentServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdPropertyEmentServiceImpl.java @@ -3,9 +3,13 @@ package com.ruoyi.system.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.system.domain.TdPropertyEment; import com.ruoyi.system.mapper.TdPropertyEmentMapper; +import com.ruoyi.system.mapper.tdcase.TdCaseMapper; import com.ruoyi.system.service.TdPropertyEmentService; import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; + /** * @author 13560 * @description 针对表【td_property_ement(涉密设备信息)】的数据库操作Service实现 @@ -14,7 +18,12 @@ import org.springframework.stereotype.Service; @Service public class TdPropertyEmentServiceImpl extends ServiceImpl implements TdPropertyEmentService { - + @Resource + private TdPropertyEmentMapper tdPropertyEmentMapper; + @Override + public List selectEmentList(TdPropertyEment tdPropertyEment) { + return tdPropertyEmentMapper.selectEmentList(tdPropertyEment); + } } diff --git a/ruoyi-system/src/main/resources/mapper/system/TdPropertyEmentMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TdPropertyEmentMapper.xml index 8ea791c..e0c2e0b 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TdPropertyEmentMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TdPropertyEmentMapper.xml @@ -31,4 +31,21 @@ destory_date,destory_type,maintain_remark, create_time + + +