Merge remote-tracking branch 'origin/dev/dev' into dev/dev
This commit is contained in:
@@ -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