TASK:merge 模式返回mask
This commit is contained in:
@@ -2507,7 +2507,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
}
|
||||
|
||||
// 判断当前账号的有效期是否与管理员同步
|
||||
if (subAccount.getValidEndTime() < adminAcc.getValidEndTime()){
|
||||
if (Objects.isNull(subAccount.getValidEndTime()) || subAccount.getValidEndTime() < adminAcc.getValidEndTime()){
|
||||
subAccount.setValidEndTime(adminAcc.getValidEndTime());
|
||||
}
|
||||
|
||||
|
||||
@@ -485,14 +485,6 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
||||
.collect(Collectors.toMap(DesignSingleItemDTO::getPriority, DesignSingleItemDTO::getOffset));
|
||||
}
|
||||
|
||||
// 图层与mask对应关系,衣服前后片的mask是相同的
|
||||
Map<Integer, String> priorityMask = null;
|
||||
// 如果是merge模式 则使用入参中的mask
|
||||
if (designType.equals("merge")) {
|
||||
priorityMask = designSingleItemDTOList.stream()
|
||||
.collect(Collectors.toMap(DesignSingleItemDTO::getPriority, DesignSingleItemDTO::getMaskMinioUrl));
|
||||
}
|
||||
|
||||
List<TDesignPythonOutfitDetail> list = new ArrayList<>();
|
||||
for (int i = 0; i < layers.size(); i++) {
|
||||
JSONObject jsonObject = layers.getJSONObject(i);
|
||||
@@ -514,12 +506,7 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
||||
designPythonOutfitDetail.setImageUrl(jsonObject.getString("image_url"));
|
||||
designPythonOutfitDetail.setImageSize(jsonObject.getString("image_size"));
|
||||
designPythonOutfitDetail.setImageCategory(jsonObject.getString("image_category"));
|
||||
if (designType.equals("merge")) {
|
||||
designPythonOutfitDetail.setMaskUrl(priorityMask.get(Math.abs(priority)));
|
||||
} else {
|
||||
designPythonOutfitDetail.setMaskUrl(jsonObject.getString("mask_url"));
|
||||
}
|
||||
|
||||
designPythonOutfitDetail.setMaskUrl(jsonObject.getString("mask_url"));
|
||||
designPythonOutfitDetail.setScale(Objects.isNull(jsonObject.getString("resize_scale")) ? "1.0" : jsonObject.getString("resize_scale"));
|
||||
designPythonOutfitDetail.setUserId(userId);
|
||||
if (priorityOffset != null && !priorityOffset.isEmpty()){
|
||||
|
||||
Reference in New Issue
Block a user