From 34bb4cb5d5e40d28f1b43f5174ae8c76c7b9a6db Mon Sep 17 00:00:00 2001 From: robot Date: Mon, 11 Mar 2024 08:38:01 +0000 Subject: [PATCH 01/37] auto increment build version 1000 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index a6905f8..83b33d2 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -999 +1000 From 888be1c65e1a5a87451fe44ddc62613d17fb6f68 Mon Sep 17 00:00:00 2001 From: robot Date: Mon, 11 Mar 2024 08:50:09 +0000 Subject: [PATCH 02/37] auto increment build version 1001 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index 83b33d2..dd11724 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1000 +1001 From 0fc8ae511ab8c07d4a467b17a5abbb621b09ac61 Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 12 Mar 2024 04:54:05 +0000 Subject: [PATCH 03/37] auto increment build version 1002 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index dd11724..7d802a3 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1001 +1002 From d37e466b3644b01a5cfcf0cdebfddf02eab469bf Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 12 Mar 2024 05:32:04 +0000 Subject: [PATCH 04/37] auto increment build version 1003 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index 7d802a3..baccd03 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1002 +1003 From b39dc8d01328ed02e97e8409cf66cbae74b4a83d Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 12 Mar 2024 06:14:31 +0000 Subject: [PATCH 05/37] auto increment build version 1004 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index baccd03..59c1122 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1003 +1004 From ded95f729643615cc8cc56f4df7db9e2349d23cd Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 12 Mar 2024 06:36:16 +0000 Subject: [PATCH 06/37] auto increment build version 1005 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index 59c1122..49bc272 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1004 +1005 From 59c56f4aa5d5c47bb1074c701df54c886cad02c6 Mon Sep 17 00:00:00 2001 From: dongsk Date: Thu, 25 Apr 2024 17:15:20 +0800 Subject: [PATCH 07/37] =?UTF-8?q?517=20=E5=B3=B0=E4=BC=9A=E5=85=8D?= =?UTF-8?q?=E5=AF=86=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../develop/conf/application.properties | 1 + .../app/infra/constant/GlobalConstants.java | 103 ++++++++++ .../app/infra/entity/DigiwinSummit.java | 39 ++++ .../repository/DigiwinSummitRepository.java | 20 ++ .../infra/service/DigiwinSummitService.java | 7 + .../Impl/DigiwinSummitServiceImpl.java | 16 ++ .../athena/app/provider/BasicApiService.java | 11 ++ .../provider/impl/BasicApiServiceImpl.java | 26 ++- .../athena/app/service/basic/AESUtils.java | 86 +++++++++ .../app/service/basic/LoginService.java | 176 ++++++++++++++++++ .../athena/app/service/basic/RSAUtils.java | 118 ++++++++++++ 11 files changed, 598 insertions(+), 5 deletions(-) create mode 100644 demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/constant/GlobalConstants.java create mode 100644 demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/DigiwinSummit.java create mode 100644 demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/repository/DigiwinSummitRepository.java create mode 100644 demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/DigiwinSummitService.java create mode 100644 demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/Impl/DigiwinSummitServiceImpl.java create mode 100644 demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/basic/AESUtils.java create mode 100644 demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/basic/LoginService.java create mode 100644 demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/basic/RSAUtils.java diff --git a/demo-athenaopt_backend/develop/conf/application.properties b/demo-athenaopt_backend/develop/conf/application.properties index 9756e34..edf9499 100644 --- a/demo-athenaopt_backend/develop/conf/application.properties +++ b/demo-athenaopt_backend/develop/conf/application.properties @@ -9,6 +9,7 @@ configGroup=@configGroup@ #SMALLVERSION=@SMALLVERSION@ #springConfigFileNames=xxx.xml,xxx.xml iamApToken=@iamApToken@ +iamApTokenForLogin=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1MzczMjY2ODk0NjEsInNpZCI6NDA3MTI4ODI1NTM0NDY0MSwiaWQiOiJEaWdpd2luQ2xvdWQifQ.XGPl3brNeNTCivWN_bIYj8TfcxqlkQ0sFV2woPOr0TY dmcUserName=@dmcUserName@ dmcPwd=@dmcPwd@ dmcBucketName=@dmcBucketName@ diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/constant/GlobalConstants.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/constant/GlobalConstants.java new file mode 100644 index 0000000..9e54c18 --- /dev/null +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/constant/GlobalConstants.java @@ -0,0 +1,103 @@ +package com.digiwin.athena.app.infra.constant; + +/** + * 全局常量 + * + * @author fobgochod + * @date 2020/4/27 + */ +public class GlobalConstants { + + /** + * 访问凭证 + */ + public static final String DIGI_MIDDLEWARE_AUTH_ACCESS = "digi-middleware-auth-access"; + /** + * 在HttpHeader中传递的User信息 + */ + public static final String AUTH_USER = "digi-middleware-auth-user-data"; + /** + * 在HttpHeader中传递的App信息 + */ + public static final String APP = "digi-middleware-auth-app-data"; + /** + * 在HttpHeader中传递的OTA Token信息 + */ + public static final String HTTP_HEADER_OTA_TOKEN_KEY = "digi-middleware-auth-ota"; + /** + * 在HttpHeader中传递的Access Token信息 + */ + public static final String HTTP_HEADER_ACCESS_TOKEN_KEY = "digi-middleware-auth-access"; + /** + * 在HttpHeader中传递的User Token信息 + */ + public static final String HTTP_HEADER_USER_TOKEN_KEY = "digi-middleware-auth-user"; + /** + * 在HttpHeader中传递的APP Token信息 + */ + public static final String HTTP_HEADER_APP_TOKEN_KEY = "digi-middleware-auth-app"; + /** + * 在HttpHeader中传递的Driver Token信息 + */ + public static final String HTTP_HEADER_DRIVE_TOKEN_KEY = "digi-middleware-drive-access"; + /** + * 在HttpHeader中传递 是都需要加密 + */ + public static final String HTTP_HEADER_DATA_MASK = "digi-middleware-data-mask"; + /** + * 在HttpHeader中传递 租户ID + */ + public static final String HTTP_HEADER_TENANT_ID = "tenantId"; + /** + * 在HttpHeader中传递 设备信息 + */ + public static final String HTTP_HEADER_CLIENT_AGENT = "Client-Agent"; + + /** + * 查询时,若為歸戶資料,請填入固定值: iam-mapping + */ + public static final String QUERY_PARAMETER_MAPPING = "iam-mapping"; + public static final String ZONE_OFF_SET = "+8"; + public static final String DEV_ACTIVE = "dev"; + + public static final String EMPTY_STR = "[empty]"; + + public static final String UPDATE_ALL = "all"; + public static final String UPDATE_ONLY_APPEND = "onlyAppend"; + + public static final String ADMINISTRATORS = "administrators"; + public static final String ADMINISTRATOR = "administrator"; + public static final String INTEGRATION = "integration"; + public static final String SUPERADMIN = "superadmin"; + public static final String GUEST = "guest"; + + public static final String ERROR_MESSAGE = "Server internal error"; + public static final String ENV_DEV = "dev"; + public static final String ENV_PROD = "prod"; + public static final String ENV_TEST = "test"; + public static final char AT = '@'; + public static final char DOT = '.'; + public static final char TAB = '\t'; + public static final char DASH = '-'; + public static final char COLON = ':'; + public static final char COMMA = ','; + public static final char DOLLAR = '$'; + public static final char PERCENT = '%'; + public static final char ESCAPE = '\\'; + public static final char ASTERISK = '*'; + public static final char SEMICOLON = ';'; + public static final char CURLY_LEFT = '{'; + public static final char CURLY_RIGHT = '}'; + public static final char DOUBLE_QUOTE = '"'; + public static final char SINGLE_QUOTE = '\''; + public static final char LEFT_PARENTHESIS = '('; + public static final char RIGHT_PARENTHESIS = ')'; + public static final String EMPTY = ""; + public static final String TRUE = "true"; + public static final String FALSE = "false"; + public static final String DEFAULT_VALUE_SEPARATOR = ":-"; + public static final String DEFAULT_CONTEXT_NAME = "default"; + public static final String LINE_SEPARATOR = System.getProperty("line.separator"); + public static final String ACCEPT_LANGUAGE = "Accept-Language"; + public static final String LOCALE = "Locale"; +} diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/DigiwinSummit.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/DigiwinSummit.java new file mode 100644 index 0000000..2d1859f --- /dev/null +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/DigiwinSummit.java @@ -0,0 +1,39 @@ +/* + * Author: DONGSK + * Datetime: 2024/4/25 16:43 + * Description: + * History: + * 作者姓名 --修改时间 --版本号--描述 + */ +package com.digiwin.athena.app.infra.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +import java.io.Serializable; + +/** + * DigiwinSummit + * + * @author DONGSK 2024/4/25 16:43 + * @since 1.0.0 + */ +@Data +@TableName(value = "digiwin_summit", autoResultMap = true) +public class DigiwinSummit extends Model implements Serializable { + Long id; + @TableField(value = "user_id") + String userId; + @TableField(value = "tenant_id") + String tenantId; + @TableField(value = "ref_prod") + String refProd; + @TableField(value = "ref_user_id") + String refUserId; + @TableField(value = "ref_tenant_sid") + String refTenantSid; + @TableField(value = "ref_user_password") + String refUserPassword; +} diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/repository/DigiwinSummitRepository.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/repository/DigiwinSummitRepository.java new file mode 100644 index 0000000..fa96455 --- /dev/null +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/repository/DigiwinSummitRepository.java @@ -0,0 +1,20 @@ +/* + * Author: DONGSK + * Datetime: 2024/4/25 16:49 + * Description: + * History: + * 作者姓名 --修改时间 --版本号--描述 + */ +package com.digiwin.athena.app.infra.repository; + +import com.digiwin.athena.app.infra.entity.DigiwinSummit; +import com.digiwin.athena.opt.persistence.repository.BaseRepository; + +/** + * DigiwinSummitRepository + * + * @author DONGSK 2024/4/25 16:49 + * @since 1.0.0 + */ +public interface DigiwinSummitRepository extends BaseRepository { +} diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/DigiwinSummitService.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/DigiwinSummitService.java new file mode 100644 index 0000000..ee28292 --- /dev/null +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/DigiwinSummitService.java @@ -0,0 +1,7 @@ +package com.digiwin.athena.app.infra.service; + +import com.digiwin.athena.app.infra.entity.DigiwinSummit; +import com.digiwin.athena.opt.persistence.service.IBaseService; + +public interface DigiwinSummitService extends IBaseService { +} diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/Impl/DigiwinSummitServiceImpl.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/Impl/DigiwinSummitServiceImpl.java new file mode 100644 index 0000000..60fc358 --- /dev/null +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/Impl/DigiwinSummitServiceImpl.java @@ -0,0 +1,16 @@ +package com.digiwin.athena.app.infra.service.Impl; + +import com.digiwin.athena.app.infra.entity.DigiwinSummit; +import com.digiwin.athena.app.infra.repository.DigiwinSummitRepository; +import com.digiwin.athena.app.infra.service.DigiwinSummitService; +import com.digiwin.athena.opt.persistence.service.impl.AbsBaseService; +import org.springframework.stereotype.Service; + +/** + * @author zhenggl + * create: 2023-04-28 + * Description: + */ +@Service +public class DigiwinSummitServiceImpl extends AbsBaseService implements DigiwinSummitService { +} diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/BasicApiService.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/BasicApiService.java index e57a962..97e773b 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/BasicApiService.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/BasicApiService.java @@ -32,4 +32,15 @@ public interface BasicApiService extends DWService { @DWRequestMapping(path = "/EAIService/{serviceName}", method = DWRequestMethod.POST) Object mockEAIExecutor(@DWPathVariable String serviceName, Map requestParameter) throws Exception; + + @AllowAnonymous + @DWRequestMapping(path = "/api/default/login", method = DWRequestMethod.POST) + Object login(String userId, String tenantId, String productKey) throws Exception; + + @AllowAnonymous + @DWRequestMapping(path = "/api/clear/login", method = DWRequestMethod.GET) + Object clearLogin() throws Exception; + + + } \ No newline at end of file diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java index 5d2e172..d7a1f88 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java @@ -11,6 +11,7 @@ package com.digiwin.athena.app.provider.impl; import com.alibaba.fastjson.JSON; import com.digiwin.app.service.DWServiceContext; import com.digiwin.athena.app.provider.BasicApiService; +import com.digiwin.athena.app.service.basic.LoginService; import com.digiwin.athena.opt.common.eai.service.EAIServiceContext; import javax.annotation.Resource; @@ -28,6 +29,9 @@ public class BasicApiServiceImpl implements BasicApiService { @Resource EAIServiceContext eaiServiceContext; + @Resource + LoginService loginService; + @Override public String helloWord(String name) throws Exception { return "hello ," + name; @@ -41,10 +45,22 @@ public class BasicApiServiceImpl implements BasicApiService { }); DWServiceContext.getContext().setStandardResult(false); /** 直接返回,不再包装,入参可以体现 serviceName - Map eaiResult = new HashMap<>(); - eaiResult.put("service", serviceName); - eaiResult.put("response", eaiServiceContext.execute(serviceName, headers, JSON.toJSONString(requestParameter))); - */ - return eaiServiceContext.execute(serviceName, headers, JSON.toJSONString(requestParameter)); + Map eaiResult = new HashMap<>(); + eaiResult.put("service", serviceName); + eaiResult.put("response", eaiServiceContext.execute(serviceName, headers, JSON.toJSONString(requestParameter))); + */ + return eaiServiceContext.execute(serviceName, headers, JSON.toJSONString(requestParameter)); + } + + @Override + public Object login(String userId, String tenantId, String productKey) throws Exception { + return loginService.login(userId, tenantId, productKey); } + + @Override + public Object clearLogin() throws Exception { + loginService.clearLoginMap(); + return "ok"; + } + } diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/basic/AESUtils.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/basic/AESUtils.java new file mode 100644 index 0000000..76e3716 --- /dev/null +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/basic/AESUtils.java @@ -0,0 +1,86 @@ +package com.digiwin.athena.app.service.basic; + +import org.apache.commons.codec.binary.Hex; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.crypto.Cipher; +import javax.crypto.SecretKey; +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.SecretKeySpec; +import java.nio.charset.StandardCharsets; +import java.util.Base64; + +public class AESUtils { + + + private static final Logger logger = LoggerFactory.getLogger(AESUtils.class); + private static final String IV_STRING = "ghUb#er57HBh(u%g"; + + /** + * 加密 + * 加密失败返回原文 2021-7-21 + * + * @param src 加密字段 + * @param aesKey aesKey 长度16 + * @return 密文 string + */ + public static String aesEncryptByBase64(String src, String aesKey) { + try { + SecretKeySpec key = new SecretKeySpec(aesKey.getBytes(StandardCharsets.UTF_8), "AES"); + + byte[] initParam = IV_STRING.getBytes(StandardCharsets.UTF_8); + IvParameterSpec ivParameterSpec = new IvParameterSpec(initParam); + Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); + cipher.init(Cipher.ENCRYPT_MODE, key, ivParameterSpec); + + byte[] cleartext = src.getBytes(StandardCharsets.UTF_8); + byte[] ciphertextBytes = cipher.doFinal(cleartext); + Base64.Encoder encoder = Base64.getEncoder(); + return encoder.encodeToString(ciphertextBytes); + } catch (Exception ex) { + logger.error("AES加密失败[{}]", src); + return src; + } + + } + + public static String aesEncrypt(String src, String aesKey) { + try { + // 生成和mysql一致的加密数据 + SecretKeySpec key = generateMySQLAESKey(aesKey); + Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); + cipher.init(Cipher.ENCRYPT_MODE, key); + + byte[] cleartext = src.getBytes(StandardCharsets.UTF_8); + byte[] ciphertextBytes = cipher.doFinal(cleartext); + return new String(Hex.encodeHexString(ciphertextBytes)).toUpperCase(); + } catch (Exception ex) { + logger.error("AES加密失败[{}]", src); + return src; + } + } + + public static String aesDecrypt(String content, String aesKey) { + try { + SecretKey key = generateMySQLAESKey(aesKey); + Cipher cipher = Cipher.getInstance("AES"); + cipher.init(Cipher.DECRYPT_MODE, key); + byte[] cleartext = Hex.decodeHex(content.toCharArray()); + byte[] ciphertextBytes = cipher.doFinal(cleartext); + return new String(ciphertextBytes, StandardCharsets.UTF_8); + } catch (Exception ex) { + logger.error("AES解密失败[{}]", content); + return content; + } + } + + public static SecretKeySpec generateMySQLAESKey(final String key) { + final byte[] finalKey = new byte[16]; + int i = 0; + for (byte b : key.getBytes(StandardCharsets.UTF_8)) { + finalKey[i++ % 16] ^= b; + } + return new SecretKeySpec(finalKey, "AES"); + } +} diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/basic/LoginService.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/basic/LoginService.java new file mode 100644 index 0000000..0728040 --- /dev/null +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/basic/LoginService.java @@ -0,0 +1,176 @@ +/* + * Author: DONGSK + * Datetime: 2024/4/25 14:08 + * Description: 登录服务 + * History: + * 作者姓名 --修改时间 --版本号--描述 + */ +package com.digiwin.athena.app.service.basic; + +import com.digiwin.athena.app.infra.constant.GlobalConstants; +import com.digiwin.athena.app.infra.entity.DigiwinSummit; +import com.digiwin.athena.app.infra.service.DigiwinSummitService; +import org.apache.commons.codec.binary.Base64; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.*; +import org.springframework.stereotype.Service; +import org.springframework.web.client.RestTemplate; + +import javax.annotation.Resource; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.NoSuchAlgorithmException; +import java.util.HashMap; +import java.util.Map; + +/** + * LoginService + * 登录服务 + * + * @author DONGSK 2024/4/25 14:08 + * @since 1.0.0 + */ +@Service +public class LoginService { + + private static final Logger logger = LoggerFactory.getLogger(LoginService.class); + + public static final Map loginDataMap = new HashMap<>(); + + public static final String mapKey = "%s_%s_%s"; + + @Value("${iamApTokenForLogin}") + private String iamApToken; + + @Value("${iamUrl}") + private String iamURL; + + @Resource + RestTemplate restTemplate; + + @Resource + DigiwinSummitService digiwinSummitService; + + public Object login(String userId, String tenantId, String productKey) { + String uri = iamURL + "/api/iam/v2/identity/login"; + try { + initLoginMap(); + + String mapKey = String.format(LoginService.mapKey, userId, tenantId, productKey); + DigiwinSummit digiwinSummit = loginDataMap.get(mapKey); + + if (digiwinSummit == null) { + return null; + } + // password + String password = digiwinSummit.getRefUserPassword(); + //1.客户端生成公私钥 + HashMap keyMap = getKeyPairMap(); + String clientPublicKey = keyMap.get("publicKey"); + String privateKey = keyMap.get("privateKey"); + //2.获取服务端公钥 + String serverPublicKey = getServerPublicKey(); + //3.根据服务端公钥加密客户端公钥 + String encryptPublicKey = RSAUtils.encryptByPublicKey(clientPublicKey, serverPublicKey); + //4.获取加密后的AES的key值 + String encryptAesKey = getAesPublicKey(encryptPublicKey); + //5.根据客户端私有解密加密的aes的key值 + String aesKey = new String(RSAUtils.decryptByPrivateKey(Base64.decodeBase64(encryptAesKey), privateKey)); + String passwordHash = AESUtils.aesEncryptByBase64(password, aesKey); + //6.登录 + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_JSON); + headers.add(GlobalConstants.HTTP_HEADER_APP_TOKEN_KEY, iamApToken); + Map requestEntity = new HashMap<>(3); + requestEntity.put("identityType", "token"); + requestEntity.put("userId", digiwinSummit.getRefUserId()); + requestEntity.put("passwordHash", passwordHash); + requestEntity.put("clientEncryptPublicKey", encryptPublicKey); + HttpEntity> httpEntity = new HttpEntity<>(requestEntity, headers); + ResponseEntity response = restTemplate.exchange(uri, HttpMethod.POST, httpEntity, Map.class); + // 切租户 + return changeTenant(Long.valueOf(digiwinSummit.getRefTenantSid()), response.getBody().get("token").toString()); + + } catch (Exception ex) { + logger.error("登录失败:{}", ex.getMessage(), ex); + } + return null; + } + + private Object changeTenant(Long sid, String userToken) { + String uri = iamURL + "/api/iam/v2/identity/token/refresh/tenant"; + try { + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_JSON); + headers.add(GlobalConstants.HTTP_HEADER_APP_TOKEN_KEY, iamApToken); + headers.add(GlobalConstants.HTTP_HEADER_USER_TOKEN_KEY, userToken); + Map requestEntity = new HashMap<>(); + requestEntity.put("tenantSid", sid); + HttpEntity> httpEntity = new HttpEntity<>(requestEntity, headers); + ResponseEntity exchange = restTemplate.exchange(uri, HttpMethod.POST, httpEntity, Map.class); + return exchange.getBody(); + } catch (Exception e) { + logger.error("切换失败:{}", e.getMessage(), e); + } + return ""; + } + + private HashMap getKeyPairMap() throws NoSuchAlgorithmException { + KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); + generator.initialize(1024); + KeyPair keyPair = generator.generateKeyPair(); + String privateKey = new String(Base64.encodeBase64(keyPair.getPrivate().getEncoded())); + String publicKey = new String(Base64.encodeBase64(keyPair.getPublic().getEncoded())); + HashMap keyMap = new HashMap<>(); + keyMap.put("privateKey", privateKey); + keyMap.put("publicKey", publicKey); + return keyMap; + } + + private String getServerPublicKey() { + String uri = iamURL + "/api/iam/v2/identity/publickey"; + try { + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_JSON); + headers.add(GlobalConstants.HTTP_HEADER_APP_TOKEN_KEY, iamApToken); + HttpEntity> httpEntity = new HttpEntity<>(headers); + ResponseEntity response = restTemplate.exchange(uri, HttpMethod.GET, httpEntity, Map.class); + return String.valueOf(response.getBody().get("publicKey")); + } catch (Exception e) { + logger.error("登录失败:{}", e.getMessage(), e); + } + return ""; + } + + private String getAesPublicKey(String encryptPublicKey) { + String uri = iamURL + "/api/iam/v2/identity/aeskey"; + try { + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_JSON); + headers.add(GlobalConstants.HTTP_HEADER_APP_TOKEN_KEY, iamApToken); + Map requestEntity = new HashMap<>(1); + requestEntity.put("clientEncryptPublicKey", encryptPublicKey); + HttpEntity> httpEntity = new HttpEntity<>(requestEntity, headers); + ResponseEntity response = restTemplate.exchange(uri, HttpMethod.POST, httpEntity, Map.class); + return String.valueOf(response.getBody().get("encryptAesKey")); + } catch (Exception e) { + logger.error("登录失败:{}", e.getMessage(), e); + } + return ""; + } + + private void initLoginMap() { + if (loginDataMap.isEmpty()) { + digiwinSummitService.list().forEach(item -> { + loginDataMap.put(String.format(mapKey, item.getUserId(), item.getTenantId(), item.getRefProd()), item); + }); + } + } + + public void clearLoginMap() { + loginDataMap.clear(); + } + +} diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/basic/RSAUtils.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/basic/RSAUtils.java new file mode 100644 index 0000000..a183fa5 --- /dev/null +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/basic/RSAUtils.java @@ -0,0 +1,118 @@ +package com.digiwin.athena.app.service.basic; + + +import org.apache.commons.codec.binary.Base64; + +import javax.crypto.Cipher; +import java.io.ByteArrayOutputStream; +import java.security.Key; +import java.security.KeyFactory; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; + +/** + * @author zhuzcz + */ +public class RSAUtils { + /** + * 加密算法RSA + */ + public static final String KEY_ALGORITHM = "RSA"; + + /** + * RSA最大加密明文大小 + */ + private static final int MAX_ENCRYPT_BLOCK = 245; + + /** + * RSA最大解密密文大小 + */ + private static final int MAX_DECRYPT_BLOCK = 256; + + + /** */ + /** + *

+ * 私钥解密 + *

+ * + * @param encryptedData 已加密数据 + * @param privateKey 私钥(BASE64编码) + * @return + * @throws Exception + */ + public static byte[] decryptByPrivateKey(byte[] encryptedData, String privateKey) throws Exception { + byte[] keyBytes = Base64.decodeBase64(privateKey); + PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(keyBytes); + KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM); + Key privateK = keyFactory.generatePrivate(pkcs8KeySpec); + Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm()); + cipher.init(Cipher.DECRYPT_MODE, privateK); + int inputLen = encryptedData.length; + ByteArrayOutputStream out = new ByteArrayOutputStream(); + int offSet = 0; + byte[] cache; + int i = 0; + // 对数据分段解密 + while (inputLen - offSet > 0) { + if (inputLen - offSet > MAX_DECRYPT_BLOCK) { + cache = cipher.doFinal(encryptedData, offSet, MAX_DECRYPT_BLOCK); + } else { + cache = cipher.doFinal(encryptedData, offSet, inputLen - offSet); + } + out.write(cache, 0, cache.length); + i++; + offSet = i * MAX_DECRYPT_BLOCK; + } + byte[] decryptedData = out.toByteArray(); + out.close(); + return decryptedData; + } + + + /** */ + /** + *

+ * 公钥加密 + *

+ * + * @param data 源数据 + * @param publicKey 公钥(BASE64编码) + * @return + * @throws Exception + */ + public static byte[] encryptByPublicKey(byte[] data, String publicKey) throws Exception { + byte[] keyBytes = Base64.decodeBase64(publicKey); + X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(keyBytes); + KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM); + Key publicK = keyFactory.generatePublic(x509KeySpec); + // 对数据加密 + Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm()); + cipher.init(Cipher.ENCRYPT_MODE, publicK); + int inputLen = data.length; + ByteArrayOutputStream out = new ByteArrayOutputStream(); + int offSet = 0; + byte[] cache; + int i = 0; + // 对数据分段加密 + while (inputLen - offSet > 0) { + if (inputLen - offSet > MAX_ENCRYPT_BLOCK) { + cache = cipher.doFinal(data, offSet, MAX_ENCRYPT_BLOCK); + } else { + cache = cipher.doFinal(data, offSet, inputLen - offSet); + } + out.write(cache, 0, cache.length); + i++; + offSet = i * MAX_ENCRYPT_BLOCK; + } + byte[] encryptedData = out.toByteArray(); + out.close(); + return encryptedData; + } + + public static String encryptByPublicKey(String data, String clientPublicKey) throws Exception { + data = Base64.encodeBase64String(encryptByPublicKey(data.getBytes(), clientPublicKey)); + return data; + } + +} From b7ae4566674af7123553e5b5cacb1c483ebf4b7a Mon Sep 17 00:00:00 2001 From: robot Date: Thu, 25 Apr 2024 09:17:09 +0000 Subject: [PATCH 08/37] auto increment build version 1006 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index 49bc272..9540e56 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1005 +1006 From fda29d9e367713444d73de2d3737dddeab8d6684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A3=AE=E5=A3=AE?= Date: Mon, 29 Apr 2024 13:19:44 +0800 Subject: [PATCH 09/37] =?UTF-8?q?feat:demo.athenaopt.requirement.info.get?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../QuotationRequirementEAIService.java | 29 +++++ .../QuotationRequirementEAIServiceImpl.java | 27 +++++ .../QuotationRequirementInfoGetService.java | 109 ++++++++++++++++++ .../app/service/quotation/QuotationUtil.java | 15 +++ 4 files changed, 180 insertions(+) create mode 100644 demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/QuotationRequirementEAIService.java create mode 100644 demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/QuotationRequirementEAIServiceImpl.java create mode 100644 demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/quotation/QuotationRequirementInfoGetService.java create mode 100644 demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/quotation/QuotationUtil.java diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/QuotationRequirementEAIService.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/QuotationRequirementEAIService.java new file mode 100644 index 0000000..f498bf6 --- /dev/null +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/QuotationRequirementEAIService.java @@ -0,0 +1,29 @@ +package com.digiwin.athena.app.provider; + +import com.digiwin.app.service.AllowAnonymous; +import com.digiwin.app.service.DWEAIResult; +import com.digiwin.app.service.DWService; +import com.digiwin.app.service.eai.EAIService; +import com.digiwin.athena.app.service.quotation.QuotationUtil; + +import java.util.Map; + +/** + * @author lz + * @version 1.0 + * @title QuotationRequirementEAIService + * @description + * @create 2024/4/29 10:20 + */ +public interface QuotationRequirementEAIService extends DWService { + + /** + * 报价需求查询 + * @param headers + * @param messageBody + * @return + * @throws Exception + */ + @EAIService(id = QuotationUtil.DEMO_ATHENAOPT_REQUIREMENT_INFO_GET) + DWEAIResult get(Map headers, String messageBody) throws Exception; +} diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/QuotationRequirementEAIServiceImpl.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/QuotationRequirementEAIServiceImpl.java new file mode 100644 index 0000000..2a1da06 --- /dev/null +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/QuotationRequirementEAIServiceImpl.java @@ -0,0 +1,27 @@ +package com.digiwin.athena.app.provider.impl; + +import com.digiwin.app.service.DWEAIResult; +import com.digiwin.athena.app.provider.QuotationRequirementEAIService; +import com.digiwin.athena.app.service.quotation.QuotationUtil; +import com.digiwin.athena.opt.common.eai.service.EAIServiceContext; + +import javax.annotation.Resource; +import java.util.Map; + +/** + * @author lz + * @version 1.0 + * @title PurchaseDemoEAIServiceImpl + * @description + * @create 2023/8/30 16:50 + */ +public class QuotationRequirementEAIServiceImpl implements QuotationRequirementEAIService { + + @Resource + private EAIServiceContext eaiServiceContext; + + @Override + public DWEAIResult get(Map headers, String messageBody) throws Exception { + return eaiServiceContext.execute(QuotationUtil.DEMO_ATHENAOPT_REQUIREMENT_INFO_GET , headers, messageBody); + } +} diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/quotation/QuotationRequirementInfoGetService.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/quotation/QuotationRequirementInfoGetService.java new file mode 100644 index 0000000..25f10c1 --- /dev/null +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/quotation/QuotationRequirementInfoGetService.java @@ -0,0 +1,109 @@ +package com.digiwin.athena.app.service.quotation; + +import com.alibaba.fastjson.JSONObject; +import com.digiwin.app.service.DWEAIResult; +import com.digiwin.athena.opt.common.eai.EAIUtil; +import com.digiwin.athena.opt.common.eai.service.AbsEAIService; +import org.springframework.stereotype.Service; + +import java.util.*; + +/** + * @author lz + * @version 1.0 + * @title QuotationRequirement + * @description mock需求数据 + * @create 2024/4/29 10:00 + */ +@Service +public class QuotationRequirementInfoGetService extends AbsEAIService { + + @Override + public String getServiceName() { + return QuotationUtil.DEMO_ATHENAOPT_REQUIREMENT_INFO_GET; + } + + @Override + public DWEAIResult execute(Map headers, String messageBody) throws Exception { + + List> requirementInfo = getRequirementInfo(); + + return EAIUtil.buildEAIResult(new JSONObject().fluentPut("requirement_info", requirementInfo)); + } + + + /** + * @description mock需求数据 + * @author lz + * @throws + * @time 2024/4/29 10:16 + */ + public static List> getRequirementInfo() { + List> requirementInfo = new ArrayList<>(); + + // 第一个需求 + Map requirement1 = new HashMap<>(); + List correlationCode1 = Arrays.asList("100203"); + requirement1.put("correlation_code", correlationCode1); + requirement1.put("requirement_no", "100203"); + requirement1.put("requirement_name", "产品色"); + requirement1.put("requirement_description", ""); + requirementInfo.add(requirement1); + + // 第二个需求 + Map requirement2 = new HashMap<>(); + List correlationCode2 = Arrays.asList("100203", "1-1"); + requirement2.put("correlation_code", correlationCode2); + requirement2.put("requirement_no", "100203"); + requirement2.put("requirement_name", "是否定制-客户定制色或工厂标准色"); + requirement2.put("requirement_description", ""); + requirementInfo.add(requirement2); + + // 第三个需求 + Map requirement3 = new HashMap<>(); + List correlationCode3 = Arrays.asList("100203", "2-1"); + requirement3.put("correlation_code", correlationCode3); + requirement3.put("requirement_no", "100203"); + requirement3.put("requirement_name", "产品色系-2"); + requirement3.put("requirement_description", ""); + requirementInfo.add(requirement3); + + // 第四个需求 + Map requirement4 = new HashMap<>(); + List correlationCode4 = Arrays.asList("100203", "3-1"); + requirement4.put("correlation_code", correlationCode4); + requirement4.put("requirement_no", "100203"); + requirement4.put("requirement_name", "每色MOQ-2"); + requirement4.put("requirement_description", ""); + requirementInfo.add(requirement4); + + // 第五个需求 + Map requirement5 = new HashMap<>(); + List correlationCode5 = Arrays.asList("100203", "4-1"); + requirement5.put("correlation_code", correlationCode5); + requirement5.put("requirement_no", "100203"); + requirement5.put("requirement_name", "是否有文件,若有,需附上文件-2"); + requirement5.put("requirement_description", ""); + requirementInfo.add(requirement5); + + // 第六个需求 + Map requirement6 = new HashMap<>(); + List correlationCode6 = Arrays.asList("100204"); + requirement6.put("correlation_code", correlationCode6); + requirement6.put("requirement_no", "100203"); + requirement6.put("requirement_name", "是否有文件,若有,需附上文件-2"); + requirement6.put("requirement_description", ""); + requirementInfo.add(requirement6); + + // 第七个需求 + Map requirement7 = new HashMap<>(); + List correlationCode7 = Arrays.asList("100204", "5-1"); + requirement7.put("correlation_code", correlationCode7); + requirement7.put("requirement_no", "100204"); + requirement7.put("requirement_name", "需求名称"); + requirement7.put("requirement_description", ""); + requirementInfo.add(requirement7); + + return requirementInfo; + } +} diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/quotation/QuotationUtil.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/quotation/QuotationUtil.java new file mode 100644 index 0000000..8cd2009 --- /dev/null +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/quotation/QuotationUtil.java @@ -0,0 +1,15 @@ +package com.digiwin.athena.app.service.quotation; + +/** + * @author lz + * @version 1.0 + * @title QuotationUtil + * @description + * @create 2024/4/29 10:01 + */ +public class QuotationUtil { + + public static final String DEMO_ATHENAOPT_REQUIREMENT_INFO_GET= "demo.athenaopt.requirement.info.get"; + + +} From 39e9c476b15da35ebaee2ffb6c6ba735c2d12752 Mon Sep 17 00:00:00 2001 From: robot Date: Mon, 29 Apr 2024 05:22:22 +0000 Subject: [PATCH 10/37] auto increment build version 1007 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index 9540e56..fb35a14 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1006 +1007 From e3c95816d1de04a51b1dfdbad48fa51d1bcf33c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A3=AE=E5=A3=AE?= Date: Mon, 29 Apr 2024 13:29:34 +0800 Subject: [PATCH 11/37] =?UTF-8?q?feat:demo.athenaopt.requirement.info.get?= =?UTF-8?q?=E5=BC=80=E5=8F=91=EF=BC=8C=E6=B5=8B=E8=AF=95=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/quotation/QuotationRequirementInfoGetService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/quotation/QuotationRequirementInfoGetService.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/quotation/QuotationRequirementInfoGetService.java index 25f10c1..78d8f30 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/quotation/QuotationRequirementInfoGetService.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/quotation/QuotationRequirementInfoGetService.java @@ -90,7 +90,7 @@ public class QuotationRequirementInfoGetService extends AbsEAIService { Map requirement6 = new HashMap<>(); List correlationCode6 = Arrays.asList("100204"); requirement6.put("correlation_code", correlationCode6); - requirement6.put("requirement_no", "100203"); + requirement6.put("requirement_no", "100204"); requirement6.put("requirement_name", "是否有文件,若有,需附上文件-2"); requirement6.put("requirement_description", ""); requirementInfo.add(requirement6); From fcdd3d71ac7f60bbf7e1bc0dc0c9f73040251448 Mon Sep 17 00:00:00 2001 From: robot Date: Mon, 29 Apr 2024 05:31:14 +0000 Subject: [PATCH 12/37] auto increment build version 1008 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index fb35a14..617ba1c 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1007 +1008 From e8ec83cee59d80d71d7350110d9f1cd10f8dafeb Mon Sep 17 00:00:00 2001 From: dongsk Date: Tue, 30 Apr 2024 13:20:50 +0800 Subject: [PATCH 13/37] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=B8=83=E5=B1=80CRUD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../athena/app/infra/entity/LayoutConfig.java | 40 +++++++++++++++++++ .../repository/LayoutConfigRepository.java | 20 ++++++++++ .../service/Impl/LayoutConfigServiceImpl.java | 16 ++++++++ .../infra/service/LayoutConfigService.java | 7 ++++ .../athena/app/provider/BasicApiService.java | 7 ++++ .../provider/impl/BasicApiServiceImpl.java | 24 +++++++++++ 6 files changed, 114 insertions(+) create mode 100644 demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/LayoutConfig.java create mode 100644 demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/repository/LayoutConfigRepository.java create mode 100644 demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/Impl/LayoutConfigServiceImpl.java create mode 100644 demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/LayoutConfigService.java diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/LayoutConfig.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/LayoutConfig.java new file mode 100644 index 0000000..7f7f2ee --- /dev/null +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/LayoutConfig.java @@ -0,0 +1,40 @@ +/* + * Author: DONGSK + * Datetime: 2024/4/25 16:43 + * Description: + * History: + * 作者姓名 --修改时间 --版本号--描述 + */ +package com.digiwin.athena.app.infra.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +import java.io.Serializable; + +/** + * DigiwinSummit + * + * @author DONGSK 2024/4/25 16:43 + * @since 1.0.0 + */ +@Data +@TableName(value = "layout_config", autoResultMap = true) +public class LayoutConfig extends Model implements Serializable { + @TableField(value = "sys_id") + String sysId; + @TableField(value = "user_id") + String userId; + @TableField(value = "tenant_id") + String tenantId; + @TableField(value = "top") + String top; + @TableField(value = "left") + String left; + @TableField(value = "height") + String height; + @TableField(value = "width") + String width; +} diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/repository/LayoutConfigRepository.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/repository/LayoutConfigRepository.java new file mode 100644 index 0000000..e05ebc6 --- /dev/null +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/repository/LayoutConfigRepository.java @@ -0,0 +1,20 @@ +/* + * Author: DONGSK + * Datetime: 2024/4/25 16:49 + * Description: + * History: + * 作者姓名 --修改时间 --版本号--描述 + */ +package com.digiwin.athena.app.infra.repository; + +import com.digiwin.athena.app.infra.entity.LayoutConfig; +import com.digiwin.athena.opt.persistence.repository.BaseRepository; + +/** + * DigiwinSummitRepository + * + * @author DONGSK 2024/4/25 16:49 + * @since 1.0.0 + */ +public interface LayoutConfigRepository extends BaseRepository { +} diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/Impl/LayoutConfigServiceImpl.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/Impl/LayoutConfigServiceImpl.java new file mode 100644 index 0000000..7158a33 --- /dev/null +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/Impl/LayoutConfigServiceImpl.java @@ -0,0 +1,16 @@ +package com.digiwin.athena.app.infra.service.Impl; + +import com.digiwin.athena.app.infra.entity.LayoutConfig; +import com.digiwin.athena.app.infra.repository.LayoutConfigRepository; +import com.digiwin.athena.app.infra.service.LayoutConfigService; +import com.digiwin.athena.opt.persistence.service.impl.AbsBaseService; +import org.springframework.stereotype.Service; + +/** + * @author zhenggl + * create: 2023-04-28 + * Description: + */ +@Service +public class LayoutConfigServiceImpl extends AbsBaseService implements LayoutConfigService { +} diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/LayoutConfigService.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/LayoutConfigService.java new file mode 100644 index 0000000..212cfa3 --- /dev/null +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/LayoutConfigService.java @@ -0,0 +1,7 @@ +package com.digiwin.athena.app.infra.service; + +import com.digiwin.athena.app.infra.entity.LayoutConfig; +import com.digiwin.athena.opt.persistence.service.IBaseService; + +public interface LayoutConfigService extends IBaseService { +} diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/BasicApiService.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/BasicApiService.java index 97e773b..deb5fc3 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/BasicApiService.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/BasicApiService.java @@ -13,6 +13,7 @@ import com.digiwin.app.service.restful.DWPathVariable; import com.digiwin.app.service.restful.DWRequestMapping; import com.digiwin.app.service.restful.DWRequestMethod; import com.digiwin.app.service.restful.DWRestfulService; +import com.digiwin.athena.app.infra.entity.LayoutConfig; import java.util.Map; @@ -41,6 +42,12 @@ public interface BasicApiService extends DWService { @DWRequestMapping(path = "/api/clear/login", method = DWRequestMethod.GET) Object clearLogin() throws Exception; + @AllowAnonymous + @DWRequestMapping(path = "/api/517/config/save", method = DWRequestMethod.POST) + Object layoutConfig(LayoutConfig layoutConfig) throws Exception; + @AllowAnonymous + @DWRequestMapping(path = "/api/517/config/list", method = DWRequestMethod.GET) + Object layoutConfig(String userId, String tenantId, String sysId) throws Exception; } \ No newline at end of file diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java index d7a1f88..99f5e66 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java @@ -9,10 +9,14 @@ package com.digiwin.athena.app.provider.impl; import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.digiwin.app.service.DWServiceContext; +import com.digiwin.athena.app.infra.entity.LayoutConfig; +import com.digiwin.athena.app.infra.service.LayoutConfigService; import com.digiwin.athena.app.provider.BasicApiService; import com.digiwin.athena.app.service.basic.LoginService; import com.digiwin.athena.opt.common.eai.service.EAIServiceContext; +import org.apache.commons.lang.StringUtils; import javax.annotation.Resource; import java.util.HashMap; @@ -32,6 +36,9 @@ public class BasicApiServiceImpl implements BasicApiService { @Resource LoginService loginService; + @Resource + LayoutConfigService layoutConfigService; + @Override public String helloWord(String name) throws Exception { return "hello ," + name; @@ -63,4 +70,21 @@ public class BasicApiServiceImpl implements BasicApiService { return "ok"; } + @Override + public Object layoutConfig(LayoutConfig layoutConfig) throws Exception { + return layoutConfigService.saveOrUpdate(layoutConfig); + } + + @Override + public Object layoutConfig(String userId, String tenantId, String sysId) throws Exception { + + LambdaQueryChainWrapper lambdaQuery = layoutConfigService.lambdaQuery(); + lambdaQuery.eq(LayoutConfig::getUserId, userId); + lambdaQuery.eq(LayoutConfig::getTenantId, tenantId); + if (StringUtils.isNotBlank(sysId)) { + lambdaQuery.eq(LayoutConfig::getSysId, sysId); + } + return lambdaQuery.list(); + } + } From 00a6710a8a86d99dd13d56bfa017a070df2e17c6 Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 30 Apr 2024 05:23:18 +0000 Subject: [PATCH 14/37] auto increment build version 1009 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index 617ba1c..6cb3869 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1008 +1009 From dfe0e34bfa2eee670bc3575c4d48b0f68b522161 Mon Sep 17 00:00:00 2001 From: dongsk Date: Tue, 30 Apr 2024 13:26:30 +0800 Subject: [PATCH 15/37] get->post --- .../java/com/digiwin/athena/app/provider/BasicApiService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/BasicApiService.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/BasicApiService.java index deb5fc3..d85d61b 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/BasicApiService.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/BasicApiService.java @@ -47,7 +47,7 @@ public interface BasicApiService extends DWService { Object layoutConfig(LayoutConfig layoutConfig) throws Exception; @AllowAnonymous - @DWRequestMapping(path = "/api/517/config/list", method = DWRequestMethod.GET) + @DWRequestMapping(path = "/api/517/config/list", method = DWRequestMethod.POST) Object layoutConfig(String userId, String tenantId, String sysId) throws Exception; } \ No newline at end of file From 2ccc1ee790f38cea03deac82371e6a88162018f1 Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 30 Apr 2024 05:28:13 +0000 Subject: [PATCH 16/37] auto increment build version 1010 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index 6cb3869..52a9f4e 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1009 +1010 From 54660f60a646bbbb39506ab8138b9afc15471558 Mon Sep 17 00:00:00 2001 From: dongsk Date: Tue, 30 Apr 2024 13:43:25 +0800 Subject: [PATCH 17/37] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/digiwin/athena/app/infra/entity/LayoutConfig.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/LayoutConfig.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/LayoutConfig.java index 7f7f2ee..4d321f3 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/LayoutConfig.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/LayoutConfig.java @@ -29,12 +29,12 @@ public class LayoutConfig extends Model implements Serializable { String userId; @TableField(value = "tenant_id") String tenantId; - @TableField(value = "top") + @TableField(value = "top_px") String top; - @TableField(value = "left") + @TableField(value = "left_px") String left; - @TableField(value = "height") + @TableField(value = "height_px") String height; - @TableField(value = "width") + @TableField(value = "width_px") String width; } From de2d57a1812229214906845bec40bb3853f1dbc9 Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 30 Apr 2024 05:44:58 +0000 Subject: [PATCH 18/37] auto increment build version 1011 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index 52a9f4e..d488f1c 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1010 +1011 From 671b522fe0180f53f7d3c50293062239934e8108 Mon Sep 17 00:00:00 2001 From: dongsk Date: Tue, 30 Apr 2024 14:03:53 +0800 Subject: [PATCH 19/37] =?UTF-8?q?=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/provider/impl/BasicApiServiceImpl.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java index 99f5e66..2b1bf11 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java @@ -72,6 +72,24 @@ public class BasicApiServiceImpl implements BasicApiService { @Override public Object layoutConfig(LayoutConfig layoutConfig) throws Exception { + LambdaQueryChainWrapper lambdaQuery = layoutConfigService.lambdaQuery() + .eq(LayoutConfig::getUserId, layoutConfig.getUserId()) + .eq(LayoutConfig::getTenantId, layoutConfig.getTenantId()) + .eq(LayoutConfig::getSysId, layoutConfig.getSysId()); + if (lambdaQuery.exists()) { + layoutConfigService.lambdaUpdate() + .set(LayoutConfig::getTop, layoutConfig.getTop()) + .set(LayoutConfig::getLeft, layoutConfig.getLeft()) + .set(LayoutConfig::getWidth, layoutConfig.getWidth()) + .set(LayoutConfig::getHeight, layoutConfig.getHeight()) + .eq(LayoutConfig::getUserId, layoutConfig.getUserId()) + .eq(LayoutConfig::getTenantId, layoutConfig.getTenantId()) + .eq(LayoutConfig::getSysId, layoutConfig.getSysId()) + .update(); + } else { + layoutConfigService.save(layoutConfig); + } + return layoutConfigService.saveOrUpdate(layoutConfig); } From 871baaa1da9dcd2293e6284909a52995a4fc61cd Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 30 Apr 2024 06:05:37 +0000 Subject: [PATCH 20/37] auto increment build version 1012 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index d488f1c..2d1420d 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1011 +1012 From 26436b028bee79fb337facc455b693212f2d1821 Mon Sep 17 00:00:00 2001 From: dongsk Date: Tue, 30 Apr 2024 14:15:36 +0800 Subject: [PATCH 21/37] bug --- .../athena/app/provider/impl/BasicApiServiceImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java index 2b1bf11..b6d2d5a 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java @@ -77,7 +77,7 @@ public class BasicApiServiceImpl implements BasicApiService { .eq(LayoutConfig::getTenantId, layoutConfig.getTenantId()) .eq(LayoutConfig::getSysId, layoutConfig.getSysId()); if (lambdaQuery.exists()) { - layoutConfigService.lambdaUpdate() + return layoutConfigService.lambdaUpdate() .set(LayoutConfig::getTop, layoutConfig.getTop()) .set(LayoutConfig::getLeft, layoutConfig.getLeft()) .set(LayoutConfig::getWidth, layoutConfig.getWidth()) @@ -87,10 +87,8 @@ public class BasicApiServiceImpl implements BasicApiService { .eq(LayoutConfig::getSysId, layoutConfig.getSysId()) .update(); } else { - layoutConfigService.save(layoutConfig); + return layoutConfigService.save(layoutConfig); } - - return layoutConfigService.saveOrUpdate(layoutConfig); } @Override From 9ea0668879e4d664b1d40759fe2b007e5f062ded Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 30 Apr 2024 06:19:22 +0000 Subject: [PATCH 22/37] auto increment build version 1013 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index 2d1420d..9951021 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1012 +1013 From 9c2a913f1a5eed88f4848071ae9a75ff8c49e4a6 Mon Sep 17 00:00:00 2001 From: dongsk Date: Tue, 30 Apr 2024 17:18:07 +0800 Subject: [PATCH 23/37] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=99=BE=E5=88=86?= =?UTF-8?q?=E6=AF=94=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/digiwin/athena/app/infra/entity/LayoutConfig.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/LayoutConfig.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/LayoutConfig.java index 4d321f3..f0907cc 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/LayoutConfig.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/LayoutConfig.java @@ -37,4 +37,12 @@ public class LayoutConfig extends Model implements Serializable { String height; @TableField(value = "width_px") String width; + @TableField(value = "width_percent") + String widthPercent; + @TableField(value = "height_percent") + String heightPercent; + @TableField(value = "top_percent") + String topPercent; + @TableField(value = "left_percent") + String leftPercent; } From 8b8e5d43bdd75407c895193f361a072a32641c52 Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 30 Apr 2024 09:19:34 +0000 Subject: [PATCH 24/37] auto increment build version 1014 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index 9951021..7cf69b1 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1013 +1014 From 054836957340aa6ee54b8261110bccbca2f8cb91 Mon Sep 17 00:00:00 2001 From: dongsk Date: Tue, 30 Apr 2024 18:27:00 +0800 Subject: [PATCH 25/37] no message --- .../app/provider/impl/BasicApiServiceImpl.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java index b6d2d5a..89b9fd1 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java @@ -20,6 +20,7 @@ import org.apache.commons.lang.StringUtils; import javax.annotation.Resource; import java.util.HashMap; +import java.util.List; import java.util.Map; /** @@ -100,7 +101,20 @@ public class BasicApiServiceImpl implements BasicApiService { if (StringUtils.isNotBlank(sysId)) { lambdaQuery.eq(LayoutConfig::getSysId, sysId); } - return lambdaQuery.list(); + + List list = lambdaQuery.list(); + + if (list.isEmpty()) { + lambdaQuery.clear(); + lambdaQuery.eq(LayoutConfig::getUserId, "default"); + lambdaQuery.eq(LayoutConfig::getTenantId, tenantId); + if (StringUtils.isNotBlank(sysId)) { + lambdaQuery.eq(LayoutConfig::getSysId, sysId); + } + list = lambdaQuery.list(); + } + + return list; } } From 73a8024f60d49da777679a43621ef014cee61afd Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 30 Apr 2024 10:28:30 +0000 Subject: [PATCH 26/37] auto increment build version 1015 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index 7cf69b1..07b0c76 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1014 +1015 From 4d9d29b9933843188e9dfbbed1ffe65029300ae4 Mon Sep 17 00:00:00 2001 From: dongsk Date: Tue, 30 Apr 2024 18:32:34 +0800 Subject: [PATCH 27/37] default --- .../athena/app/provider/impl/BasicApiServiceImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java index 89b9fd1..5c9c644 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java @@ -105,13 +105,13 @@ public class BasicApiServiceImpl implements BasicApiService { List list = lambdaQuery.list(); if (list.isEmpty()) { - lambdaQuery.clear(); - lambdaQuery.eq(LayoutConfig::getUserId, "default"); - lambdaQuery.eq(LayoutConfig::getTenantId, tenantId); + LambdaQueryChainWrapper lambdaQueryX = layoutConfigService.lambdaQuery(); + lambdaQueryX.eq(LayoutConfig::getUserId, "default"); + lambdaQueryX.eq(LayoutConfig::getTenantId, tenantId); if (StringUtils.isNotBlank(sysId)) { - lambdaQuery.eq(LayoutConfig::getSysId, sysId); + lambdaQueryX.eq(LayoutConfig::getSysId, sysId); } - list = lambdaQuery.list(); + list = lambdaQueryX.list(); } return list; From eb2658696e71de77f73cb5bf70b166f84e49ed1d Mon Sep 17 00:00:00 2001 From: robot Date: Tue, 30 Apr 2024 10:34:03 +0000 Subject: [PATCH 28/37] auto increment build version 1016 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index 07b0c76..8618e61 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1015 +1016 From 4f300d77039a797821f5a5764a85d348015e1dff Mon Sep 17 00:00:00 2001 From: dongsk Date: Mon, 6 May 2024 09:24:46 +0800 Subject: [PATCH 29/37] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=99=BE=E5=88=86?= =?UTF-8?q?=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../digiwin/athena/app/provider/impl/BasicApiServiceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java index 5c9c644..bebf2cd 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java @@ -83,6 +83,10 @@ public class BasicApiServiceImpl implements BasicApiService { .set(LayoutConfig::getLeft, layoutConfig.getLeft()) .set(LayoutConfig::getWidth, layoutConfig.getWidth()) .set(LayoutConfig::getHeight, layoutConfig.getHeight()) + .set(LayoutConfig::getTopPercent, layoutConfig.getTopPercent()) + .set(LayoutConfig::getLeftPercent, layoutConfig.getLeftPercent()) + .set(LayoutConfig::getWidthPercent, layoutConfig.getWidthPercent()) + .set(LayoutConfig::getHeightPercent, layoutConfig.getHeightPercent()) .eq(LayoutConfig::getUserId, layoutConfig.getUserId()) .eq(LayoutConfig::getTenantId, layoutConfig.getTenantId()) .eq(LayoutConfig::getSysId, layoutConfig.getSysId()) From 457470eb44f7614928744c320710c49944328679 Mon Sep 17 00:00:00 2001 From: robot Date: Mon, 6 May 2024 01:26:52 +0000 Subject: [PATCH 30/37] auto increment build version 1017 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index 8618e61..0842778 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1016 +1017 From 12200900dd90e0104dea525cb26814ec0fba09db Mon Sep 17 00:00:00 2001 From: dongsk Date: Thu, 13 Jun 2024 17:52:14 +0800 Subject: [PATCH 31/37] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E9=A9=B1=E5=8A=A8=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo-athenaopt_backend/develop/conf/log4j2.xml | 2 +- demo-athenaopt_backend/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demo-athenaopt_backend/develop/conf/log4j2.xml b/demo-athenaopt_backend/develop/conf/log4j2.xml index c3be72c..1aa79d7 100644 --- a/demo-athenaopt_backend/develop/conf/log4j2.xml +++ b/demo-athenaopt_backend/develop/conf/log4j2.xml @@ -61,7 +61,7 @@ - + diff --git a/demo-athenaopt_backend/pom.xml b/demo-athenaopt_backend/pom.xml index 7a61d32..ee3d047 100644 --- a/demo-athenaopt_backend/pom.xml +++ b/demo-athenaopt_backend/pom.xml @@ -67,7 +67,7 @@ com.digiwin.lcdp lcdp-modeldriven - 1.0.1.17 + 1.0.1.32 From e5a588fbdfd9984732f2e8f8dd31c89466216b27 Mon Sep 17 00:00:00 2001 From: robot Date: Thu, 13 Jun 2024 09:54:52 +0000 Subject: [PATCH 32/37] auto increment build version 1018 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index 0842778..4d042af 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1017 +1018 From ff3ae8b491275d2cf0392975b74f14ad18aa2a4f Mon Sep 17 00:00:00 2001 From: dongsk Date: Thu, 13 Jun 2024 18:07:07 +0800 Subject: [PATCH 33/37] EventCenterProperties eventCenterUrl=@eventCenterUrl@ --- demo-athenaopt_backend/develop/conf/application.properties | 2 ++ 1 file changed, 2 insertions(+) diff --git a/demo-athenaopt_backend/develop/conf/application.properties b/demo-athenaopt_backend/develop/conf/application.properties index edf9499..37083be 100644 --- a/demo-athenaopt_backend/develop/conf/application.properties +++ b/demo-athenaopt_backend/develop/conf/application.properties @@ -94,3 +94,5 @@ domain.lmc=@lmcUrl@ opt.mybatisPlus.enable=true +eventCenterUrl=@eventCenterUrl@ + From 56b153ff1c507ba315633ddbd61894c65963c168 Mon Sep 17 00:00:00 2001 From: robot Date: Thu, 13 Jun 2024 10:08:32 +0000 Subject: [PATCH 34/37] auto increment build version 1019 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index 4d042af..1a8c1ea 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1018 +1019 From 0dc4d761b6765611ce367eb8f1b4ae6441ac74ce Mon Sep 17 00:00:00 2001 From: dongsk Date: Thu, 13 Jun 2024 18:49:56 +0800 Subject: [PATCH 35/37] appId --- demo-athenaopt_backend/develop/conf/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo-athenaopt_backend/develop/conf/application.properties b/demo-athenaopt_backend/develop/conf/application.properties index 37083be..45d1380 100644 --- a/demo-athenaopt_backend/develop/conf/application.properties +++ b/demo-athenaopt_backend/develop/conf/application.properties @@ -1,4 +1,4 @@ -appId=athena +appId=@appId@ configCenterUrl=@configCenterUrl@ configPolicy=@configPolicy@ isRemoteConfigOn=@isRemoteConfigOn@ From 280d0a9542dcbbbb6b1b7ab9f1276f6de1ad59cb Mon Sep 17 00:00:00 2001 From: robot Date: Thu, 13 Jun 2024 10:51:17 +0000 Subject: [PATCH 36/37] auto increment build version 1020 [CI SKIP] --- version_control/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_control/BUILD b/version_control/BUILD index 1a8c1ea..49efa1e 100644 --- a/version_control/BUILD +++ b/version_control/BUILD @@ -1 +1 @@ -1019 +1020 From 1d50e986ba93a9cb33d710db093746ea63f7468a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A3=AE=E5=A3=AE?= Date: Fri, 16 Aug 2024 11:33:47 +0800 Subject: [PATCH 37/37] =?UTF-8?q?refactor:=E6=A8=A1=E5=9E=8B=E9=A9=B1?= =?UTF-8?q?=E5=8A=A8=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7->1.0.1.40?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo-athenaopt_backend/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo-athenaopt_backend/pom.xml b/demo-athenaopt_backend/pom.xml index ee3d047..d7421df 100644 --- a/demo-athenaopt_backend/pom.xml +++ b/demo-athenaopt_backend/pom.xml @@ -67,7 +67,7 @@ com.digiwin.lcdp lcdp-modeldriven - 1.0.1.32 + 1.0.1.40