19 Commits

Author SHA1 Message Date
9f7987306c BUGFIX:订阅计划 2025-12-18 13:38:38 +08:00
litianxiang
d3fc70fbf2 fix:edit产品图照成排序问题,恢复原逻辑 2025-12-17 16:08:49 +08:00
litianxiang
17645d17e5 关闭batch MQ监听 2025-12-17 16:02:49 +08:00
litianxiang
258eea5277 edit 产品图失败会导致sort不对试验5 2025-12-17 15:43:26 +08:00
litianxiang
bb1d3bd359 Revert "edit 产品图失败会导致sort不对试验5"
This reverts commit 6a8c87ed95.
2025-12-17 15:41:02 +08:00
litianxiang
6a8c87ed95 edit 产品图失败会导致sort不对试验5 2025-12-17 15:40:47 +08:00
litianxiang
eb3826927d edit 产品图失败会导致sort不对试验4 2025-12-17 15:33:14 +08:00
litianxiang
7720c8c771 edit 产品图失败会导致sort不对试验3 2025-12-17 14:12:20 +08:00
litianxiang
b459148d58 edit 产品图失败会导致sort不对试验2 2025-12-17 13:49:07 +08:00
litianxiang
eadda18d1e Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev/3.1_release_merge 2025-12-17 13:28:12 +08:00
litianxiang
d403df51ec edit 产品图失败会导致sort不对试验 2025-12-17 13:28:04 +08:00
6903b98b60 Merge remote-tracking branch 'origin/dev/3.1_release_merge' into dev/3.1_release_merge 2025-12-17 13:20:34 +08:00
81bf65515c Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2025-12-17 13:19:54 +08:00
litianxiang
afc6041570 临时测试修改 2025-12-17 13:10:09 +08:00
bce368248c Merge branch 'dev/dev_xp' into dev/3.1_release_merge 2025-12-16 16:26:27 +08:00
litianxiang
9a206f9979 生产环境配置callbackUrl 2025-12-16 14:10:22 +08:00
litianxiang
eb7a46c7e8 fix:callbackUrl 2025-12-16 13:45:21 +08:00
litianxiang
95ef68a784 Merge remote-tracking branch 'origin/dev-ltx' into dev/3.1_release_merge 2025-12-16 13:20:31 +08:00
litianxiang
6429288fd9 dev环境加入design回调配置 2025-12-16 13:16:36 +08:00
7 changed files with 61 additions and 25 deletions

View File

@@ -636,26 +636,26 @@ public class GenerateConsumer {
public void getPoseTransformationResult(Message msg, Channel channel) { public void getPoseTransformationResult(Message msg, Channel channel) {
processPoseTransformResult(msg, channel); processPoseTransformResult(msg, channel);
} }
@RabbitListener(queues = "#{rabbitMQProperties.queues.designBatch}") // @RabbitListener(queues = "#{rabbitMQProperties.queues.designBatch}")
@RabbitHandler // @RabbitHandler
public void getDesignBatchResult(Message msg, Channel channel) { // public void getDesignBatchResult(Message msg, Channel channel) {
processDesignBatchResult(msg, channel); // processDesignBatchResult(msg, channel);
} // }
@RabbitListener(queues = "#{rabbitMQProperties.queues.toProductImageBatch}") // @RabbitListener(queues = "#{rabbitMQProperties.queues.toProductImageBatch}")
@RabbitHandler // @RabbitHandler
public void getToProductImageBatchResult(Message msg, Channel channel) { // public void getToProductImageBatchResult(Message msg, Channel channel) {
processToProductImageBatchResult(msg, channel); // processToProductImageBatchResult(msg, channel);
} // }
//
@RabbitListener(queues = "#{rabbitMQProperties.queues.relightBatch}") // @RabbitListener(queues = "#{rabbitMQProperties.queues.relightBatch}")
@RabbitHandler // @RabbitHandler
public void getRelightBatchResult(Message msg, Channel channel) { // public void getRelightBatchResult(Message msg, Channel channel) {
processRelightBatchResult(msg, channel); // processRelightBatchResult(msg, channel);
} // }
//
@RabbitListener(queues = "#{rabbitMQProperties.queues.poseTransformBatch}") // @RabbitListener(queues = "#{rabbitMQProperties.queues.poseTransformBatch}")
@RabbitHandler // @RabbitHandler
public void getPoseTransformBatchResult(Message msg, Channel channel) { // public void getPoseTransformBatchResult(Message msg, Channel channel) {
processPoseTransformBatchResult(msg, channel); // processPoseTransformBatchResult(msg, channel);
} // }
} }

View File

@@ -71,6 +71,9 @@ public class PythonService {
@Value("${access.python.generate_sr_port}") @Value("${access.python.generate_sr_port}")
private String srServicePort; private String srServicePort;
@Value("${design.callback.url}")
private String callbackUrl;
@Resource @Resource
private PythonTAllInfoService pythonTAllInfoService; private PythonTAllInfoService pythonTAllInfoService;
@@ -231,6 +234,7 @@ public class PythonService {
List<DesignPythonObject> objects = new ArrayList<>(); List<DesignPythonObject> objects = new ArrayList<>();
designPythonObjects.setObjects(objects); designPythonObjects.setObjects(objects);
designPythonObjects.setProcess_id(processId); designPythonObjects.setProcess_id(processId);
designPythonObjects.setCallback_url(callbackUrl);
long pinPrintNum = calculateDesignPinPrintNum(elementVO.getPrintBoardElements()); long pinPrintNum = calculateDesignPinPrintNum(elementVO.getPrintBoardElements());
long noPinPrintNum = calculateDesignNoPinPrintNum(elementVO.getPrintBoardElements(), elementVO.getDesignNum()); long noPinPrintNum = calculateDesignNoPinPrintNum(elementVO.getPrintBoardElements(), elementVO.getDesignNum());

View File

@@ -18,4 +18,6 @@ public class DesignPythonObjects {
List<Library> addLibrary; List<Library> addLibrary;
private String requestId; private String requestId;
private String callback_url;
} }

View File

@@ -74,6 +74,10 @@ public class SubscriptionPlanServiceImpl extends ServiceImpl<SubscriptionPlanMap
} }
baseMapper.insert(subscriptionPlan); baseMapper.insert(subscriptionPlan);
if (subscriptionPlanDTO.getStatus().equals(SubscriptionPlan.SubscriptionStatus.ACTIVE.name())) {
// 执行一次激活扫描器
activeSubscriptionPlan();
}
} }
private void validateCreatePlanParams(SubscriptionPlanDTO subscriptionPlanDTO) { private void validateCreatePlanParams(SubscriptionPlanDTO subscriptionPlanDTO) {
@@ -487,7 +491,7 @@ public class SubscriptionPlanServiceImpl extends ServiceImpl<SubscriptionPlanMap
*/ */
private void updateAccount(Account account, SubscriptionPlan plan, boolean isAdmin) { private void updateAccount(Account account, SubscriptionPlan plan, boolean isAdmin) {
// 如果是管理员的切换,先再次记录一下已使用的积分 // 如果是管理员的切换,先再次记录一下已使用的积分
if (isAdmin) { if (isAdmin && Objects.nonNull(account.getSubscriptionPlanId())) {
SubscriptionPlan currentPlan = baseMapper.selectById(account.getSubscriptionPlanId()); SubscriptionPlan currentPlan = baseMapper.selectById(account.getSubscriptionPlanId());
if (currentPlan.getCreditUsage().compareTo(account.getCreditsUsage()) < 0) { if (currentPlan.getCreditUsage().compareTo(account.getCreditsUsage()) < 0) {
updateSubscriptionPlanUsage(currentPlan, account.getCreditsUsage()); updateSubscriptionPlanUsage(currentPlan, account.getCreditsUsage());

View File

@@ -1461,10 +1461,12 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
if (StringUtil.isNullOrEmpty(fluxResult)) { if (StringUtil.isNullOrEmpty(fluxResult)) {
toProductImageResult.setStatus("Fail"); toProductImageResult.setStatus("Fail");
toProductImageResultMapper.updateById(toProductImageResult); toProductImageResultMapper.updateById(toProductImageResult);
sortRank(toProductImageResult);
results.add(new MagicToolResultVO(taskId, "Fail")); results.add(new MagicToolResultVO(taskId, "Fail"));
} else if (fluxResult.equals("Fail") || fluxResult.equals("Pending")) { } else if (fluxResult.equals("Fail") || fluxResult.equals("Pending")) {
toProductImageResult.setStatus(fluxResult); toProductImageResult.setStatus(fluxResult);
toProductImageResultMapper.updateById(toProductImageResult); toProductImageResultMapper.updateById(toProductImageResult);
sortRank(toProductImageResult);
results.add(new MagicToolResultVO(taskId, fluxResult)); results.add(new MagicToolResultVO(taskId, fluxResult));
} else { } else {
results.add(processFluxResult(fluxResult, toProductImageResult, taskId, toProductImageRecord.getPrompt())); results.add(processFluxResult(fluxResult, toProductImageResult, taskId, toProductImageRecord.getPrompt()));
@@ -1515,6 +1517,28 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
return results; return results;
} }
/*
重排Relight失败sort
*/
private void sortRank(ToProductImageResult toProductImageResult) {
LambdaQueryWrapper<CollectionSort> collectionSortLambdaQueryWrapper = new LambdaQueryWrapper<>();
collectionSortLambdaQueryWrapper.eq(CollectionSort::getRelationId, toProductImageResult.getId()).orderByDesc(CollectionSort::getCreateTime).last("LIMIT 1");
List<CollectionSort> collectionSorts = collectionSortMapper.selectList(collectionSortLambdaQueryWrapper);
if (!collectionSorts.isEmpty()) {
collectionSortMapper.deleteById(collectionSorts.get(0));
List<CollectionSort> collectionSorts1 = collectionSortMapper.selectList(new LambdaQueryWrapper<CollectionSort>().eq(CollectionSort::getParentId, collectionSorts.get(0).getParentId()).gt(CollectionSort::getSort, collectionSorts.get(0).getSort()));
if (!collectionSorts1.isEmpty()) {
for (CollectionSort collectionSort : collectionSorts1) {
collectionSort.setSort(collectionSort.getSort() - 1);
collectionSortMapper.updateById(collectionSort);
}
}
}
}
public static String convert(InputStream inputStream) { public static String convert(InputStream inputStream) {
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return reader.lines().collect(Collectors.joining("\n")); return reader.lines().collect(Collectors.joining("\n"));

View File

@@ -158,3 +158,4 @@ google.client.id=157095842121-kdd1fdf8m8nudvj9sprstb2k2prnf9e4.apps.googleuserco
#google.client.secret=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 #google.client.secret=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
google.client.secret=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 google.client.secret=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
google.redirect.uri=https://develop.api.aida.com.hk/api/third/party/auth/google_callback google.redirect.uri=https://develop.api.aida.com.hk/api/third/party/auth/google_callback
design.callback.url=https://develop.api.aida.com.hk/api/third/party/receiveDesignResults

View File

@@ -156,3 +156,4 @@ FREEPIK_API_KEY=FPSX94e5917d376a4facb87dabbaa0319c72
google.client.id=29310152396-nnsd3h533fld665oguu8ovrt1nukmt46.apps.googleusercontent.com google.client.id=29310152396-nnsd3h533fld665oguu8ovrt1nukmt46.apps.googleusercontent.com
google.client.secret=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 google.client.secret=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
google.redirect.uri=https://www.api.aida.com.hk/api/third/party/auth/google_callback google.redirect.uri=https://www.api.aida.com.hk/api/third/party/auth/google_callback
design.callback.url=https://api.aida.com.hk/api/third/party/receiveDesignResults