Merge branch 'dev/dev' into dev/dev_xp

# Conflicts:
#	src/main/java/com/ai/da/service/GenerateService.java
This commit is contained in:
2024-06-25 16:59:41 +08:00
13 changed files with 339 additions and 90 deletions

View File

@@ -46,6 +46,8 @@ public class GenerateConsumer {
private String generateResultKey;
@Value("${redis.key.toProductImageResultKey}")
private String toProductImageResultKey;
@Value("${redis.key.relightResultKey}")
private String relightResultKey;
public void generate(Message msg, Channel channel, String consumerName) {
log.info("============start listening==========");
@@ -204,73 +206,125 @@ public class GenerateConsumer {
long end = System.currentTimeMillis();
log.info("tasks_id : {}, end , message : {}, 执行时长: {} 毫秒", generateResult.get("tasks_id"), generateResult.get("message"), (end - start));
log.info("============ProcessGenerateResult End listening==========");
log.info("============ProcessToProductImageResult End listening==========");
}
@RabbitListener(queues = MQConfig.GENERATE_QUEUE)
private void processRelightResult(Message msg, Channel channel) {
log.info("============processRelightResult listening==========");
long start = System.currentTimeMillis();
Map<String, String> generateResult = JSONObject.parseObject(msg.getBody(), Map.class);
log.info("toProductImage response : {}", generateResult);
try {
log.info("tasks_id : {} start ", generateResult.get("tasks_id"));
if (generateResult.get("status").equals("SUCCESS")) {
String url = generateResult.get("image_url");
String taskId = generateResult.get("tasks_id");
String category = generateResult.get("category");
generateService.processRelightResult(taskId, url, category);
} else {
// 修改redis中的数据状态为exception
String key = relightResultKey + ":" + generateResult.get("tasks_id");
redisUtil.addToString(key, new Gson().toJson(new GenerateResultVO(generateResult.get("tasks_id"), null, null, "Fail")), CommonConstant.GENERATE_RESULT_EXPIRE_TIME);
// 将异常信息存到exception中
HashMap<String, String> exceptionInfo = new HashMap<>();
exceptionInfo.put(generateResult.get("tasks_id"), generateResult.get("data"));
// 存redis
redisUtil.addToMap(exceptionMapKey, exceptionInfo);
}
} catch (Exception e) {
log.error(e.getMessage());
try {
channel.basicAck(msg.getMessageProperties().getDeliveryTag(), false);
// 将消息从redis排队队列中删除,需保证被消费的消息存储到db之后再从redis删除
redisUtil.removeFromZSet(consumptionOrderKey, generateResult.get("tasks_id"));
} catch (IOException exception) {
log.error("手动确认,取消返回队列,不再重新消费");
}
// 将入参和错误信息存入数据库
String exceptionMessage = JSONObject.toJSONString(generateResult) +
" Exception message " + e.getMessage();
HashMap<String, String> exceptionInfo = new HashMap<>();
exceptionInfo.put(String.valueOf(generateResult.get("tasks_id")), exceptionMessage);
// 存redis
redisUtil.addToMap(exceptionMapKey, exceptionInfo);
}
long end = System.currentTimeMillis();
log.info("tasks_id : {}, end , message : {}, 执行时长: {} 毫秒", generateResult.get("tasks_id"), generateResult.get("message"), (end - start));
log.info("============ProcessRelightResult End listening==========");
}
// @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.TO_PRODUCT_IMAGE_RESULT_QUEUE)
// @RabbitHandler
// public void getToProductImageResult(Message msg, Channel channel) {
// processToProductImageResult(msg, channel);
// }
@RabbitListener(queues = MQConfig.RELIGHT_RESULT_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.TO_PRODUCT_IMAGE_RESULT_QUEUE)
@RabbitHandler
public void getToProductImageResult(Message msg, Channel channel) {
processToProductImageResult(msg, channel);
public void getRelightResult(Message msg, Channel channel) {
processRelightResult(msg, channel);
}
}

View File

@@ -27,6 +27,8 @@ public class MQConfig {
public static final String GENERATE_RESULT_QUEUE = "GenerateImage-dev";
public static final String TO_PRODUCT_IMAGE_RESULT_QUEUE = "ToProductImage-local";
public static final String RELIGHT_RESULT_QUEUE = "Relight-local";
public MQConfig() {
}

View File

@@ -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");
// }
}

View File

@@ -196,9 +196,9 @@ public class SavedCollectionController {
@ApiOperation(value = "获取生成结果")
@PostMapping("/toProductImageResult")
public Response<List<GenerateResultVO>> getToProductImageResult(@Valid @RequestBody List<String> taskIdList) {
List<GenerateResultVO> generateResult = userLikeGroupService.getToProductImageResultList(taskIdList);
return Response.success(generateResult);
public Response<List<MagicToolResultVO>> getToProductImageResult(@Valid @RequestBody List<String> taskIdList) {
List<MagicToolResultVO> magicToolResultVOList = userLikeGroupService.getToProductImageResultList(taskIdList);
return Response.success(magicToolResultVOList);
}
@ApiOperation(value = "画布用户上传元素")
@@ -212,4 +212,17 @@ public class SavedCollectionController {
public Response<List<ToProductImageResult>> productImageLikeList(@Valid @RequestBody ToProductImageDTO toProductImageDTO) {
return Response.success(userLikeGroupService.productImageLikeList(toProductImageDTO));
}
@ApiOperation(value = "relight")
@PostMapping("/relight")
public Response<List<ToProductImageResult>> relight(@Valid @RequestBody ToProductImageDTO toProductImageDTO) {
return Response.success(userLikeGroupService.relight(toProductImageDTO));
}
@ApiOperation(value = "获取relight结果")
@PostMapping("/relightResult")
public Response<List<MagicToolResultVO>> getRelightResult(@Valid @RequestBody List<String> taskIdList) {
List<MagicToolResultVO> magicToolResultVOList = userLikeGroupService.getRelightResult(taskIdList);
return Response.success(magicToolResultVOList);
}
}

View File

@@ -39,4 +39,7 @@ public class ToProductImageResult implements Serializable {
@ApiModelProperty(value = "userLikeGroupId")
private Long userLikeGroupId;
@ApiModelProperty(value = "generate 结果类型")
private String resultType;
}

View File

@@ -0,0 +1,25 @@
package com.ai.da.model.vo;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@ApiModel("generate result 响应")
@AllArgsConstructor
@NoArgsConstructor
public class MagicToolResultVO {
private String taskId;
private Long id;
private String url;
private String status;
private String category;
private String sourceUrl;
}

View File

@@ -24,7 +24,7 @@ public class WorkspaceVO extends Workspace {
private static final long serialVersionUID = 1L;
private Long currentId;
private Long styleId;
private PageBaseResponse<WorkspaceVO> page;

View File

@@ -36,4 +36,6 @@ public interface GenerateService extends IService<Generate> {
Long getRankPosition(String uniqueId);
void cancelGenerate(Long userId, List<String> uniqueId, String timeZone, String type);
void processRelightResult(String taskId, String url, String category);
}

View File

@@ -47,7 +47,7 @@ public interface UserLikeGroupService extends IService<UserLikeGroup> {
Boolean productImageLike(ProductImageLikeDTO productImageLikeDTO);
List<GenerateResultVO> getToProductImageResultList(List<String> taskIdList);
List<MagicToolResultVO> getToProductImageResultList(List<String> taskIdList);
JSONObject exportSearch(Long userLikeGroupId);
@@ -56,4 +56,8 @@ public interface UserLikeGroupService extends IService<UserLikeGroup> {
List<ToProductImageResult> productImageLikeList(ToProductImageDTO toProductImageDTO);
Boolean productImageUnLike(ProductImageLikeDTO productImageLikeDTO);
List<ToProductImageResult> relight(ToProductImageDTO toProductImageDTO);
List<MagicToolResultVO> getRelightResult(List<String> taskIdList);
}

View File

@@ -77,6 +77,9 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
@Value("${minio.bucketName.slogan}")
private String sloganBucket;
@Value("${redis.key.relightResultKey}")
private String relightResultKey;
@Value("${redis.key.toProductImageResultKey}")
private String toProductImageResultKey;
@@ -255,6 +258,7 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
}
ToProductImageResult toProductImageResult = toProductImageResults.get(0);
toProductImageResult.setUrl(url);
toProductImageResult.setResultType("ToProductImage");
toProductImageResultMapper.updateById(toProductImageResult);
String key = toProductImageResultKey + ":" + taskId;
@@ -705,6 +709,27 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
}
@Override
public void processRelightResult(String taskId, String url, String category) {
QueryWrapper<ToProductImageResult> qw = new QueryWrapper<>();
qw.lambda().eq(ToProductImageResult::getTaskId, taskId);
List<ToProductImageResult> toProductImageResults = toProductImageResultMapper.selectList(qw);
if (CollectionUtils.isEmpty(toProductImageResults)) {
return;
// throw new BusinessException("");
}
ToProductImageResult toProductImageResult = toProductImageResults.get(0);
toProductImageResult.setUrl(url);
toProductImageResult.setResultType("Relight");
toProductImageResultMapper.updateById(toProductImageResult);
String key = relightResultKey + ":" + taskId;
String imageName = url.substring(url.lastIndexOf("/") + 1);
String status = imageName.equals("white_image.jpg") ? "Invalid" : "Success";
GenerateResultVO generateResultVO = new GenerateResultVO(taskId, toProductImageResult.getId(), url, status, category);
redisUtil.addToString(key, new Gson().toJson(generateResultVO), CommonConstant.GENERATE_RESULT_EXPIRE_TIME);
}
// 判断试用用户试用generate机会是否使用完毕 每个board 3次机会
private int getTrialsCount(Long userId, String level1Type) {
List<Generate> getGenerateList = getGenerateByAccountId(userId, level1Type);

View File

@@ -321,25 +321,40 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
private RedisUtil redisUtil;
@Value("${redis.key.toProductImageResultKey}")
private String toProductImageResultKey;
@Value("${redis.key.relightResultKey}")
private String relightResultKey;
@Override
public List<GenerateResultVO> getToProductImageResultList(List<String> taskIdList) {
List<GenerateResultVO> results = new ArrayList<>();
public List<MagicToolResultVO> getToProductImageResultList(List<String> taskIdList) {
List<MagicToolResultVO> results = new ArrayList<>();
Set<String> collect = new HashSet<>();
taskIdList.forEach(taskId -> {
String key = toProductImageResultKey + ":" + taskId;
GenerateResultVO generateResultVO = new Gson().fromJson(redisUtil.getFromString(key), GenerateResultVO.class);
if (!Objects.isNull(generateResultVO) && !StringUtil.isNullOrEmpty(generateResultVO.getUrl())) {
String url = generateResultVO.getUrl();
MagicToolResultVO magicToolResultVO = new Gson().fromJson(redisUtil.getFromString(key), MagicToolResultVO.class);
if (!Objects.isNull(magicToolResultVO) && !StringUtil.isNullOrEmpty(magicToolResultVO.getUrl())) {
String url = magicToolResultVO.getUrl();
if (url.substring(url.lastIndexOf("/") + 1).equals("white_image.jpg")) {
generateResultVO.setStatus("Invalid");
magicToolResultVO.setStatus("Invalid");
} else {
generateResultVO.setUrl(minioUtil.getPresignedUrl(url, CommonConstant.MINIO_IMAGE_EXPIRE_TIME));
magicToolResultVO.setUrl(minioUtil.getPresignedUrl(url, CommonConstant.MINIO_IMAGE_EXPIRE_TIME));
QueryWrapper<ToProductImageResult> qw = new QueryWrapper<>();
qw.lambda().eq(ToProductImageResult::getTaskId, taskId);
ToProductImageResult toProductImageResult = toProductImageResultMapper.selectOne(qw);
if (Objects.isNull(toProductImageResult)) {
throw new BusinessException("The source image does not exist.");
}
} else if (Objects.isNull(generateResultVO)) {
generateResultVO = new GenerateResultVO();
if (toProductImageResult.getElementType().equals("ProductElement")) {
ToProductElement toProductElement = toProductElementMapper.selectById(toProductImageResult.getElementId());
magicToolResultVO.setSourceUrl(minioUtil.getPresignedUrl(toProductElement.getUrl(), 24 * 60));
}else {
UserLike userLike = userLikeMapper.selectById(toProductImageResult.getElementId());
magicToolResultVO.setSourceUrl(minioUtil.getPresignedUrl(userLike.getUrl(), 24 * 60));
}
if (!StringUtil.isNullOrEmpty(generateResultVO.getStatus())) collect.add(generateResultVO.getStatus());
results.add(generateResultVO);
}
} else if (Objects.isNull(magicToolResultVO)) {
magicToolResultVO = new MagicToolResultVO();
}
if (!StringUtil.isNullOrEmpty(magicToolResultVO.getStatus())) collect.add(magicToolResultVO.getStatus());
results.add(magicToolResultVO);
});
return results;
}
@@ -408,6 +423,102 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
return Boolean.TRUE;
}
@Override
@Transactional(rollbackFor = Exception.class)
public List<ToProductImageResult> relight(ToProductImageDTO toProductImageDTO) {
AuthPrincipalVo userHolder = UserContext.getUserHolder();
Long userLikeGroupId = toProductImageDTO.getUserLikeGroupId();
ToProductImageRecord toProductImageRecord = new ToProductImageRecord();
toProductImageRecord.setUserLikeGroupId(userLikeGroupId);
toProductImageRecord.setCreateTime(LocalDateTime.now());
if (!StringUtils.isEmpty(toProductImageDTO.getPrompt())) {
toProductImageRecord.setPrompt(toProductImageDTO.getPrompt());
}
toProductImageRecordMapper.insert(toProductImageRecord);
List<ToProductImageResult> result = new ArrayList<>();
int i = 0;
// 翻译
String prompt = toProductImageDTO.getPrompt();
String s = pythonService.promptTranslate(prompt);
for (ToProductImageVO toProductImageVO : toProductImageDTO.getToProductImageVOList()) {
if (toProductImageVO.getElementType().equals("ProductImage")) {
String taskId = UUID.randomUUID() + "-" + i + "-" + userHolder.getId();
i ++;
ToProductImageResult toProductImageResult1 = toProductImageResultMapper.selectById(toProductImageVO.getElementId());
// 走模型
pythonService.toProductImage(toProductImageResult1.getUrl(), taskId, s);
ToProductImageResult toProductImageResult = new ToProductImageResult();
toProductImageResult.setElementId(toProductImageResult1.getId());
toProductImageResult.setElementType("ProductImage");
toProductImageResult.setCreateTime(LocalDateTime.now());
toProductImageResult.setToProductImageRecordId(toProductImageRecord.getId());
// toProductImageResult.setUrl(productImageUrl);
toProductImageResult.setIsLike(0);
toProductImageResult.setTaskId(taskId);
toProductImageResult.setUserLikeGroupId(userLikeGroupId);
toProductImageResultMapper.insert(toProductImageResult);
// toProductImageResult.setUrl(minioUtil.getPresignedUrl(toProductImageResult.getUrl(), 24 * 60));
result.add(toProductImageResult);
}else {
String taskId = UUID.randomUUID() + "-" + i + "-" + userHolder.getId();
ToProductElement toProductElement = toProductElementMapper.selectById(toProductImageVO.getElementId());
// 走模型
pythonService.toProductImage(toProductElement.getUrl(), taskId, s);
ToProductImageResult toProductImageResult = new ToProductImageResult();
toProductImageResult.setElementId(toProductElement.getId());
toProductImageResult.setElementType("ProductElement");
toProductImageResult.setCreateTime(LocalDateTime.now());
toProductImageResult.setToProductImageRecordId(toProductImageRecord.getId());
// toProductImageResult.setUrl(productImageUrl);
toProductImageResult.setIsLike(0);
toProductImageResult.setTaskId(taskId);
toProductImageResultMapper.insert(toProductImageResult);
// toProductImageResult.setUrl(minioUtil.getPresignedUrl(toProductImageResult.getUrl(), 24 * 60));
result.add(toProductImageResult);
}
}
return result;
}
@Override
public List<MagicToolResultVO> getRelightResult(List<String> taskIdList) {
List<MagicToolResultVO> results = new ArrayList<>();
Set<String> collect = new HashSet<>();
taskIdList.forEach(taskId -> {
String key = toProductImageResultKey + ":" + taskId;
MagicToolResultVO magicToolResultVO = new Gson().fromJson(redisUtil.getFromString(key), MagicToolResultVO.class);
if (!Objects.isNull(magicToolResultVO) && !StringUtil.isNullOrEmpty(magicToolResultVO.getUrl())) {
String url = magicToolResultVO.getUrl();
if (url.substring(url.lastIndexOf("/") + 1).equals("white_image.jpg")) {
magicToolResultVO.setStatus("Invalid");
} else {
magicToolResultVO.setUrl(minioUtil.getPresignedUrl(url, CommonConstant.MINIO_IMAGE_EXPIRE_TIME));
QueryWrapper<ToProductImageResult> qw = new QueryWrapper<>();
qw.lambda().eq(ToProductImageResult::getTaskId, taskId);
ToProductImageResult toProductImageResult = toProductImageResultMapper.selectOne(qw);
if (Objects.isNull(toProductImageResult)) {
throw new BusinessException("The source image does not exist.");
}
if (toProductImageResult.getElementType().equals("ProductElement")) {
ToProductElement toProductElement = toProductElementMapper.selectById(toProductImageResult.getElementId());
magicToolResultVO.setSourceUrl(minioUtil.getPresignedUrl(toProductElement.getUrl(), 24 * 60));
}else {
ToProductImageResult toProductImageResult1 = toProductImageResultMapper.selectById(toProductImageResult.getElementId());
magicToolResultVO.setSourceUrl(minioUtil.getPresignedUrl(toProductImageResult1.getUrl(), 24 * 60));
}
}
} else if (Objects.isNull(magicToolResultVO)) {
magicToolResultVO = new MagicToolResultVO();
}
if (!StringUtil.isNullOrEmpty(magicToolResultVO.getStatus())) collect.add(magicToolResultVO.getStatus());
results.add(magicToolResultVO);
});
return results;
}
public static String convert(InputStream inputStream) {
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return reader.lines().collect(Collectors.joining("\n"));

View File

@@ -141,6 +141,14 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
workspaceRelStyleMapper.updateById(workspaceRelStyle);
}
}
}else {
QueryWrapper<WorkspaceRelStyle> qw = new QueryWrapper<>();
qw.lambda().eq(WorkspaceRelStyle::getWorkspaceId, workspace.getId());
List<WorkspaceRelStyle> workspaceRelStyles = workspaceRelStyleMapper.selectList(qw);
if (!CollectionUtils.isEmpty(workspaceRelStyles)) {
WorkspaceRelStyle workspaceRelStyle = workspaceRelStyles.get(0);
workspaceRelStyleMapper.deleteById(workspaceRelStyle);
}
}
return true;
}
@@ -308,6 +316,7 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
List<WorkspaceRelStyle> workspaceRelStyles = workspaceRelStyleMapper.selectList(qw);
if (!CollectionUtils.isEmpty(workspaceRelStyles)) {
Long styleId = workspaceRelStyles.get(0).getStyleId();
vo.setStyleId(styleId);
Style style = styleMapper.selectById(styleId);
StyleEnum styleEnum = StyleEnum.fromName(style.getName());
vo.setStyle(styleEnum.name());

View File

@@ -88,6 +88,7 @@ redis.key.taskList=TaskList
redis.key.credits.pre-deduction=Credits:PreDeduction
redis.key.generateResult=Generate:Result
redis.key.toProductImageResultKey=ToProductImage:Result
redis.key.relightResultKey=Relight:Result
aws.s3.accessKeyId=AKIAVD3OJIMF6UJFLSHZ
aws.s3.secretKey=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