Merge branch 'dev/dev_xp' into dev/dev

This commit is contained in:
2025-06-19 17:20:04 +08:00
6 changed files with 54 additions and 6 deletions

View File

@@ -371,4 +371,13 @@ public class AccountController {
public Response<Boolean> subAccountImport(@RequestParam("file") MultipartFile file) {
return Response.success(accountService.subAccountImport(file));
}
@GetMapping("/send618Email")
@ApiOperation(value = "618邮件发送")
public Response<String> send618PromotionEmailTemp() {
accountService.send618PromotionEmailTemp();
return Response.success("success");
}
}

View File

@@ -233,4 +233,6 @@ public interface AccountService extends IService<Account> {
Boolean subAccountImport(MultipartFile file);
Set<String> organizationNameSearch(String type, String name);
void send618PromotionEmailTemp();
}

View File

@@ -3031,4 +3031,32 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
return new HashSet<>();
}
@Override
public void send618PromotionEmailTemp() {
QueryWrapper<TrialOrder> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("is_deleted", 0);
List<TrialOrder> trialOrders = trialOrderMapper.selectList(queryWrapper);
// List<Account> accountList = accountMapper.selectList(queryWrapper);
System.out.println(trialOrders);
int total = trialOrders.size();
log.info("试用用户总量:{}", total);
int current = 1;
for (TrialOrder trialOrder : trialOrders) {
log.info("邮件发送进度 {}/{}", current, total);
try {
if (!StringUtil.isNullOrEmpty(trialOrder.getCountry()) && trialOrder.getCountry().equals("China")) {
SendEmailUtil.send618PromotionEmailTemp(trialOrder.getEmail(), "CHINESE_SIMPLIFIED");
} else {
// 英文
SendEmailUtil.send618PromotionEmailTemp(trialOrder.getEmail(), "ENGLISH");
}
}catch (Exception e) {
log.info(e.getMessage());
}
current ++;
}
}
}

View File

@@ -367,7 +367,7 @@ public class LLMServiceImpl implements LLMService {
systemImage.setAccountId(accountId);
chatMessageMapper.insert(systemImage);
} else if (Objects.nonNull(toolsName) && toolsName.equals("search_sketch_img")) {
json.put("content", processSearchSketchToolCon(toolsData));
json.put("content", processSearchSketchToolCon(projectId, toolsData));
} else if (Objects.nonNull(toolsName)
&& toolsName.equals("update_project_info")) {
updateProjectParams(projectId, toolsData);
@@ -395,7 +395,7 @@ public class LLMServiceImpl implements LLMService {
return emitter;
}
private String processSearchSketchToolCon(JSONObject content){
private String processSearchSketchToolCon(Long projectId, JSONObject content){
// content内容 "{\"sketch_list\": [\"\\\\female\\\\blouse\\\\blouse_645.jpg\", \"\\\\female\\\\dress\\\\0902004968.jpg\"]}"
JSONArray sketchList = content.getJSONArray("sketch_list");
if (sketchList.isEmpty()){
@@ -404,12 +404,16 @@ public class LLMServiceImpl implements LLMService {
ArrayList<ReceiveCollectionElement> dataList = new ArrayList<>();
sketchList.forEach(sketch -> {
ReceiveCollectionElement receiveCollectionElement = new ReceiveCollectionElement();
receiveCollectionElement.setUrl((String) sketch);
receiveCollectionElement.setMinioUrl(minioUtil.getPreSignedUrl(sysImage + "/images" + sketch, CommonConstant.MINIO_IMAGE_EXPIRE_TIME));
String path = sketch.toString().replace("\\", "/");
receiveCollectionElement.setUrl(path);
receiveCollectionElement.setLevel1Type(CollectionLevel1TypeEnum.SKETCH_BOARD.getRealName());
receiveCollectionElement.setMinioUrl(minioUtil.getPreSignedUrl(sysImage + "/images" + path, CommonConstant.MINIO_IMAGE_EXPIRE_TIME));
dataList.add(receiveCollectionElement);
});
ReceiveDesignParam receiveDesignParam = new ReceiveDesignParam();
receiveDesignParam.setReceiveCollectionElementList(dataList);
receiveDesignParam.setProjectId(projectId);
designService.receiveDesignParams(receiveDesignParam);
return JSONArray.toJSONString(receiveDesignParam);
}

View File

@@ -422,6 +422,11 @@ public class LibraryServiceImpl extends ServiceImpl<LibraryMapper, Library> impl
throw new BusinessException("processMannequins.interface.exception");
}
/**
* 去sketch白边
* @param filePath
* @param category
*/
@Override
public void processSketchBoards(String filePath, String category) {
Long imageId = pythonTAllInfoService.getImageIdByPath(filePath);

View File

@@ -668,7 +668,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
String fluxResult = generateService.getFluxResult(taskId, objectName);
if (StringUtil.isNullOrEmpty(fluxResult)){
results.add(new MagicToolResultVO());
} else if (fluxResult.equals("Failed") || fluxResult.equals("Pending")) {
} else if (fluxResult.equals("Fail") || fluxResult.equals("Pending")) {
results.add(new MagicToolResultVO(fluxResult));
} else {
results.add(processFluxResult(fluxResult, toProductImageResult, taskId));
@@ -1073,7 +1073,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
if (StringUtil.isNullOrEmpty(fluxResult)){
results.add(new MagicToolResultVO());
} else if (fluxResult.equals("Failed") || fluxResult.equals("Pending")) {
} else if (fluxResult.equals("Fail") || fluxResult.equals("Pending")) {
results.add(new MagicToolResultVO(fluxResult));
} else {
results.add(processFluxResult(fluxResult, toProductImageResult, taskId));