From 92528a70c16713aa9d11b16b2d47bb1a4fe9eff5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E7=8E=89=E4=B8=9C?=
<129883742+liyudong2018@users.noreply.github.com>
Date: Thu, 7 Aug 2025 19:14:03 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E6=AC=A1=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.idea/compiler.xml | 1 +
.idea/misc.xml | 2 +-
.idea/workspace.xml | 42 ++++--
pom.xml | 4 +-
.../service/impl/TblDataModelServiceImpl.java | 7 +-
.../service/impl/TblShipFuelServiceImpl.java | 128 +++++++++---------
.../com/hivekion/common/encrypt/AESUtil.java | 12 +-
.../controller/SysAuthorityController.java | 18 +--
8 files changed, 117 insertions(+), 97 deletions(-)
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 6c3eae1..9a35818 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -9,6 +9,7 @@
+
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index f23b305..df396c2 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -5,9 +5,14 @@
-
+
+
+
+
+
+
@@ -24,10 +29,10 @@
-
+ {
+ "customColor": "",
+ "associatedIndex": 2
+}
@@ -35,18 +40,21 @@
@@ -74,7 +82,9 @@
1754560710248
-
+
+
+
@@ -84,7 +94,15 @@
1754561049395
-
+
+
+ 1754562853375
+
+
+
+ 1754562853375
+
+
@@ -94,4 +112,8 @@
+
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 21c9d6b..f6bab1e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,8 +16,8 @@
- 8
- 8
+ 11
+ 11
UTF-8
UTF-8
diff --git a/src/main/java/com/hivekion/baseData/service/impl/TblDataModelServiceImpl.java b/src/main/java/com/hivekion/baseData/service/impl/TblDataModelServiceImpl.java
index 76e542a..a89567a 100644
--- a/src/main/java/com/hivekion/baseData/service/impl/TblDataModelServiceImpl.java
+++ b/src/main/java/com/hivekion/baseData/service/impl/TblDataModelServiceImpl.java
@@ -20,12 +20,13 @@ import com.hivekion.common.entity.PagedResultVo;
import com.hivekion.common.exception.BusinessException;
import com.hivekion.dicData.service.IDicDataModelCategoryService;
import com.hivekion.dicData.service.IDicOperatorCountryService;
+import java.util.Base64;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
-import sun.misc.BASE64Encoder;
+
import java.io.IOException;
import java.util.Arrays;
@@ -123,8 +124,8 @@ public class TblDataModelServiceImpl extends ServiceImpl implements ITblShipFuelService {
- @Autowired
- private TblFuelMapper fuelMapper;
- @Autowired
- private IDicFuelTypeService fuelTypeService;
- @Autowired
- private ITblShipPropulsionService propulsionService;
- @Override
- public List getList(String Guid) {
- LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
- wrapper.eq(TblShipFuel::getGuid,Guid);
- List list = this.list(wrapper);
- List result = new ArrayList<>();
- for (TblShipFuel Fuels : list) {
- TblFuel tblFuel = fuelMapper.selectById(Fuels.getComponentId());
- TblFuelViewVo vo = new TblFuelViewVo();
- BeanUtils.copyProperties(tblFuel,vo);
- vo.setType(fuelTypeService.getName(tblFuel.getType()));
- result.add(vo);
- }
- return result;
- }
+public class TblShipFuelServiceImpl extends ServiceImpl implements
+ ITblShipFuelService {
- @Override
- public boolean remove(String Guid, String ComponentGuid,Integer status,Integer ComponentNumber) {
- if(status==0) {
- LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
- wrapper.eq(TblShipFuel::getGuid, Guid);
- wrapper.eq(TblShipFuel::getComponentGuid, ComponentGuid);
+ @Autowired
+ private TblFuelMapper fuelMapper;
+ @Autowired
+ private IDicFuelTypeService fuelTypeService;
+ @Autowired
+ private ITblShipPropulsionService propulsionService;
+
+ @Override
+ public List getList(String Guid) {
+ LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
+ wrapper.eq(TblShipFuel::getGuid, Guid);
+ List list = this.list(wrapper);
+ List result = new ArrayList<>();
+ for (TblShipFuel Fuels : list) {
+ TblFuel tblFuel = fuelMapper.selectById(Fuels.getComponentId());
+ TblFuelViewVo vo = new TblFuelViewVo();
+ BeanUtils.copyProperties(tblFuel, vo);
+ vo.setType(fuelTypeService.getName(tblFuel.getType()));
+ result.add(vo);
+ }
+ return result;
+ }
+
+ @Override
+ public boolean remove(String Guid, String ComponentGuid, Integer status,
+ Integer ComponentNumber) {
+ if (status == 0) {
+ LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
+ wrapper.eq(TblShipFuel::getGuid, Guid);
+ wrapper.eq(TblShipFuel::getComponentGuid, ComponentGuid);
// wrapper.eq(TblShipFuel::getComponentNumber, ComponentNumber);
- return this.remove(wrapper);
- }else{
- LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
- wrapper.eq(TblShipFuel::getGuid, Guid);
- return this.remove(wrapper);
- }
+ return this.remove(wrapper);
+ } else {
+ LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
+ wrapper.eq(TblShipFuel::getGuid, Guid);
+ return this.remove(wrapper);
+ }
+ }
+
+ @Override
+ public boolean add(TblShipFuelAddInputVo vo) {
+ TblShipFuel fuel = new TblShipFuel();
+ LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
+ wrapper.eq(TblShipFuel::getId, vo.getId());
+ BeanUtils.copyProperties(vo, fuel);
+ List list = this.list(wrapper).stream()
+ .sorted(Comparator.comparing(TblShipFuel::getComponentNumber)).collect(Collectors.toList());
+ if (list.size() != 0) {
+ fuel.setComponentNumber(list.get(list.size() - 1).getComponentNumber() + 1);
+ } else {
+ fuel.setComponentNumber(1);
+ }
+ fuel.setGuid("dataship-" + String.format("%16d", vo.getId()).replace(" ", "0"));
+ fuel.setComponentGuid(
+ "datafuel-" + String.format("%16d", vo.getComponentId()).replace(" ", "0"));
+ List propulsionList = propulsionService.getList(fuel.getGuid());
+ if (propulsionList == null) {
+ throw new BusinessException(500, "请先添加对应的推进系统");
}
- @Override
- public boolean add(TblShipFuelAddInputVo vo) {
- TblShipFuel fuel = new TblShipFuel();
- LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
- wrapper.eq(TblShipFuel::getId,vo.getId());
- BeanUtils.copyProperties(vo,fuel);
- List list = this.list(wrapper).stream().sorted(Comparator.comparing(TblShipFuel::getComponentNumber)).collect(Collectors.toList());
- if(list.size()!=0){
- fuel.setComponentNumber(list.get(list.size()-1).getComponentNumber()+1);
- }else{
- fuel.setComponentNumber(1);
- }
- fuel.setGuid("dataship-"+String.format("%16d", vo.getId()).replace(" ", "0"));
- fuel.setComponentGuid("datafuel-"+String.format("%16d", vo.getComponentId()).replace(" ", "0"));
- List propulsionList = propulsionService.getList(fuel.getGuid());
- if(propulsionList==null){
- throw new BusinessException(500,"请先添加对应的推进系统");
- }
-
- return this.save(fuel);
- }
+ return this.save(fuel);
+ }
}
diff --git a/src/main/java/com/hivekion/common/encrypt/AESUtil.java b/src/main/java/com/hivekion/common/encrypt/AESUtil.java
index c875a9a..33b9c0b 100644
--- a/src/main/java/com/hivekion/common/encrypt/AESUtil.java
+++ b/src/main/java/com/hivekion/common/encrypt/AESUtil.java
@@ -1,8 +1,8 @@
package com.hivekion.common.encrypt;
-import sun.misc.BASE64Decoder;
-import sun.misc.BASE64Encoder;
+
+import java.util.Base64;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
@@ -112,8 +112,8 @@ public class AESUtil {
* @return
*/
public static String byte2Base64(byte[] bytes) {
- BASE64Encoder encoder = new BASE64Encoder();
- return encoder.encode(bytes);
+
+ return Base64.getEncoder().encodeToString(bytes);
}
/**
@@ -124,7 +124,7 @@ public class AESUtil {
* @throws IOException
*/
public static byte[] base642Byte(String base64Key) throws IOException {
- BASE64Decoder decoder = new BASE64Decoder();
- return decoder.decodeBuffer(base64Key);
+
+ return Base64.getDecoder().decode(base64Key);
}
}
diff --git a/src/main/java/com/hivekion/system/controller/SysAuthorityController.java b/src/main/java/com/hivekion/system/controller/SysAuthorityController.java
index e4313fb..1b4c2cc 100644
--- a/src/main/java/com/hivekion/system/controller/SysAuthorityController.java
+++ b/src/main/java/com/hivekion/system/controller/SysAuthorityController.java
@@ -3,23 +3,19 @@ package com.hivekion.system.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hivekion.common.entity.TreeNode;
import com.hivekion.system.domain.SysCsMenu;
-import com.hivekion.system.domain.SysMenu;
import com.hivekion.system.domain.vo.syscsauthority.SysCsMenuListVo;
import com.hivekion.system.service.ISysAuthorityService;
import com.hivekion.system.service.ISysRoleAuthorityService;
-import io.swagger.annotations.Api;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.apache.batik.gvt.CompositeGraphicsNode;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import springfox.documentation.annotations.ApiIgnore;
-import sun.reflect.generics.tree.Tree;
-
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.annotations.ApiIgnore;
/**
* @author 薛海宁