Browse Source

feat: 同步至若依最新版

master
tony 3 years ago
parent
commit
e080553f78
  1. 2
      pom.xml
  2. 4
      ruoyi-admin/src/main/resources/application-druid.yml
  3. 7
      ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java
  4. 12
      ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/DruidProperties.java
  5. 5
      ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/PermitAllUrlProperties.java
  6. 4
      ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/ScheduleUtils.java
  7. 2
      ruoyi-ui/package.json
  8. 55
      ruoyi-ui/src/components/Process/components/nodePanel/property/signal.vue
  9. 3
      ruoyi-ui/src/components/Process/flowable/flowable.json
  10. 2
      ruoyi-ui/src/layout/components/TagsView/index.vue
  11. 2
      ruoyi-ui/src/permission.js
  12. 2
      ruoyi-ui/src/views/login.vue
  13. 2
      ruoyi-ui/src/views/register.vue

2
pom.xml

@ -23,7 +23,7 @@
<swagger.version>3.0.0</swagger.version> <swagger.version>3.0.0</swagger.version>
<kaptcha.version>2.3.3</kaptcha.version> <kaptcha.version>2.3.3</kaptcha.version>
<pagehelper.boot.version>1.4.6</pagehelper.boot.version> <pagehelper.boot.version>1.4.6</pagehelper.boot.version>
<fastjson.version>2.0.20</fastjson.version> <fastjson.version>2.0.23</fastjson.version>
<oshi.version>6.4.0</oshi.version> <oshi.version>6.4.0</oshi.version>
<commons.io.version>2.11.0</commons.io.version> <commons.io.version>2.11.0</commons.io.version>
<commons.fileupload.version>1.4</commons.fileupload.version> <commons.fileupload.version>1.4</commons.fileupload.version>

4
ruoyi-admin/src/main/resources/application-druid.yml

@ -24,6 +24,10 @@ spring:
maxActive: 20 maxActive: 20
# 配置获取连接等待超时的时间 # 配置获取连接等待超时的时间
maxWait: 60000 maxWait: 60000
# 配置连接超时时间
connectTimeout: 30000
# 配置网络超时时间
socketTimeout: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000 timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒 # 配置一个连接在池中最小生存的时间,单位是毫秒

7
ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java

@ -481,7 +481,8 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
} }
/** /**
* 驼峰式命名法 例如user_name->userName * 驼峰式命名法
* 例如user_name->userName
*/ */
public static String toCamelCase(String s) public static String toCamelCase(String s)
{ {
@ -489,6 +490,10 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
{ {
return null; return null;
} }
if (s.indexOf(SEPARATOR) == -1)
{
return s;
}
s = s.toLowerCase(); s = s.toLowerCase();
StringBuilder sb = new StringBuilder(s.length()); StringBuilder sb = new StringBuilder(s.length());
boolean upperCase = false; boolean upperCase = false;

12
ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/DruidProperties.java

@ -24,6 +24,12 @@ public class DruidProperties
@Value("${spring.datasource.druid.maxWait}") @Value("${spring.datasource.druid.maxWait}")
private int maxWait; private int maxWait;
@Value("${spring.datasource.druid.connectTimeout}")
private int connectTimeout;
@Value("${spring.datasource.druid.socketTimeout}")
private int socketTimeout;
@Value("${spring.datasource.druid.timeBetweenEvictionRunsMillis}") @Value("${spring.datasource.druid.timeBetweenEvictionRunsMillis}")
private int timeBetweenEvictionRunsMillis; private int timeBetweenEvictionRunsMillis;
@ -55,6 +61,12 @@ public class DruidProperties
/** 配置获取连接等待超时的时间 */ /** 配置获取连接等待超时的时间 */
datasource.setMaxWait(maxWait); datasource.setMaxWait(maxWait);
/** 配置驱动连接超时时间,检测数据库建立连接的超时时间,单位是毫秒 */
datasource.setConnectTimeout(connectTimeout);
/** 配置网络超时时间,等待数据库操作完成的网络超时时间,单位是毫秒 */
datasource.setSocketTimeout(socketTimeout);
/** 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 */ /** 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 */
datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis); datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis);

5
ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/PermitAllUrlProperties.java

@ -3,6 +3,7 @@ package com.ruoyi.framework.config.properties;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
import java.util.Optional; import java.util.Optional;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.apache.commons.lang3.RegExUtils; import org.apache.commons.lang3.RegExUtils;
@ -44,12 +45,12 @@ public class PermitAllUrlProperties implements InitializingBean, ApplicationCont
// 获取方法上边的注解 替代path variable 为 * // 获取方法上边的注解 替代path variable 为 *
Anonymous method = AnnotationUtils.findAnnotation(handlerMethod.getMethod(), Anonymous.class); Anonymous method = AnnotationUtils.findAnnotation(handlerMethod.getMethod(), Anonymous.class);
Optional.ofNullable(method).ifPresent(anonymous -> info.getPatternsCondition().getPatterns() Optional.ofNullable(method).ifPresent(anonymous -> Objects.requireNonNull(info.getPatternsCondition().getPatterns())
.forEach(url -> urls.add(RegExUtils.replaceAll(url, PATTERN, ASTERISK)))); .forEach(url -> urls.add(RegExUtils.replaceAll(url, PATTERN, ASTERISK))));
// 获取类上边的注解, 替代path variable 为 * // 获取类上边的注解, 替代path variable 为 *
Anonymous controller = AnnotationUtils.findAnnotation(handlerMethod.getBeanType(), Anonymous.class); Anonymous controller = AnnotationUtils.findAnnotation(handlerMethod.getBeanType(), Anonymous.class);
Optional.ofNullable(controller).ifPresent(anonymous -> info.getPatternsCondition().getPatterns() Optional.ofNullable(controller).ifPresent(anonymous -> Objects.requireNonNull(info.getPatternsCondition().getPatterns())
.forEach(url -> urls.add(RegExUtils.replaceAll(url, PATTERN, ASTERISK)))); .forEach(url -> urls.add(RegExUtils.replaceAll(url, PATTERN, ASTERISK))));
}); });
} }

4
ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/ScheduleUtils.java

@ -134,6 +134,8 @@ public class ScheduleUtils
return StringUtils.containsAnyIgnoreCase(invokeTarget, Constants.JOB_WHITELIST_STR); return StringUtils.containsAnyIgnoreCase(invokeTarget, Constants.JOB_WHITELIST_STR);
} }
Object obj = SpringUtils.getBean(StringUtils.split(invokeTarget, ".")[0]); Object obj = SpringUtils.getBean(StringUtils.split(invokeTarget, ".")[0]);
return StringUtils.containsAnyIgnoreCase(obj.getClass().getPackage().getName(), Constants.JOB_WHITELIST_STR); String beanPackageName = obj.getClass().getPackage().getName();
return StringUtils.containsAnyIgnoreCase(beanPackageName, Constants.JOB_WHITELIST_STR)
&& !StringUtils.containsAnyIgnoreCase(beanPackageName, Constants.JOB_ERROR_STR);
} }
} }

2
ruoyi-ui/package.json

@ -43,7 +43,7 @@
"core-js": "3.25.3", "core-js": "3.25.3",
"diagram-js": "^11.4.1", "diagram-js": "^11.4.1",
"echarts": "5.4.0", "echarts": "5.4.0",
"element-ui": "2.15.10", "element-ui": "2.15.12",
"file-saver": "2.0.5", "file-saver": "2.0.5",
"fuse.js": "6.4.3", "fuse.js": "6.4.3",
"highlight.js": "9.18.5", "highlight.js": "9.18.5",

55
ruoyi-ui/src/components/Process/components/nodePanel/property/signal.vue

@ -76,34 +76,57 @@ export default {
}, },
mounted() { mounted() {
// this.formData.signal = this.element.businessObject.extensionElements?.values.map(item => { // this.formData.signal = this.element.businessObject.extensionElements?.values.map(item => {
// let type this.formData.signal = this.element.businessObject.extensionElements?.values
// if ('class' in item.$attrs) type = 'class' .filter(item => item.$type === 'bpmn:Signal')
// if ('expression' in item.$attrs) type = 'expression' .map(item => {
// if ('delegateExpression' in item.$attrs) type = 'delegateExpression' return {
// return { scope: item.scope,
// event: item.$attrs.event, id: item.id,
// type: type, name: item.name
// className: item.$attrs[type] }
// } }) ?? []
// }) ?? []
}, },
methods: { methods: {
updateElement() { updateElement() {
// if (this.formData.signal?.length) {
// let extensionElements = this.element.businessObject.get('extensionElements')
// if (!extensionElements) {
// console.log(this.modeler.get('moddle'),"this.modeler.get('moddle')")
// extensionElements = this.modeler.get('moddle').create('bpmn:Signal')
// }
// extensionElements.values = extensionElements.values?.filter(item => item.$type !== 'bpmn:Signal') ?? []
// console.log(extensionElements,"extensionElements")
// const length = extensionElements.get('values').length
// for (let i = 0; i < length; i++) {
// //
// extensionElements.get('values').pop()
// }
// this.updateProperties({ extensionElements: extensionElements })
// } else {
// const extensionElements = this.element.businessObject[`extensionElements`]
// if (extensionElements) {
// extensionElements.values = extensionElements.values?.filter(item => item.$type !== 'flowable:ExecutionListener')
// }
// }
if (this.formData.signal?.length) { if (this.formData.signal?.length) {
let extensionElements = this.element.businessObject.get('extensionElements') let extensionElements = this.element.businessObject.get('extensionElements')
if (!extensionElements) { if (!extensionElements) {
extensionElements = this.modeler.get('moddle').create('bpmn:signal') extensionElements = this.modeler.get('moddle').create('bpmn:ExtensionElements')
} }
const length = extensionElements.get('values').length
for (let i = 0; i < length; i++) {
// //
extensionElements.get('values').pop() extensionElements.values = extensionElements.values?.filter(item => item.$type !== 'bpmn:Signal') ?? []
} this.formData.signal.forEach(item => {
const signal = this.modeler.get('moddle').create('bpmn:Signal')
signal['scope'] = item.scope
signal['id'] = item.id
signal['name'] = item.name
extensionElements.get('values').push(signal)
})
this.updateProperties({ extensionElements: extensionElements }) this.updateProperties({ extensionElements: extensionElements })
} else { } else {
const extensionElements = this.element.businessObject[`extensionElements`] const extensionElements = this.element.businessObject[`extensionElements`]
if (extensionElements) { if (extensionElements) {
extensionElements.values = extensionElements.values?.filter(item => item.$type !== 'flowable:ExecutionListener') extensionElements.values = extensionElements.values?.filter(item => item.$type !== 'bpmn:Signal') ?? []
} }
} }
}, },

3
ruoyi-ui/src/components/Process/flowable/flowable.json

@ -945,7 +945,8 @@
"bpmn:BoundaryEvent", "bpmn:BoundaryEvent",
"bpmn:CallActivity", "bpmn:CallActivity",
"bpmn:SubProcess", "bpmn:SubProcess",
"bpmn:Process" "bpmn:Process",
"bpmn:Signal"
] ]
}, },
"properties": [ "properties": [

2
ruoyi-ui/src/layout/components/TagsView/index.vue

@ -87,7 +87,7 @@ export default {
}, },
isFirstView() { isFirstView() {
try { try {
return this.selectedTag.fullPath === this.visitedViews[1].fullPath || this.selectedTag.fullPath === '/index' return this.selectedTag.fullPath === '/index' || this.selectedTag.fullPath === this.visitedViews[1].fullPath
} catch (err) { } catch (err) {
return false return false
} }

2
ruoyi-ui/src/permission.js

@ -8,7 +8,7 @@ import { isRelogin } from '@/utils/request'
NProgress.configure({ showSpinner: false }) NProgress.configure({ showSpinner: false })
const whiteList = ['/login', '/auth-redirect', '/bind', '/register'] const whiteList = ['/login', '/register']
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start() NProgress.start()

2
ruoyi-ui/src/views/login.vue

@ -56,7 +56,7 @@
</el-form> </el-form>
<!-- 底部 --> <!-- 底部 -->
<div class="el-login-footer"> <div class="el-login-footer">
<span>Copyright © 2018-2022 ruoyi.vip All Rights Reserved.</span> <span>Copyright © 2018-2023 ruoyi.vip All Rights Reserved.</span>
</div> </div>
</div> </div>
</template> </template>

2
ruoyi-ui/src/views/register.vue

@ -61,7 +61,7 @@
</el-form> </el-form>
<!-- 底部 --> <!-- 底部 -->
<div class="el-register-footer"> <div class="el-register-footer">
<span>Copyright © 2018-2022 ruoyi.vip All Rights Reserved.</span> <span>Copyright © 2018-2023 ruoyi.vip All Rights Reserved.</span>
</div> </div>
</div> </div>
</template> </template>

Loading…
Cancel
Save