diff --git a/.drone.yml b/.drone.yml index dbcc3b0..e85ec32 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,7 +9,7 @@ steps: # 应用专案名称(需手动修改) backendName: demo-athenaopt_backend # 平台API版本号(需手动修改) - apiVersion: 5.2.0.1029 + apiVersion: 5.2.0.1086 commands: # 在开发根目录下执行 maven package 指令以构建运行包 - mvn -f $backendName/pom.xml package -Dapi.version=$apiVersion -Dnexus.ip=https://repo.digiwincloud.com.cn/maven @@ -25,7 +25,7 @@ steps: branch: # - develop # - master - - release/S3 + - release/s4 event: - push ### 应用版本控制:检查版本文件,若不存在则自动创建,并自动递增版本号 @@ -38,14 +38,14 @@ steps: - sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories - apk add tree --no-cache - tree ./$backendName - - make branch=release/S3 vc + - make branch=release/s4 vc # - make branch=master vc when: status: [ success ] branch: # - develop # - master - - release/S3 + - release/s4 event: - push ### 打包镜像并推送到镜像仓库 @@ -76,27 +76,27 @@ steps: branch: # - develop # - master - - release/S3 + - release/s4 ### 应用版本控制:提交版本文件的修改记录,并为代码分支创建版本号标签 - name: Upload Version image: registry.digiwincloud.com.cn/base/base_vc commands: # - make branch=develop to_git # - make branch=master to_git - - make branch=release/S3 to_git + - make branch=release/s4 to_git when: status: [ success ] branch: # - develop # - master - - release/S3 + - release/s4 event: - push trigger: branch: # - develop # - master - - release/S3 + - release/s4 event: - push volumes: diff --git a/Makefile b/Makefile index 4a65f33..41a467b 100644 --- a/Makefile +++ b/Makefile @@ -53,4 +53,3 @@ vc: @make -C version_control branch=$$branch to_git: @make -C version_control branch=$$branch commit_record - @make -C version_control branch=$$branch add_tag diff --git a/VERSION b/VERSION index e6d5cb8..a6a3a43 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.2 \ No newline at end of file +1.0.4 \ No newline at end of file diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/common/utils/BeanCopyUtil.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/common/utils/BeanCopyUtil.java deleted file mode 100644 index 52ad492..0000000 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/common/utils/BeanCopyUtil.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.digiwin.athena.app.infra.common.utils; - -import com.digiwin.app.container.exceptions.DWRuntimeException; -import net.sf.cglib.beans.BeanCopier; -import net.sf.cglib.beans.BeanMap; -import org.springframework.objenesis.ObjenesisStd; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -public final class BeanCopyUtil { - private BeanCopyUtil() { - } - - private static ThreadLocal objenesisStdThreadLocal = ThreadLocal.withInitial(ObjenesisStd::new); - private static ConcurrentHashMap, ConcurrentHashMap, BeanCopier>> cache = new ConcurrentHashMap<>(); - - - public static T copy(Object source, Class target) { - return copy(source, objenesisStdThreadLocal.get().newInstance(target)); - } - - public static T copy(Object source, T target) { - BeanCopier beanCopier = getCacheBeanCopier(source.getClass(), target.getClass()); - beanCopier.copy(source, target, null); - return target; - } - - public static List copyList(List sources, Class target) { - if (sources.isEmpty()) { - return Collections.emptyList(); - } - - ArrayList list = new ArrayList<>(sources.size()); - ObjenesisStd objenesisStd = objenesisStdThreadLocal.get(); - for (Object source : sources) { - if (source == null) { - throw new DWRuntimeException("转换异常"); - } - T newInstance = objenesisStd.newInstance(target); - BeanCopier beanCopier = getCacheBeanCopier(source.getClass(), target); - beanCopier.copy(source, newInstance, null); - list.add(newInstance); - } - return list; - } - - public static T mapToBean(Map source, Class target) { - T bean = objenesisStdThreadLocal.get().newInstance(target); - BeanMap beanMap = BeanMap.create(bean); - beanMap.putAll(source); - return bean; - } - - public static Map beanToMap(T source) { - return BeanMap.create(source); - } - - private static BeanCopier getCacheBeanCopier(Class source, Class target) { - ConcurrentHashMap, BeanCopier> copierConcurrentHashMap = cache.computeIfAbsent(source, aClass -> new ConcurrentHashMap<>(16)); - return copierConcurrentHashMap.computeIfAbsent(target, aClass -> BeanCopier.create(source, target, false)); - } -} diff --git a/demo-athenaopt_backend/pom.xml b/demo-athenaopt_backend/pom.xml index a5356de..7a61d32 100644 --- a/demo-athenaopt_backend/pom.xml +++ b/demo-athenaopt_backend/pom.xml @@ -32,16 +32,17 @@ https://repo.digiwincloud.com.cn/maven 1.1.0.0 5.0.5.RELEASE - 5.2.0.1029 + 5.2.0.1086 2.8.6 1.05 + 4.1.67.Final com.digiwin.athena athena-opt-common - 1.0.105-SNAPSHOT + 1.0.107-SNAPSHOT com.digiwin @@ -66,7 +67,7 @@ com.digiwin.lcdp lcdp-modeldriven - 1.0.1.2 + 1.0.1.17 diff --git a/version_control/APP_VERSION b/version_control/APP_VERSION index 6d7de6e..ee90284 100644 --- a/version_control/APP_VERSION +++ b/version_control/APP_VERSION @@ -1 +1 @@ -1.0.2 +1.0.4 diff --git a/version_control/BUILD b/version_control/BUILD index bc51cd7..546440c 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1050 +1005 \ No newline at end of file