Merge branch 'dev/dev_xp' into dev/dev
This commit is contained in:
@@ -371,4 +371,13 @@ public class AccountController {
|
|||||||
public Response<Boolean> subAccountImport(@RequestParam("file") MultipartFile file) {
|
public Response<Boolean> subAccountImport(@RequestParam("file") MultipartFile file) {
|
||||||
return Response.success(accountService.subAccountImport(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);
|
Boolean subAccountImport(MultipartFile file);
|
||||||
|
|
||||||
Set<String> organizationNameSearch(String type, String name);
|
Set<String> organizationNameSearch(String type, String name);
|
||||||
|
|
||||||
|
void send618PromotionEmailTemp();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3031,4 +3031,32 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
return new HashSet<>();
|
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 ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ public class LLMServiceImpl implements LLMService {
|
|||||||
systemImage.setAccountId(accountId);
|
systemImage.setAccountId(accountId);
|
||||||
chatMessageMapper.insert(systemImage);
|
chatMessageMapper.insert(systemImage);
|
||||||
} else if (Objects.nonNull(toolsName) && toolsName.equals("search_sketch_img")) {
|
} 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)
|
} else if (Objects.nonNull(toolsName)
|
||||||
&& toolsName.equals("update_project_info")) {
|
&& toolsName.equals("update_project_info")) {
|
||||||
updateProjectParams(projectId, toolsData);
|
updateProjectParams(projectId, toolsData);
|
||||||
@@ -395,7 +395,7 @@ public class LLMServiceImpl implements LLMService {
|
|||||||
return emitter;
|
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\"]}"
|
// content内容 "{\"sketch_list\": [\"\\\\female\\\\blouse\\\\blouse_645.jpg\", \"\\\\female\\\\dress\\\\0902004968.jpg\"]}"
|
||||||
JSONArray sketchList = content.getJSONArray("sketch_list");
|
JSONArray sketchList = content.getJSONArray("sketch_list");
|
||||||
if (sketchList.isEmpty()){
|
if (sketchList.isEmpty()){
|
||||||
@@ -404,12 +404,16 @@ public class LLMServiceImpl implements LLMService {
|
|||||||
ArrayList<ReceiveCollectionElement> dataList = new ArrayList<>();
|
ArrayList<ReceiveCollectionElement> dataList = new ArrayList<>();
|
||||||
sketchList.forEach(sketch -> {
|
sketchList.forEach(sketch -> {
|
||||||
ReceiveCollectionElement receiveCollectionElement = new ReceiveCollectionElement();
|
ReceiveCollectionElement receiveCollectionElement = new ReceiveCollectionElement();
|
||||||
receiveCollectionElement.setUrl((String) sketch);
|
String path = sketch.toString().replace("\\", "/");
|
||||||
receiveCollectionElement.setMinioUrl(minioUtil.getPreSignedUrl(sysImage + "/images" + sketch, CommonConstant.MINIO_IMAGE_EXPIRE_TIME));
|
receiveCollectionElement.setUrl(path);
|
||||||
|
receiveCollectionElement.setLevel1Type(CollectionLevel1TypeEnum.SKETCH_BOARD.getRealName());
|
||||||
|
receiveCollectionElement.setMinioUrl(minioUtil.getPreSignedUrl(sysImage + "/images" + path, CommonConstant.MINIO_IMAGE_EXPIRE_TIME));
|
||||||
dataList.add(receiveCollectionElement);
|
dataList.add(receiveCollectionElement);
|
||||||
});
|
});
|
||||||
ReceiveDesignParam receiveDesignParam = new ReceiveDesignParam();
|
ReceiveDesignParam receiveDesignParam = new ReceiveDesignParam();
|
||||||
receiveDesignParam.setReceiveCollectionElementList(dataList);
|
receiveDesignParam.setReceiveCollectionElementList(dataList);
|
||||||
|
receiveDesignParam.setProjectId(projectId);
|
||||||
|
designService.receiveDesignParams(receiveDesignParam);
|
||||||
return JSONArray.toJSONString(receiveDesignParam);
|
return JSONArray.toJSONString(receiveDesignParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -422,6 +422,11 @@ public class LibraryServiceImpl extends ServiceImpl<LibraryMapper, Library> impl
|
|||||||
throw new BusinessException("processMannequins.interface.exception");
|
throw new BusinessException("processMannequins.interface.exception");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 去sketch白边
|
||||||
|
* @param filePath
|
||||||
|
* @param category
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void processSketchBoards(String filePath, String category) {
|
public void processSketchBoards(String filePath, String category) {
|
||||||
Long imageId = pythonTAllInfoService.getImageIdByPath(filePath);
|
Long imageId = pythonTAllInfoService.getImageIdByPath(filePath);
|
||||||
|
|||||||
@@ -668,7 +668,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
|||||||
String fluxResult = generateService.getFluxResult(taskId, objectName);
|
String fluxResult = generateService.getFluxResult(taskId, objectName);
|
||||||
if (StringUtil.isNullOrEmpty(fluxResult)){
|
if (StringUtil.isNullOrEmpty(fluxResult)){
|
||||||
results.add(new MagicToolResultVO());
|
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));
|
results.add(new MagicToolResultVO(fluxResult));
|
||||||
} else {
|
} else {
|
||||||
results.add(processFluxResult(fluxResult, toProductImageResult, taskId));
|
results.add(processFluxResult(fluxResult, toProductImageResult, taskId));
|
||||||
@@ -1073,7 +1073,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
|||||||
|
|
||||||
if (StringUtil.isNullOrEmpty(fluxResult)){
|
if (StringUtil.isNullOrEmpty(fluxResult)){
|
||||||
results.add(new MagicToolResultVO());
|
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));
|
results.add(new MagicToolResultVO(fluxResult));
|
||||||
} else {
|
} else {
|
||||||
results.add(processFluxResult(fluxResult, toProductImageResult, taskId));
|
results.add(processFluxResult(fluxResult, toProductImageResult, taskId));
|
||||||
|
|||||||
Reference in New Issue
Block a user