From 64c92e244f2cdcb5c3e46f20de55bf417248d683 Mon Sep 17 00:00:00 2001
From: jyy <935090232@qq.com>
Date: Fri, 15 Apr 2022 21:35:44 +0800
Subject: [PATCH] Merge branch 'developer'
---
zq-erp/src/main/java/com/matrix/system/common/service/impl/SysUsersServiceImpl.java | 3 +++
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java | 12 ++++++------
zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java | 11 +++++++++--
zq-erp/src/main/resources/config/application.properties | 2 +-
4 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/common/service/impl/SysUsersServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/common/service/impl/SysUsersServiceImpl.java
index 2d14f86..1e26967 100644
--- a/zq-erp/src/main/java/com/matrix/system/common/service/impl/SysUsersServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/common/service/impl/SysUsersServiceImpl.java
@@ -9,6 +9,7 @@
import com.matrix.core.tools.LogUtil;
import com.matrix.core.tools.ModelUtils;
import com.matrix.core.tools.WebUtil;
+import com.matrix.system.app.authority.AppAuthorityManager;
import com.matrix.system.common.authority.DefaultAuthorityManager;
import com.matrix.system.common.bean.SysUserLoginRecord;
import com.matrix.system.common.bean.SysUsers;
@@ -134,8 +135,10 @@
//删除用户权限缓存
String redisKey=DefaultAuthorityManager.USER_POWER_REDISKEY+ SecureUtil.md5(oldSysUsers.getSuId()+"");
String redisKeyPc=DefaultAuthorityManager.USER_POWER_REDISKEY_PC+ SecureUtil.md5(oldSysUsers.getSuId()+"");
+ String appRedisKey = AppAuthorityManager.USER_POWER_REDISKEY_APP + SecureUtil.md5(oldSysUsers.getSuId()+"");
LocalCache.remove(redisKey);
LocalCache.remove(redisKeyPc);
+ LocalCache.remove(appRedisKey);
return MatrixConstance.DML_SUCCESSS;
}
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
index ab9b83e..a3883d9 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
@@ -248,8 +248,15 @@
// String dirPath = "E:";
String dirPath = fileStoragePath;
- File saveFile = new File(dirPath + "/" + fileName);
- file.transferTo(saveFile);
+ File saveFile =new File (new File(dirPath).getAbsolutePath() + File.separator + fileName);
+ if (!saveFile.exists())
+ {
+ if (!saveFile.getParentFile().exists())
+ {
+ saveFile.getParentFile().mkdirs();
+ }
+ }
+ file.transferTo(saveFile.getAbsoluteFile());
SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
index 11a6648..2cc0337 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
@@ -797,15 +797,15 @@
BusParameterSettings principalConsumption = busParameterSettingsDao.selectCompanyParamByCode(ScoreSettingConstant.PRINCIPAL_CONSUMPTION, vipInfo.getCompanyId());
//本金消耗
if (principalPrice > 0
- && StringUtils.isNotBlank(principalConsumption.getParamValue())) {
+ && StringUtils.isNotBlank(principalConsumption.getParamValue()) && Double.parseDouble(principalConsumption.getParamValue()) > 0 ) {
principalConsumScore[0] = (int) (principalPrice / Double.parseDouble(principalConsumption.getParamValue()));
- if (StringUtils.isNotBlank(principalConsumption.getParamValue1())) {
+ if (StringUtils.isNotBlank(principalConsumption.getParamValue1()) && Double.parseDouble(principalConsumption.getParamValue1()) > 0 ) {
principalConsumScore[1] = (int) (principalPrice / Double.parseDouble(principalConsumption.getParamValue1()));
}
- if (StringUtils.isNotBlank(principalConsumption.getParamValue2())) {
+ if (StringUtils.isNotBlank(principalConsumption.getParamValue2()) && Double.parseDouble(principalConsumption.getParamValue2()) > 0 ) {
principalConsumScore[2] = (int) (principalPrice / Double.parseDouble(principalConsumption.getParamValue2()));
}
}
@@ -814,15 +814,15 @@
BusParameterSettings giveConsumption = busParameterSettingsDao.selectCompanyParamByCode(ScoreSettingConstant.GIVE_CONSUMPTION, vipInfo.getCompanyId());
//本金消耗
if (giftPrice > 0
- && StringUtils.isNotBlank(giveConsumption.getParamValue())) {
+ && StringUtils.isNotBlank(giveConsumption.getParamValue()) && Double.parseDouble(giveConsumption.getParamValue())>0) {
giveConsumScore[0] = (int) (giftPrice / Double.parseDouble(giveConsumption.getParamValue()));
- if (StringUtils.isNotBlank(giveConsumption.getParamValue1())) {
+ if (StringUtils.isNotBlank(giveConsumption.getParamValue1()) && Double.parseDouble(giveConsumption.getParamValue1())>0) {
giveConsumScore[1] = (int) (giftPrice / Double.parseDouble(giveConsumption.getParamValue1()));
}
- if (StringUtils.isNotBlank(giveConsumption.getParamValue2())) {
+ if (StringUtils.isNotBlank(giveConsumption.getParamValue2()) && Double.parseDouble(giveConsumption.getParamValue2())>0 ) {
giveConsumScore[2] = (int) (giftPrice / Double.parseDouble(giveConsumption.getParamValue2()));
}
}
diff --git a/zq-erp/src/main/resources/config/application.properties b/zq-erp/src/main/resources/config/application.properties
index ddb6608..7ab9f40 100644
--- a/zq-erp/src/main/resources/config/application.properties
+++ b/zq-erp/src/main/resources/config/application.properties
@@ -1,5 +1,5 @@
-spring.profiles.active=test
+spring.profiles.active=meidu
evn=dev
server.port=8080
--
Gitblit v1.9.1