Merge remote-tracking branch 'origin/dev/dev' into dev/dev
This commit is contained in:
@@ -63,7 +63,9 @@ public enum PoseEnum {
|
||||
}
|
||||
|
||||
public static List<Map<String, String>> getPropertyList() {
|
||||
return new ArrayList<>(PROPERTY_LIST); // 返回副本以保证不可变性
|
||||
return PROPERTY_LIST.stream()
|
||||
.map(HashMap::new) // 深拷贝每个 Map
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static List<String> getVideoList() {
|
||||
|
||||
@@ -377,7 +377,8 @@ public class MinioUtil {
|
||||
try {
|
||||
|
||||
String lowerName = fileName.toLowerCase();
|
||||
boolean isImage = lowerName.endsWith(".jpg") || lowerName.endsWith(".jpeg") || lowerName.endsWith(".png");
|
||||
boolean isImage = lowerName.endsWith(".jpg") || lowerName.endsWith(".jpeg")
|
||||
|| lowerName.endsWith(".png") || lowerName.endsWith(".gif");
|
||||
|
||||
GetPresignedObjectUrlArgs.Builder builder = GetPresignedObjectUrlArgs.builder()
|
||||
.bucket(bucketName)
|
||||
@@ -390,6 +391,8 @@ public class MinioUtil {
|
||||
String contentType = "image/jpeg";
|
||||
if (lowerName.endsWith(".png")) {
|
||||
contentType = "image/png";
|
||||
} else if (lowerName.endsWith(".gif")) { // 新增 GIF
|
||||
contentType = "image/gif";
|
||||
}
|
||||
|
||||
Map<String, String> queryParams = new HashMap<>();
|
||||
@@ -400,8 +403,10 @@ public class MinioUtil {
|
||||
}
|
||||
|
||||
return minioClient.getPresignedObjectUrl(builder.build());
|
||||
} catch (MinioException | InvalidKeyException | IOException | NoSuchAlgorithmException e) {
|
||||
} catch (MinioException | InvalidKeyException
|
||||
| IOException | NoSuchAlgorithmException | IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
log.error("bucket: {}, object:{}", bucketName, fileName);
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -233,4 +233,6 @@ public interface AccountService extends IService<Account> {
|
||||
Boolean subAccountImport(MultipartFile file);
|
||||
|
||||
Set<String> organizationNameSearch(String type, String name);
|
||||
|
||||
/*void send618PromotionEmailTemp();*/
|
||||
}
|
||||
|
||||
@@ -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 ++;
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
@@ -234,8 +234,8 @@ public class LLMServiceImpl implements LLMService {
|
||||
|
||||
executor.submit(() -> {
|
||||
try {
|
||||
// boolean validate = jwtTokenHelper.validateToken(token);
|
||||
boolean validate = true;
|
||||
boolean validate = jwtTokenHelper.validateToken(token);
|
||||
// boolean validate = true;
|
||||
if (validate) {
|
||||
AuthPrincipalVo principal = jwtTokenHelper.parserToUser(token);
|
||||
Long accountId = principal.getId();
|
||||
@@ -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,18 @@ 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("\\", "/");
|
||||
String minioPath = sysImage + "/images" + path;
|
||||
receiveCollectionElement.setUrl(minioPath);
|
||||
receiveCollectionElement.setLevel1Type(CollectionLevel1TypeEnum.SKETCH_BOARD.getRealName());
|
||||
receiveCollectionElement.setLevel2Type(path.split("/")[2]);
|
||||
receiveCollectionElement.setMinioUrl(minioUtil.getPreSignedUrl(minioPath, 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
@@ -1101,7 +1101,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));
|
||||
|
||||
Reference in New Issue
Block a user