Merge branch 'dev/dev_xp' into dev/3.1_release_merge
This commit is contained in:
@@ -94,6 +94,10 @@ public class DesignItemDetail implements Serializable {
|
|||||||
* 未分割的只上了颜色或只有overall印花的图层
|
* 未分割的只上了颜色或只有overall印花的图层
|
||||||
*/
|
*/
|
||||||
private String undividedLayer;
|
private String undividedLayer;
|
||||||
|
/**
|
||||||
|
* 未分割的添加了颜色、overall印花和single印花的图
|
||||||
|
*/
|
||||||
|
private String undividedLayerWithSinglePrint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 局部design 只会有一张图
|
* 局部design 只会有一张图
|
||||||
|
|||||||
@@ -62,6 +62,9 @@ public class DesignItemClothesDetailVO {
|
|||||||
@ApiModelProperty("未分割的图层")
|
@ApiModelProperty("未分割的图层")
|
||||||
private String undividedLayer;
|
private String undividedLayer;
|
||||||
|
|
||||||
|
@ApiModelProperty("添加single印花的未分割的图层")
|
||||||
|
private String undividedLayerWithSinglePrint;
|
||||||
|
|
||||||
@ApiModelProperty("局部design")
|
@ApiModelProperty("局部design")
|
||||||
private PartialDesignDTO partialDesign;
|
private PartialDesignDTO partialDesign;
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public interface CollectionElementService extends IService<CollectionElement> {
|
|||||||
*/
|
*/
|
||||||
Boolean saveLibraryByCollectionElement(List<CollectionElement> elements, String timeZone);
|
Boolean saveLibraryByCollectionElement(List<CollectionElement> elements, String timeZone);
|
||||||
|
|
||||||
Boolean saveLibraryByCollectionElement(List<CollectionElement> elements, String timeZone, String modelSex);
|
Boolean saveLibraryByCollectionElement(List<CollectionElement> elements, String timeZone, String modelSex, String ageGroup);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验element
|
* 校验element
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public interface DesignItemService extends IService<DesignItem> {
|
|||||||
|
|
||||||
DesignSingleVO designSingleIncludeLayers(DesignSingleIncludeLayersDTO designSingleIncludeLayersDTO);
|
DesignSingleVO designSingleIncludeLayers(DesignSingleIncludeLayersDTO designSingleIncludeLayersDTO);
|
||||||
|
|
||||||
Map<String, String> setPriorityAndUndividedLayer(JSONArray layers);
|
Map<String, List<String>> setPriorityAndUndividedLayer(JSONArray layers);
|
||||||
|
|
||||||
Map<String, String> setTypeAndUndividedLayer(JSONArray layers);
|
Map<String, String> setTypeAndUndividedLayer(JSONArray layers);
|
||||||
|
|
||||||
|
|||||||
@@ -63,4 +63,7 @@ public interface WorkspaceService extends IService<Workspace> {
|
|||||||
SaveOrUpdateProjectVO saveOrUpdateProject(ProjectDTO projectDTO);
|
SaveOrUpdateProjectVO saveOrUpdateProject(ProjectDTO projectDTO);
|
||||||
|
|
||||||
Long getByProjectId(Long projectId);
|
Long getByProjectId(Long projectId);
|
||||||
|
|
||||||
|
Workspace getWSByProjectId(Long projectId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,11 +91,11 @@ public class AliPayServiceImpl implements AliPayService {
|
|||||||
return response.getBody();
|
return response.getBody();
|
||||||
} else {
|
} else {
|
||||||
log.info("调用失败,返回码 ===> " + response.getCode() + ", 返回描述 ===> " + response.getMsg());
|
log.info("调用失败,返回码 ===> " + response.getCode() + ", 返回描述 ===> " + response.getMsg());
|
||||||
throw new BusinessException("Order creation failed");
|
throw new BusinessException("order.creation.failed");
|
||||||
}
|
}
|
||||||
} catch (AlipayApiException e) {
|
} catch (AlipayApiException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new BusinessException("Order creation failed");
|
throw new BusinessException("order.creation.failed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ public class ChatRobotServiceImpl extends ServiceImpl<ChatRobotMapper, ChatRobot
|
|||||||
library.setName(name);
|
library.setName(name);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new BusinessException("error url");
|
throw new BusinessException("the.path.is.error");
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -331,7 +331,8 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean saveLibraryByCollectionElement(List<CollectionElement> elements, String timeZone, String modelSex) {
|
public Boolean saveLibraryByCollectionElement(List<CollectionElement> elements, String timeZone,
|
||||||
|
String modelSex, String ageGroup) {
|
||||||
if (CollectionUtils.isEmpty(elements)) {
|
if (CollectionUtils.isEmpty(elements)) {
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
@@ -351,6 +352,7 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
|
|||||||
List<Library> libraryList = CopyUtil.copyList(elements, Library.class, (o, d) -> {
|
List<Library> libraryList = CopyUtil.copyList(elements, Library.class, (o, d) -> {
|
||||||
if (d.getLevel1Type().equals(LibraryLevel1TypeEnum.SKETCH_BOARD.getRealName())) {
|
if (d.getLevel1Type().equals(LibraryLevel1TypeEnum.SKETCH_BOARD.getRealName())) {
|
||||||
d.setLevel3Type(modelSex);
|
d.setLevel3Type(modelSex);
|
||||||
|
d.setAgeGroup(ageGroup);
|
||||||
// try {
|
// try {
|
||||||
// libraryService.processSketchBoards(d.getUrl(), d.getLevel2Type());
|
// libraryService.processSketchBoards(d.getUrl(), d.getLevel2Type());
|
||||||
// }catch (Exception e) {
|
// }catch (Exception e) {
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
|||||||
public List<TDesignPythonOutfitDetail> saveDesignSingleItemDetailAndLayers(DesignPythonObjects pythonObjects
|
public List<TDesignPythonOutfitDetail> saveDesignSingleItemDetailAndLayers(DesignPythonObjects pythonObjects
|
||||||
, Long designId, Long designItemId, Long userId
|
, Long designId, Long designItemId, Long userId
|
||||||
, JSONObject outfit, String timeZone, List<DesignSingleItemDTO> designSingleItemDTOList
|
, JSONObject outfit, String timeZone, List<DesignSingleItemDTO> designSingleItemDTOList
|
||||||
, Map<String, String> priorityAndUndividedLayer
|
, Map<String, List<String>> priorityAndUndividedLayer
|
||||||
, boolean changeModelFlag
|
, boolean changeModelFlag
|
||||||
, Long modelId, String modelType, boolean isSingleCollectionFlag) {
|
, Long modelId, String modelType, boolean isSingleCollectionFlag) {
|
||||||
|
|
||||||
@@ -375,7 +375,11 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
|||||||
}
|
}
|
||||||
designItemDetail.setIconPath(detail.getIcon());
|
designItemDetail.setIconPath(detail.getIcon());
|
||||||
// designItemDetail.setUndividedLayer(priorityAndUndividedLayer.get(detail.getType().toLowerCase()));
|
// designItemDetail.setUndividedLayer(priorityAndUndividedLayer.get(detail.getType().toLowerCase()));
|
||||||
if (!detail.getType().equals("Body")) designItemDetail.setUndividedLayer(priorityAndUndividedLayer.get(detail.getPriority().toString()));
|
if (!detail.getType().equals("Body")){
|
||||||
|
designItemDetail.setUndividedLayer(priorityAndUndividedLayer.get(detail.getPriority().toString()).get(0));
|
||||||
|
designItemDetail.setUndividedLayerWithSinglePrint(priorityAndUndividedLayer.get(detail.getPriority().toString()).get(1));
|
||||||
|
|
||||||
|
}
|
||||||
// 印花存储在design_item_detail_print表中 这里还要存吗?
|
// 印花存储在design_item_detail_print表中 这里还要存吗?
|
||||||
// DesignPythonItemPrint printObject = detail.getPrintToPython();
|
// DesignPythonItemPrint printObject = detail.getPrintToPython();
|
||||||
// designItemDetail.setPrintPath(Objects.isNull(printObject) ? "" : printObject.getPath());
|
// designItemDetail.setPrintPath(Objects.isNull(printObject) ? "" : printObject.getPath());
|
||||||
@@ -600,7 +604,7 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
|||||||
JSONObject outfit = data.getJSONObject("0");
|
JSONObject outfit = data.getJSONObject("0");
|
||||||
|
|
||||||
JSONArray layers = outfit.getJSONArray("layers");
|
JSONArray layers = outfit.getJSONArray("layers");
|
||||||
Map<String, String> priorityAndUndividedLayer = setPriorityAndUndividedLayer(layers);
|
Map<String, List<String>> priorityAndUndividedLayer = setPriorityAndUndividedLayer(layers);
|
||||||
if (!designSingleIncludeLayersDTO.getIsPreview()) {
|
if (!designSingleIncludeLayersDTO.getIsPreview()) {
|
||||||
// 更新及保存图层信息
|
// 更新及保存图层信息
|
||||||
tDesignPythonOutfitDetails = saveDesignSingleItemDetailAndLayers(objects, design.getId(), designSingleIncludeLayersDTO.getDesignItemId()
|
tDesignPythonOutfitDetails = saveDesignSingleItemDetailAndLayers(objects, design.getId(), designSingleIncludeLayersDTO.getDesignItemId()
|
||||||
@@ -727,13 +731,13 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> setPriorityAndUndividedLayer(JSONArray layers){
|
public Map<String, List<String>> setPriorityAndUndividedLayer(JSONArray layers){
|
||||||
HashMap<String, String> priorityAndLayer = new HashMap<>();
|
HashMap<String, List<String>> priorityAndLayer = new HashMap<>();
|
||||||
for (int i = 0; i < layers.size(); i++) {
|
for (int i = 0; i < layers.size(); i++) {
|
||||||
JSONObject jsonObject = layers.getJSONObject(i);
|
JSONObject jsonObject = layers.getJSONObject(i);
|
||||||
String priority = jsonObject.getString("priority");
|
String priority = jsonObject.getString("priority");
|
||||||
String category = jsonObject.getString("image_category").split("_")[0];
|
String category = jsonObject.getString("image_category").split("_")[0];
|
||||||
if (!category.equals("body") && !priorityAndLayer.containsKey(priority)) priorityAndLayer.put(priority, jsonObject.getString("pattern_image_url"));
|
if (!category.equals("body") && !priorityAndLayer.containsKey(priority)) priorityAndLayer.put(priority, Arrays.asList(jsonObject.getString("pattern_overall_image_url"), jsonObject.getString("pattern_print_image_url")));
|
||||||
}
|
}
|
||||||
return priorityAndLayer;
|
return priorityAndLayer;
|
||||||
}
|
}
|
||||||
@@ -848,7 +852,7 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
|||||||
List<DesignSingleItemDTO> designSingleItemDTOList,
|
List<DesignSingleItemDTO> designSingleItemDTOList,
|
||||||
List<DesignPythonOutfitVO> layersObject,
|
List<DesignPythonOutfitVO> layersObject,
|
||||||
String singleOrOverall,
|
String singleOrOverall,
|
||||||
Map<String, String> priorityAndUndividedLayer) {
|
Map<String, List<String>> priorityAndUndividedLayer) {
|
||||||
|
|
||||||
DesignSingleVO designSingleVO = new DesignSingleVO();
|
DesignSingleVO designSingleVO = new DesignSingleVO();
|
||||||
ArrayList<DesignItemClothesDetailVO> clothes = new ArrayList<>();
|
ArrayList<DesignItemClothesDetailVO> clothes = new ArrayList<>();
|
||||||
@@ -887,7 +891,10 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
|||||||
String preSignedUrl = StringUtil.isNullOrEmpty(partialDesignMinioPath) ? null : minioUtil.getPreSignedUrl(partialDesignMinioPath, CommonConstant.MINIO_IMAGE_EXPIRE_TIME, true);
|
String preSignedUrl = StringUtil.isNullOrEmpty(partialDesignMinioPath) ? null : minioUtil.getPreSignedUrl(partialDesignMinioPath, CommonConstant.MINIO_IMAGE_EXPIRE_TIME, true);
|
||||||
designItemClothesDetailVO.setPartialDesign(new PartialDesignDTO(partialDesignMinioPath, preSignedUrl));
|
designItemClothesDetailVO.setPartialDesign(new PartialDesignDTO(partialDesignMinioPath, preSignedUrl));
|
||||||
|
|
||||||
if (priorityAndUndividedLayer.containsKey(singleItem.getPriority().toString())) designItemClothesDetailVO.setUndividedLayer(minioUtil.getPreSignedUrl(priorityAndUndividedLayer.get(singleItem.getPriority().toString()), CommonConstant.MINIO_IMAGE_EXPIRE_TIME, true));
|
if (priorityAndUndividedLayer.containsKey(singleItem.getPriority().toString())){
|
||||||
|
designItemClothesDetailVO.setUndividedLayer(minioUtil.getPreSignedUrl(priorityAndUndividedLayer.get(singleItem.getPriority().toString()).get(0), CommonConstant.MINIO_IMAGE_EXPIRE_TIME, true));
|
||||||
|
designItemClothesDetailVO.setUndividedLayerWithSinglePrint(minioUtil.getPreSignedUrl(priorityAndUndividedLayer.get(singleItem.getPriority().toString()).get(1), CommonConstant.MINIO_IMAGE_EXPIRE_TIME, true));
|
||||||
|
}
|
||||||
body.setLayersObject(layersObject.stream().filter(layers -> layers.getImageCategory().equals("body")).collect(Collectors.toList()));
|
body.setLayersObject(layersObject.stream().filter(layers -> layers.getImageCategory().equals("body")).collect(Collectors.toList()));
|
||||||
|
|
||||||
clothes.add(designItemClothesDetailVO);
|
clothes.add(designItemClothesDetailVO);
|
||||||
|
|||||||
@@ -13,10 +13,7 @@ import com.ai.da.mapper.primary.*;
|
|||||||
import com.ai.da.mapper.primary.entity.*;
|
import com.ai.da.mapper.primary.entity.*;
|
||||||
import com.ai.da.mapper.primary.entity.Collection;
|
import com.ai.da.mapper.primary.entity.Collection;
|
||||||
import com.ai.da.model.dto.*;
|
import com.ai.da.model.dto.*;
|
||||||
import com.ai.da.model.enums.BuildType;
|
import com.ai.da.model.enums.*;
|
||||||
import com.ai.da.model.enums.CollectionType;
|
|
||||||
import com.ai.da.model.enums.DesignProcess;
|
|
||||||
import com.ai.da.model.enums.UserBehaviorType;
|
|
||||||
import com.ai.da.model.vo.*;
|
import com.ai.da.model.vo.*;
|
||||||
import com.ai.da.python.PythonService;
|
import com.ai.da.python.PythonService;
|
||||||
import com.ai.da.python.vo.*;
|
import com.ai.da.python.vo.*;
|
||||||
@@ -385,7 +382,8 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
log.info("design python端运行时间:" + totalTimeInSeconds + " 秒");
|
log.info("design python端运行时间:" + totalTimeInSeconds + " 秒");
|
||||||
//生成library
|
//生成library
|
||||||
startTime = System.currentTimeMillis();
|
startTime = System.currentTimeMillis();
|
||||||
generateLibrary(elementVO, designDTO.getTimeZone());
|
String ageGroup = getAgeGroupByCollectionId(collectionId);
|
||||||
|
generateLibrary(elementVO, designDTO.getTimeZone(), ageGroup);
|
||||||
//处理关联关系,修复element覆盖得情况
|
//处理关联关系,修复element覆盖得情况
|
||||||
// List<CollectionElement> relationElements = collectionElementService.getByOnlyCollectionId(collectionId);
|
// List<CollectionElement> relationElements = collectionElementService.getByOnlyCollectionId(collectionId);
|
||||||
// List<Long> relationElementIds = relationElements.stream().map(CollectionElement::getId).collect(Collectors.toList());
|
// List<Long> relationElementIds = relationElements.stream().map(CollectionElement::getId).collect(Collectors.toList());
|
||||||
@@ -412,6 +410,20 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
return requestId;
|
return requestId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getAgeGroupByCollectionId(Long collectionId){
|
||||||
|
List<CollectionElement> byCollectionId = collectionElementService.getByCollectionId(collectionId);
|
||||||
|
if (byCollectionId != null && !byCollectionId.isEmpty()){
|
||||||
|
Long projectId = byCollectionId.get(0).getProjectId();
|
||||||
|
if (projectId != null && projectId != 0L){
|
||||||
|
Workspace workspace = workspaceService.getWSByProjectId(projectId);
|
||||||
|
if (workspace != null && !StringUtil.isNullOrEmpty(workspace.getAgeGroup())){
|
||||||
|
return workspace.getAgeGroup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return AgeGroup.ADULT.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void parseMoodboardPosition(String moodboardPosition, Long collectionIdParam) {
|
public void parseMoodboardPosition(String moodboardPosition, Long collectionIdParam) {
|
||||||
if (!StringUtils.isEmpty(moodboardPosition)) {
|
if (!StringUtils.isEmpty(moodboardPosition)) {
|
||||||
@@ -670,7 +682,7 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
).collect(Collectors.toList()));
|
).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void generateLibrary(ValidateElementVO elementVO, String timeZone) {
|
private void generateLibrary(ValidateElementVO elementVO, String timeZone, String ageGroup) {
|
||||||
List<CollectionElement> elements = Lists.newArrayList();
|
List<CollectionElement> elements = Lists.newArrayList();
|
||||||
if (!CollectionUtils.isEmpty(elementVO.getMoodBoardElements())) {
|
if (!CollectionUtils.isEmpty(elementVO.getMoodBoardElements())) {
|
||||||
elements.addAll(elementVO.getMoodBoardElements());
|
elements.addAll(elementVO.getMoodBoardElements());
|
||||||
@@ -684,7 +696,7 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
if (!CollectionUtils.isEmpty(elementVO.getMarketingSketchElements())) {
|
if (!CollectionUtils.isEmpty(elementVO.getMarketingSketchElements())) {
|
||||||
elements.addAll(elementVO.getMarketingSketchElements());
|
elements.addAll(elementVO.getMarketingSketchElements());
|
||||||
}
|
}
|
||||||
collectionElementService.saveLibraryByCollectionElement(elements, timeZone, elementVO.getModelSex());
|
collectionElementService.saveLibraryByCollectionElement(elements, timeZone, elementVO.getModelSex(), ageGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -839,7 +851,7 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
(existing, replacement) -> replacement));
|
(existing, replacement) -> replacement));
|
||||||
Map<String, String> typeAndUndividedLayer = designItemService.setTypeAndUndividedLayer(layers);
|
Map<String, String> typeAndUndividedLayer = designItemService.setTypeAndUndividedLayer(layers);
|
||||||
log.info("all typeLayers Map:{}", typeAndUndividedLayer);
|
log.info("all typeLayers Map:{}", typeAndUndividedLayer);
|
||||||
Map<String, String> priorityAndUndividedLayer = designItemService.setPriorityAndUndividedLayer(layers);
|
Map<String, List<String>> priorityAndUndividedLayer = designItemService.setPriorityAndUndividedLayer(layers);
|
||||||
for (DesignPythonItem detail : item.getItems()) {
|
for (DesignPythonItem detail : item.getItems()) {
|
||||||
if (null == detail) {
|
if (null == detail) {
|
||||||
continue;
|
continue;
|
||||||
@@ -866,7 +878,8 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
DesignPythonItemPrint printObject = detail.getPrint().getOverall();
|
DesignPythonItemPrint printObject = detail.getPrint().getOverall();
|
||||||
// designItemDetail.setPrintPath(Objects.isNull(printObject) ? "" : printObject.getPath());
|
// designItemDetail.setPrintPath(Objects.isNull(printObject) ? "" : printObject.getPath());
|
||||||
designItemDetail.setPrintPath(CollectionUtils.isEmpty(printObject.getPrint_path_list()) ? "" : printObject.getPrint_path_list().get(0));
|
designItemDetail.setPrintPath(CollectionUtils.isEmpty(printObject.getPrint_path_list()) ? "" : printObject.getPrint_path_list().get(0));
|
||||||
designItemDetail.setUndividedLayer(priorityAndUndividedLayer.get(designItemDetail.getPriority().toString()));
|
designItemDetail.setUndividedLayer(priorityAndUndividedLayer.get(designItemDetail.getPriority().toString()).get(0));
|
||||||
|
designItemDetail.setUndividedLayerWithSinglePrint(priorityAndUndividedLayer.get(designItemDetail.getPriority().toString()).get(1));
|
||||||
}
|
}
|
||||||
designItemDetailService.save(designItemDetail);
|
designItemDetailService.save(designItemDetail);
|
||||||
if (!SysFileLevel2TypeEnum.BODY.getRealName().equals(detail.getType()) && !StringUtil.isNullOrEmpty(designItemDetail.getPrintPath())) {
|
if (!SysFileLevel2TypeEnum.BODY.getRealName().equals(detail.getType()) && !StringUtil.isNullOrEmpty(designItemDetail.getPrintPath())) {
|
||||||
@@ -2484,7 +2497,8 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
log.info("design python端运行时间:" + totalTimeInSeconds + " 秒");
|
log.info("design python端运行时间:" + totalTimeInSeconds + " 秒");
|
||||||
//生成library
|
//生成library
|
||||||
startTime = System.currentTimeMillis();
|
startTime = System.currentTimeMillis();
|
||||||
generateLibrary(elementVO, designDTO.getTimeZone());
|
String ageGroup = getAgeGroupByCollectionId(collectionId);
|
||||||
|
generateLibrary(elementVO, designDTO.getTimeZone(), ageGroup);
|
||||||
//处理关联关系,修复element覆盖得情况
|
//处理关联关系,修复element覆盖得情况
|
||||||
// List<CollectionElement> relationElements = collectionElementService.getByOnlyCollectionId(collectionId);
|
// List<CollectionElement> relationElements = collectionElementService.getByOnlyCollectionId(collectionId);
|
||||||
// List<Long> relationElementIds = relationElements.stream().map(CollectionElement::getId).collect(Collectors.toList());
|
// List<Long> relationElementIds = relationElements.stream().map(CollectionElement::getId).collect(Collectors.toList());
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ public class PayPalCheckoutServiceImpl implements PayPalCheckoutService {
|
|||||||
response = payPalClient.client(mode, clientId, clientSecret).execute(paypalRequest);
|
response = payPalClient.client(mode, clientId, clientSecret).execute(paypalRequest);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("调用paypal订单创建失败,失败原因 ===> {}", e.getMessage());
|
log.error("调用paypal订单创建失败,失败原因 ===> {}", e.getMessage());
|
||||||
throw new BusinessException("Order creation failed");
|
throw new BusinessException("order.creation.failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
String approve = "";
|
String approve = "";
|
||||||
@@ -377,7 +377,7 @@ public class PayPalCheckoutServiceImpl implements PayPalCheckoutService {
|
|||||||
response = payPalClient.client(mode, clientId, clientSecret).execute(request);
|
response = payPalClient.client(mode, clientId, clientSecret).execute(request);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("调用paypal扣款失败,失败原因 ===> {}", e.getMessage());
|
log.error("调用paypal扣款失败,失败原因 ===> {}", e.getMessage());
|
||||||
throw new BusinessException("Order deduction failed.");
|
throw new BusinessException("order.deduction.failed");
|
||||||
}
|
}
|
||||||
log.info("Status Code = {}, Status = {}, OrderID = {}", response.statusCode(), response.result().status(), response.result().id());
|
log.info("Status Code = {}, Status = {}, OrderID = {}", response.statusCode(), response.result().status(), response.result().id());
|
||||||
for (LinkDescription link : response.result().links()) {
|
for (LinkDescription link : response.result().links()) {
|
||||||
@@ -455,7 +455,7 @@ public class PayPalCheckoutServiceImpl implements PayPalCheckoutService {
|
|||||||
ordersGetResponse = payPalClient.client(mode, clientId, clientSecret).execute(ordersGetRequest);
|
ordersGetResponse = payPalClient.client(mode, clientId, clientSecret).execute(ordersGetRequest);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("调用paypal订单查询失败,失败原因 ===> {}", e.getMessage());
|
log.error("调用paypal订单查询失败,失败原因 ===> {}", e.getMessage());
|
||||||
throw new BusinessException("Order query failed");
|
throw new BusinessException("order.query.failed");
|
||||||
}
|
}
|
||||||
String captureId = ordersGetResponse.result().purchaseUnits().get(0).payments().captures().get(0).id();
|
String captureId = ordersGetResponse.result().purchaseUnits().get(0).payments().captures().get(0).id();
|
||||||
CapturesRefundRequest request = new CapturesRefundRequest(captureId);
|
CapturesRefundRequest request = new CapturesRefundRequest(captureId);
|
||||||
|
|||||||
@@ -479,7 +479,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
|||||||
}else {
|
}else {
|
||||||
sb.append("a beautiful woman,");
|
sb.append("a beautiful woman,");
|
||||||
}
|
}
|
||||||
sb.append("wearing ").append(collect);
|
// sb.append("wearing ").append(collect);
|
||||||
}
|
}
|
||||||
if (StringUtils.isEmpty(prompt)) {
|
if (StringUtils.isEmpty(prompt)) {
|
||||||
sb.append(",high quality clothing details,8K realistic,HDR");
|
sb.append(",high quality clothing details,8K realistic,HDR");
|
||||||
|
|||||||
@@ -866,6 +866,16 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
|||||||
return workspaceList.get(0).getId();
|
return workspaceList.get(0).getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Workspace getWSByProjectId(Long projectId) {
|
||||||
|
QueryWrapper<Workspace> qw = new QueryWrapper<>();
|
||||||
|
qw.lambda().eq(Workspace::getProjectId, projectId);
|
||||||
|
List<Workspace> workspaceList = workspaceMapper.selectList(qw);
|
||||||
|
if (CollectionUtils.isEmpty(workspaceList)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return workspaceList.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
public static List<File> getPNGFiles(String directoryPath) {
|
public static List<File> getPNGFiles(String directoryPath) {
|
||||||
List<File> pngFiles = new ArrayList<>();
|
List<File> pngFiles = new ArrayList<>();
|
||||||
File directory = new File(directoryPath);
|
File directory = new File(directoryPath);
|
||||||
|
|||||||
Reference in New Issue
Block a user