From 4470052c3b6bdeb18e45987f8aa293d1e93d0552 Mon Sep 17 00:00:00 2001
From: Ludc <2870569285@qq.com>
Date: 星期二, 18 十一月 2025 11:59:12 +0800
Subject: [PATCH] 所有文件上传接口增加文件安全校验逻辑。
---
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeFixedValueServiceImpl.java | 36 +++++++++++++++++++++++++++++++++++-
1 files changed, 35 insertions(+), 1 deletions(-)
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeFixedValueServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeFixedValueServiceImpl.java
index 97fc88d..e46394a 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeFixedValueServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeFixedValueServiceImpl.java
@@ -1,8 +1,10 @@
package com.vci.ubcs.code.service.impl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.vci.ubcs.code.dto.CodeFixedValueDTO;
@@ -24,7 +26,6 @@
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
@@ -71,6 +72,36 @@
}
List<CodeFixedValue> doList = codeFixedValueMapper.selectByPage(codeFixedValueVO,page);
return page.setRecords(CodeFixedValueWrapper.build().listVO(doList));
+ }
+
+ /**
+ * 鏍规嵁codeFixedSecOid鏌ヨ鐮佸��
+ * @param codeFixedSecOids
+ * @return
+ */
+ @Override
+ public List<CodeFixedValue> listFixedValueByCodeFixedSecOid(List<String> codeFixedSecOids){
+ if(codeFixedSecOids.isEmpty()){
+ return new ArrayList<CodeFixedValue>();
+ }
+ /*List<CodeFixedValue> codeFixedValues = codeFixedValueMapper.selectList(
+ Wrappers.<CodeFixedValue>query().lambda()
+ .in(CodeFixedValue::getCodeFixedSecOid, codeFixedSecOids)
+ );*/
+ List<CodeFixedValue> codeFixedValues = codeFixedValueMapper.selectByPageByCodeFixedSecOid(codeFixedSecOids, new Page<>(1, -1));
+ return codeFixedValues;
+ }
+
+ /**
+ * 鏍规嵁鍏宠仈鍥哄畾鐮佹涓婚敭鍒犻櫎鐮佸��
+ * @param codeFixedSecOid
+ * @return
+ */
+ @Override
+ public Boolean deleteFixedValueBySecOid(String codeFixedSecOid) {
+ LambdaQueryWrapper<CodeFixedValue> wrapper = Wrappers.<CodeFixedValue>query()
+ .lambda().eq(CodeFixedValue::getCodeFixedSecOid, codeFixedSecOid);
+ return codeFixedValueMapper.delete(wrapper)>0;
}
/**
@@ -312,6 +343,9 @@
List<CodeFixedValue> doList = codeFixedValueMapper.selectList(Wrappers.<CodeFixedValue>query()
.lambda().eq(CodeFixedValue::getCodeFixedSecOid,codefixedsecoid)
);
+ if(doList.isEmpty()){
+ return false;
+ }
boolean resBoolean = codeFixedValueMapper.deleteBatchIds(doList.stream().map(CodeFixedValue::getOid).collect(Collectors.toList())) > 0;
return resBoolean;
}
--
Gitblit v1.9.3