From bd543e56d5550ada9ccbea012f522844f77881fd Mon Sep 17 00:00:00 2001 From: xupei Date: Tue, 28 May 2024 14:25:03 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E5=BC=80=E5=90=AF=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E9=98=9F=E5=88=97=E7=9A=84=E7=9B=91=E5=90=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../da/common/RabbitMQ/GenerateConsumer.java | 118 +++++++++--------- .../com/ai/da/common/RabbitMQ/SRConsumer.java | 24 ++-- 2 files changed, 71 insertions(+), 71 deletions(-) diff --git a/src/main/java/com/ai/da/common/RabbitMQ/GenerateConsumer.java b/src/main/java/com/ai/da/common/RabbitMQ/GenerateConsumer.java index 876dfd2c..3e8e6a6e 100644 --- a/src/main/java/com/ai/da/common/RabbitMQ/GenerateConsumer.java +++ b/src/main/java/com/ai/da/common/RabbitMQ/GenerateConsumer.java @@ -154,63 +154,63 @@ public class GenerateConsumer { } -// @RabbitListener(queues = MQConfig.GENERATE_QUEUE) -// @RabbitHandler -// public void generateConsumer1(Message msg, Channel channel) { -// generate(msg, channel, "consumer 1"); -// } -// -// @RabbitListener(queues = MQConfig.GENERATE_QUEUE) -// @RabbitHandler -// public void generateConsumer2(Message msg, Channel channel) { -// generate(msg, channel, "consumer 2"); -// } -// -// @RabbitListener(queues = MQConfig.GENERATE_QUEUE) -// @RabbitHandler -// public void generateConsumer3(Message msg, Channel channel) { -// generate(msg, channel, "consumer 3"); -// } -// -// @RabbitListener(queues = MQConfig.GENERATE_QUEUE) -// @RabbitHandler -// public void generateConsumer4(Message msg, Channel channel) { -// generate(msg, channel, "consumer 4"); -// } -// -// @RabbitListener(queues = MQConfig.GENERATE_QUEUE) -// @RabbitHandler -// public void generateConsumer5(Message msg, Channel channel) { -// generate(msg, channel, "consumer 5"); -// } -// -// @RabbitListener(queues = MQConfig.GENERATE_QUEUE) -// @RabbitHandler -// public void generateConsumer6(Message msg, Channel channel) { -// generate(msg, channel, "consumer 6"); -// } -// -// @RabbitListener(queues = MQConfig.GENERATE_QUEUE) -// @RabbitHandler -// public void generateConsumer7(Message msg, Channel channel) { -// generate(msg, channel, "consumer 7"); -// } -// -// @RabbitListener(queues = MQConfig.GENERATE_QUEUE) -// @RabbitHandler -// public void generateConsumer8(Message msg, Channel channel) { -// generate(msg, channel, "consumer 8"); -// } -// -// @RabbitListener(queues = MQConfig.GENERATE_QUEUE) -// @RabbitHandler -// public void generateConsumer9(Message msg, Channel channel) { -// generate(msg, channel, "consumer 9"); -// } -// -// @RabbitListener(queues = MQConfig.GENERATE_RESULT_QUEUE) -// @RabbitHandler -// public void getGenerateResult(Message msg, Channel channel) { -// processGenerateResult(msg, channel); -// } + @RabbitListener(queues = MQConfig.GENERATE_QUEUE) + @RabbitHandler + public void generateConsumer1(Message msg, Channel channel) { + generate(msg, channel, "consumer 1"); + } + + @RabbitListener(queues = MQConfig.GENERATE_QUEUE) + @RabbitHandler + public void generateConsumer2(Message msg, Channel channel) { + generate(msg, channel, "consumer 2"); + } + + @RabbitListener(queues = MQConfig.GENERATE_QUEUE) + @RabbitHandler + public void generateConsumer3(Message msg, Channel channel) { + generate(msg, channel, "consumer 3"); + } + + @RabbitListener(queues = MQConfig.GENERATE_QUEUE) + @RabbitHandler + public void generateConsumer4(Message msg, Channel channel) { + generate(msg, channel, "consumer 4"); + } + + @RabbitListener(queues = MQConfig.GENERATE_QUEUE) + @RabbitHandler + public void generateConsumer5(Message msg, Channel channel) { + generate(msg, channel, "consumer 5"); + } + + @RabbitListener(queues = MQConfig.GENERATE_QUEUE) + @RabbitHandler + public void generateConsumer6(Message msg, Channel channel) { + generate(msg, channel, "consumer 6"); + } + + @RabbitListener(queues = MQConfig.GENERATE_QUEUE) + @RabbitHandler + public void generateConsumer7(Message msg, Channel channel) { + generate(msg, channel, "consumer 7"); + } + + @RabbitListener(queues = MQConfig.GENERATE_QUEUE) + @RabbitHandler + public void generateConsumer8(Message msg, Channel channel) { + generate(msg, channel, "consumer 8"); + } + + @RabbitListener(queues = MQConfig.GENERATE_QUEUE) + @RabbitHandler + public void generateConsumer9(Message msg, Channel channel) { + generate(msg, channel, "consumer 9"); + } + + @RabbitListener(queues = MQConfig.GENERATE_RESULT_QUEUE) + @RabbitHandler + public void getGenerateResult(Message msg, Channel channel) { + processGenerateResult(msg, channel); + } } diff --git a/src/main/java/com/ai/da/common/RabbitMQ/SRConsumer.java b/src/main/java/com/ai/da/common/RabbitMQ/SRConsumer.java index b8ba32f2..6ad261bd 100644 --- a/src/main/java/com/ai/da/common/RabbitMQ/SRConsumer.java +++ b/src/main/java/com/ai/da/common/RabbitMQ/SRConsumer.java @@ -218,17 +218,17 @@ public class SRConsumer { taskListService.updateTaskStatusOrOutputRedis(uniqueId, "fail", null); } -// @RabbitListener(queues = MQConfig.SR_QUEUE) -// @RabbitHandler -// public void SRConsumer1(Message msg, Channel channel) { -// superResolution(msg, channel, "consumer 1"); -// } -// -// -// @RabbitListener(queues = MQConfig.SR_RESULT_QUEUE) -// @RabbitHandler -// public void SRResultConsumer1(Message msg, Channel channel) { -// getSRResult(msg, channel, "consumer 1"); -// } + @RabbitListener(queues = MQConfig.SR_QUEUE) + @RabbitHandler + public void SRConsumer1(Message msg, Channel channel) { + superResolution(msg, channel, "consumer 1"); + } + + + @RabbitListener(queues = MQConfig.SR_RESULT_QUEUE) + @RabbitHandler + public void SRResultConsumer1(Message msg, Channel channel) { + getSRResult(msg, channel, "consumer 1"); + } } From 701652c6b20e02276de20942b622667e2aabf02d Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Tue, 9 Jul 2024 11:07:01 +0800 Subject: [PATCH 2/8] BUGFIX:aida; --- .../java/com/ai/da/common/RabbitMQ/MQConfig.java | 12 ++++++------ src/main/resources/application-prod.properties | 4 ++-- src/main/resources/application.properties | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/ai/da/common/RabbitMQ/MQConfig.java b/src/main/java/com/ai/da/common/RabbitMQ/MQConfig.java index 7f9e4b18..b7ceb9e5 100644 --- a/src/main/java/com/ai/da/common/RabbitMQ/MQConfig.java +++ b/src/main/java/com/ai/da/common/RabbitMQ/MQConfig.java @@ -12,23 +12,23 @@ public class MQConfig { // public static final String GENERATE_QUEUE = "generate-queue-test"; // ================================================================== // public static final String GENERATE_QUEUE = "generate-queue-local"; - public static final String GENERATE_QUEUE = "generate-queue-dev"; + public static final String GENERATE_QUEUE = "generate-queue-prod"; // public static final String GENERATE_QUEUE = "generate-queue-prod"; // // public static final String SR_QUEUE = "SR-queue-local"; - public static final String SR_QUEUE = "SR-queue-dev"; + public static final String SR_QUEUE = "SR-queue-prod"; // public static final String SR_QUEUE = "SR-queue-prod"; // // public static final String SR_RESULT_QUEUE = "SuperResolution-local"; - public static final String SR_RESULT_QUEUE = "SuperResolution-dev"; + public static final String SR_RESULT_QUEUE = "SuperResolution-prod"; // public static final String SR_RESULT_QUEUE = "SuperResolution-prod"; // // public static final String GENERATE_RESULT_QUEUE = "GenerateImage-local"; - public static final String GENERATE_RESULT_QUEUE = "GenerateImage-dev"; + public static final String GENERATE_RESULT_QUEUE = "GenerateImage-prod"; - public static final String TO_PRODUCT_IMAGE_RESULT_QUEUE = "ToProductImage-dev"; + public static final String TO_PRODUCT_IMAGE_RESULT_QUEUE = "ToProductImage-prod"; - public static final String RELIGHT_RESULT_QUEUE = "Relight-dev"; + public static final String RELIGHT_RESULT_QUEUE = "Relight-prod"; public MQConfig() { } diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties index 49ee4f5a..99fd8f26 100644 --- a/src/main/resources/application-prod.properties +++ b/src/main/resources/application-prod.properties @@ -45,8 +45,8 @@ spring.servlet.multipart.max-request-size= 10MB #访问python服务的ip(对应环境) access.python.ip=http://18.167.251.121 access.python.port=9990 -access.python.generate_sr_port=9995 -access.python.address=http://18.167.251.121:9995 +access.python.generate_sr_port=9990 +access.python.address=http://18.167.251.121:9990 minio.endpoint=https://www.minio.aida.com.hk:12024 minio.accessKey=admin diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 974fee23..605b072c 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -5,4 +5,4 @@ #spring.profiles.active=prod #����application-dev�ļ�(��������) -spring.profiles.active=dev +spring.profiles.active=prod From 3d4ea89516f999d01bcac88340161d29a10f4ca8 Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Tue, 9 Jul 2024 13:14:46 +0800 Subject: [PATCH 3/8] BUGFIX:like; --- .../java/com/ai/da/service/impl/UserLikeGroupServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/ai/da/service/impl/UserLikeGroupServiceImpl.java b/src/main/java/com/ai/da/service/impl/UserLikeGroupServiceImpl.java index 3d8c05cb..9dff1679 100644 --- a/src/main/java/com/ai/da/service/impl/UserLikeGroupServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/UserLikeGroupServiceImpl.java @@ -121,6 +121,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl Date: Tue, 9 Jul 2024 13:53:57 +0800 Subject: [PATCH 4/8] =?UTF-8?q?BUGFIX:=E5=96=9C=E6=AC=A2=E7=9A=84=E4=BD=9C?= =?UTF-8?q?=E5=93=81;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/ai/da/service/impl/PortfolioServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/ai/da/service/impl/PortfolioServiceImpl.java b/src/main/java/com/ai/da/service/impl/PortfolioServiceImpl.java index ee0cd4ef..a002c37d 100644 --- a/src/main/java/com/ai/da/service/impl/PortfolioServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/PortfolioServiceImpl.java @@ -428,6 +428,8 @@ public class PortfolioServiceImpl extends ServiceImpl likedPortfolioIdList = redisUtil.getLikedPortfolios(userHolder.getId()); if (!CollectionUtils.isEmpty(likedPortfolioIdList)) { qw.lambda().in(Portfolio::getId, likedPortfolioIdList); + }else { + return PageBaseResponse.success(new Page<>()); } } qw.lambda().orderByDesc(Portfolio::getUpdateDate); From 5fc50f2d969de786de42cdd8113d9b9928a82d19 Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Tue, 9 Jul 2024 14:04:12 +0800 Subject: [PATCH 5/8] =?UTF-8?q?BUGFIX:=E6=B8=B8=E5=AE=A2=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E4=B8=BB=E9=A2=98;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/ai/da/common/utils/SendEmailUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ai/da/common/utils/SendEmailUtil.java b/src/main/java/com/ai/da/common/utils/SendEmailUtil.java index 2fb431ab..bd3a438c 100644 --- a/src/main/java/com/ai/da/common/utils/SendEmailUtil.java +++ b/src/main/java/com/ai/da/common/utils/SendEmailUtil.java @@ -570,7 +570,7 @@ public class SendEmailUtil { req.setFromEmailAddress(SEND_ADDRESS); req.setDestination(new String[]{userEmail}); - String subject = "注册"; + String subject = "Tourist registration"; req.setSubject(subject); req.setTemplate(contractTemplate(PORTFOLIO_REGISTER_ID, randomVerifyCode, null)); From 95bfb00a9d84d58f58673dcc01c341bb0983baea Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Tue, 9 Jul 2024 14:55:21 +0800 Subject: [PATCH 6/8] =?UTF-8?q?BUGFIX:=E9=A2=9C=E8=89=B2=E6=B2=A1=E8=BF=94?= =?UTF-8?q?=E5=9B=9E;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../da/service/impl/CollectionElementServiceImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/ai/da/service/impl/CollectionElementServiceImpl.java b/src/main/java/com/ai/da/service/impl/CollectionElementServiceImpl.java index 49d4cd64..521b4ab0 100644 --- a/src/main/java/com/ai/da/service/impl/CollectionElementServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/CollectionElementServiceImpl.java @@ -801,12 +801,13 @@ public class CollectionElementServiceImpl extends ServiceImpl getByCollectionId(Long collectionId) { - List elementIds = tCollectionElementRelationService.getByCollectionId(collectionId); - if (CollectionUtils.isEmpty(elementIds)) { - return null; - } +// List elementIds = tCollectionElementRelationService.getByCollectionId(collectionId); +// if (CollectionUtils.isEmpty(elementIds)) { +// return null; +// } QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.in("id", elementIds); +// queryWrapper.in("id", elementIds); + queryWrapper.lambda().eq(CollectionElement::getCollectionId, collectionId); return collectionElementMapper.selectList(queryWrapper); } From c7de1779bd2313fc2ff29f164d51b54b055ae5a1 Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Tue, 9 Jul 2024 15:25:20 +0800 Subject: [PATCH 7/8] BUGFIX:t_design_item_detail_print level2type; --- src/main/java/com/ai/da/service/impl/DesignServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java b/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java index d9ec239b..8481530a 100644 --- a/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java @@ -642,6 +642,12 @@ public class DesignServiceImpl extends ServiceImpl impleme print.setScale(0.3d); print.setAngle(0.0); print.setPriority(1); + QueryWrapper getPrintboardLevel2TypeQw = new QueryWrapper<>(); + getPrintboardLevel2TypeQw.lambda().eq(CollectionElement::getUrl, print.getPath()); + getPrintboardLevel2TypeQw.lambda().orderByDesc(CollectionElement::getCreateDate); + getPrintboardLevel2TypeQw.last("limit 1"); + CollectionElement one = collectionElementService.getOne(getPrintboardLevel2TypeQw); + print.setLevel2Type(one.getLevel2Type()); print.setCreateDate(LocalDateTime.now()); designItemDetailPrintService.save(print); } From 6028ef8cdd5b176df011ac33e3d844940fb2e53e Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Tue, 9 Jul 2024 17:07:22 +0800 Subject: [PATCH 8/8] =?UTF-8?q?TASK:=E9=82=AE=E4=BB=B6=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ai/da/common/utils/SendEmailUtil.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/ai/da/common/utils/SendEmailUtil.java b/src/main/java/com/ai/da/common/utils/SendEmailUtil.java index bd3a438c..0472274d 100644 --- a/src/main/java/com/ai/da/common/utils/SendEmailUtil.java +++ b/src/main/java/com/ai/da/common/utils/SendEmailUtil.java @@ -385,20 +385,20 @@ public class SendEmailUtil { // 根据邮件类型设置不同的主题和模板 String subject = ""; Template template = new Template(); - if (type == 1) { - subject = "Upcoming System Upgrade for AiDA 3.0"; - template.setTemplateID(UPGRADE_NOTIFICATION_ID); - }else { - subject = "即将到来的AiDA 3.0系统升级"; - template.setTemplateID(UPGRADE_NOTIFICATION_ID_CHINESE); - } // if (type == 1) { -// subject = "Successful System Upgrade and New Features in AiDA 3.0"; -// template.setTemplateID(UPGRADE_SUCCESS_NOTIFICATION_ID); +// subject = "Upcoming System Upgrade for AiDA 3.0"; +// template.setTemplateID(UPGRADE_NOTIFICATION_ID); // }else { -// subject = "系统升级成功和AiDA 3.0新功能"; -// template.setTemplateID(UPGRADE_SUCCESS_NOTIFICATION_ID_CHINESE); +// subject = "即将到来的AiDA 3.0系统升级"; +// template.setTemplateID(UPGRADE_NOTIFICATION_ID_CHINESE); // } + if (type == 1) { + subject = "Successful System Upgrade and New Features in AiDA 3.0"; + template.setTemplateID(UPGRADE_SUCCESS_NOTIFICATION_ID); + }else { + subject = "系统升级成功和AiDA 3.0新功能"; + template.setTemplateID(UPGRADE_SUCCESS_NOTIFICATION_ID_CHINESE); + } template.setTemplateData(buildAccountData(account)); req.setSubject(subject);