TASK:男装逻辑;
This commit is contained in:
@@ -399,20 +399,366 @@ public class PythonService {
|
||||
List<CollectionElement> pinData = getPinData(elementVO.getSketchBoardElements(), elementVO.getHasUseMd5List());
|
||||
//计算填充PythonItemBlouse
|
||||
List<DesignPythonItem> items = Lists.newArrayList();
|
||||
List<DesignPythonItem> blouseList = calculatePythonItemBlouse(pinData, elementVO, designPictureType);
|
||||
if (!CollectionUtils.isEmpty(blouseList)) {
|
||||
items.addAll(blouseList);
|
||||
}
|
||||
//计算填充PythonItemSkirt
|
||||
DesignPythonItem skirt = calculatePythonItemSkirt(pinData, elementVO, designPictureType);
|
||||
if (Objects.nonNull(skirt)) {
|
||||
items.add(skirt);
|
||||
if (elementVO.getModelSex().equals("Female")) {
|
||||
List<DesignPythonItem> blouseList = calculatePythonItemBlouse(pinData, elementVO, designPictureType);
|
||||
if (!CollectionUtils.isEmpty(blouseList)) {
|
||||
items.addAll(blouseList);
|
||||
}
|
||||
//计算填充PythonItemSkirt
|
||||
DesignPythonItem skirt = calculatePythonItemSkirt(pinData, elementVO, designPictureType);
|
||||
if (Objects.nonNull(skirt)) {
|
||||
items.add(skirt);
|
||||
}
|
||||
}else {
|
||||
// 男装逻辑
|
||||
DesignPythonItem top = calculatePythonItemTop(pinData, elementVO, designPictureType);
|
||||
if (Objects.nonNull(top)) {
|
||||
items.add(top);
|
||||
}
|
||||
DesignPythonItem bottom = calculatePythonItemBottom(pinData, elementVO, designPictureType);
|
||||
if (Objects.nonNull(bottom)) {
|
||||
items.add(bottom);
|
||||
}
|
||||
}
|
||||
//计算填充Hairstyle Earring Shoes Body
|
||||
items.addAll(calculatePythonItemHairstyleShoes(elementVO, elementVO.getDesignLibraryModelPoint()));
|
||||
return items;
|
||||
}
|
||||
|
||||
private DesignPythonItem calculatePythonItemBottom(List<CollectionElement> pinData, ValidateElementVO elementVO, CurrentDesignPictureTypeEnum designPictureType) {
|
||||
DesignPythonItem bottom = null;
|
||||
//剩余的的PinData
|
||||
List<Long> existPinDataIds = elementVO.getExistPinDataIds();
|
||||
List<CollectionElement> residuePinData = residuePinData(pinData, existPinDataIds, elementVO.getHasUseMd5List());
|
||||
if (CollectionUtil.isNotEmpty(residuePinData)) {
|
||||
//single模式
|
||||
if (SingleOverallEnum.SINGLE.getRealName().equals(elementVO.getSingleOverall())) {
|
||||
if (DesignPythonItem.BOTTOMS.contains(elementVO.getSwitchCategory())) {
|
||||
//是否包含的Pin
|
||||
Boolean isPin = residuePinData.stream().filter(residue ->
|
||||
elementVO.getSwitchCategory().equals(residue.getLevel2Type())).findFirst().isPresent();
|
||||
//如果包含Pin只传一个
|
||||
if (isPin) {
|
||||
//Pin的数据
|
||||
pinData = getPinDataByLevel2Type(pinData, elementVO.getSwitchCategory());
|
||||
//剩余的的PinData
|
||||
List<CollectionElement> residueInnerPinDataByType = residuePinData(pinData, existPinDataIds, elementVO.getHasUseMd5List());
|
||||
CollectionElement elementNew = CollectionUtils.isEmpty(residueInnerPinDataByType) ? null : residueInnerPinDataByType.get(0);
|
||||
if (Objects.nonNull(elementNew)) {
|
||||
bottom = coverToDesignPythonItem(elementNew.getId(), elementVO.getSwitchCategory(), elementNew.getUrl(), elementVO);
|
||||
//去重用
|
||||
existPinDataIds.add(elementNew.getId());
|
||||
//添加已使用的md5
|
||||
elementVO.getHasUseMd5List().add(elementNew.getMd5());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//是否包含skirt的Pin
|
||||
Boolean isPin = residuePinData.stream().filter(residue ->
|
||||
DesignPythonItem.BOTTOMS.contains(residue.getLevel2Type())).findFirst().isPresent();
|
||||
//如果包含Pin只传一个
|
||||
if (isPin) {
|
||||
for (String type : DesignPythonItem.BOTTOMS) {
|
||||
//剩余的的PinData
|
||||
List<CollectionElement> residueInnerPinData = residuePinData(pinData, existPinDataIds, elementVO.getHasUseMd5List());
|
||||
CollectionElement elementNew = residueInnerPinData.stream()
|
||||
.filter(element -> element.getLevel2Type().equals(type)).findFirst().orElse(null);
|
||||
if (Objects.nonNull(elementNew)) {
|
||||
bottom = coverToDesignPythonItem(elementNew.getId(), type, elementNew.getUrl(), elementVO);
|
||||
//去重用
|
||||
existPinDataIds.add(elementNew.getId());
|
||||
//添加已使用的md5
|
||||
elementVO.getHasUseMd5List().add(elementNew.getMd5());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (Objects.nonNull(bottom)) {
|
||||
return bottom;
|
||||
}
|
||||
switch (designPictureType) {
|
||||
case PIN:
|
||||
if (Objects.isNull(bottom)) {
|
||||
//single模式
|
||||
if (SingleOverallEnum.SINGLE.getRealName().equals(elementVO.getSingleOverall())) {
|
||||
if (DesignPythonItem.BOTTOMS.contains(elementVO.getSwitchCategory())) {
|
||||
//系统获取
|
||||
SysFileVO sysFileVO = getRandomSysFileByLevel2Type(elementVO.getSwitchCategory(), elementVO.getSysFileIds(), elementVO.getModelSex());
|
||||
bottom = coverToDesignPythonItem(null, sysFileVO.getLevel2Type(), sysFileVO.getUrl(), elementVO);
|
||||
bottom.setBusinessId(sysFileVO.getId());
|
||||
return bottom;
|
||||
}
|
||||
} else {
|
||||
//系统获取
|
||||
SysFileVO sysFileVO = getRandomSysFileMaleBottoms(elementVO.getSysFileVo(),elementVO.getSysFileIds(), elementVO.getModelSex());
|
||||
bottom = coverToDesignPythonItem(null, sysFileVO.getLevel2Type(), sysFileVO.getUrl(), elementVO);
|
||||
bottom.setBusinessId(sysFileVO.getId());
|
||||
//添加已使用的md5
|
||||
return bottom;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case USER_LIBRARY:
|
||||
//single模式
|
||||
if (SingleOverallEnum.SINGLE.getRealName().equals(elementVO.getSingleOverall())) {
|
||||
if (DesignPythonItem.BOTTOMS.contains(elementVO.getSwitchCategory())) {
|
||||
LibraryVo libraryVo = getRandomLibrary(elementVO.getLibraryVos(),
|
||||
Arrays.asList(elementVO.getSwitchCategory()), elementVO.getHasUseMd5List());
|
||||
if (StringUtils.isEmpty(libraryVo)) {
|
||||
//系统获取
|
||||
SysFileVO sysFileVO = getRandomSysFileByLevel2Type(elementVO.getSwitchCategory(), elementVO.getSysFileIds(), elementVO.getModelSex());
|
||||
bottom = coverToDesignPythonItem(null, sysFileVO.getLevel2Type(), sysFileVO.getUrl(), elementVO);
|
||||
bottom.setBusinessId(sysFileVO.getId());
|
||||
return bottom;
|
||||
}
|
||||
bottom = coverToDesignPythonItem(null, libraryVo.getLevel2Type(), libraryVo.getUrl(), elementVO);
|
||||
elementVO.getHasUseMd5List().add(libraryVo.getMd5());
|
||||
bottom.setBusinessId(libraryVo.getId());
|
||||
}
|
||||
} else {
|
||||
LibraryVo libraryVo = getRandomLibrary(elementVO.getLibraryVos(),
|
||||
DesignPythonItem.BOTTOMS, elementVO.getHasUseMd5List());
|
||||
if (StringUtils.isEmpty(libraryVo)) {
|
||||
//系统获取
|
||||
SysFileVO sysFileVO = getRandomSysFileMaleBottoms(elementVO.getSysFileVo(),elementVO.getSysFileIds(), elementVO.getModelSex());
|
||||
bottom = coverToDesignPythonItem(null, sysFileVO.getLevel2Type(), sysFileVO.getUrl(), elementVO);
|
||||
bottom.setBusinessId(sysFileVO.getId());
|
||||
//添加已使用的md5
|
||||
return bottom;
|
||||
}
|
||||
bottom = coverToDesignPythonItem(null, libraryVo.getLevel2Type(), libraryVo.getUrl(), elementVO);
|
||||
bottom.setBusinessId(libraryVo.getId());
|
||||
elementVO.getHasUseMd5List().add(libraryVo.getMd5());
|
||||
}
|
||||
break;
|
||||
case SYS_FILE:
|
||||
//single模式
|
||||
if (SingleOverallEnum.SINGLE.getRealName().equals(elementVO.getSingleOverall())) {
|
||||
if (DesignPythonItem.BOTTOMS.contains(elementVO.getSwitchCategory())) {
|
||||
//系统获取
|
||||
SysFileVO sysFileVO = getRandomSysFileByLevel2Type(elementVO.getSwitchCategory(), elementVO.getSysFileIds(), elementVO.getModelSex());
|
||||
bottom = coverToDesignPythonItem(null, sysFileVO.getLevel2Type(), sysFileVO.getUrl(), elementVO);
|
||||
bottom.setBusinessId(sysFileVO.getId());
|
||||
return bottom;
|
||||
}
|
||||
} else {
|
||||
//系统获取
|
||||
SysFileVO sysFileVO = getRandomSysFileMaleBottoms(elementVO.getSysFileVo(),elementVO.getSysFileIds(), elementVO.getModelSex());
|
||||
bottom = coverToDesignPythonItem(null, sysFileVO.getLevel2Type(), sysFileVO.getUrl(), elementVO);
|
||||
bottom.setBusinessId(sysFileVO.getId());
|
||||
//添加已使用的md5
|
||||
return bottom;
|
||||
}
|
||||
break;
|
||||
case NO_PIN:
|
||||
//single模式
|
||||
if (SingleOverallEnum.SINGLE.getRealName().equals(elementVO.getSingleOverall())) {
|
||||
if (DesignPythonItem.BOTTOMS.contains(elementVO.getSwitchCategory())) {
|
||||
//非Pin的数据
|
||||
List<CollectionElement> noPinDataByType =
|
||||
getNoPinData(elementVO.getSketchBoardElements(), Collections.singletonList(elementVO.getSwitchCategory()));
|
||||
CollectionElement collectionElement = getRandomSketchLibrary(noPinDataByType, elementVO.getHasUseMd5List());
|
||||
if (Objects.isNull(collectionElement)) {
|
||||
//系统获取
|
||||
SysFileVO sysFileVO = getRandomSysFileByLevel2Type(elementVO.getSwitchCategory(), elementVO.getSysFileIds(), elementVO.getModelSex());
|
||||
bottom = coverToDesignPythonItem(null, sysFileVO.getLevel2Type(), sysFileVO.getUrl(), elementVO);
|
||||
bottom.setBusinessId(sysFileVO.getId());
|
||||
} else {
|
||||
elementVO.getHasUseMd5List().add(collectionElement.getMd5());
|
||||
bottom = coverToDesignPythonItem(collectionElement.getId(), collectionElement.getLevel2Type(), collectionElement.getUrl(), elementVO);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//非Pin的数据
|
||||
List<CollectionElement> noPinData = getNoPinData(elementVO.getSketchBoardElements(), DesignPythonItem.BOTTOMS);
|
||||
CollectionElement collectionElement = getRandomSketchLibrary(noPinData, elementVO.getHasUseMd5List());
|
||||
if (Objects.isNull(collectionElement)) {
|
||||
//系统获取
|
||||
SysFileVO sysFileVO = getRandomSysFileMaleBottoms(elementVO.getSysFileVo(),elementVO.getSysFileIds(), elementVO.getModelSex());
|
||||
bottom = coverToDesignPythonItem(null, sysFileVO.getLevel2Type(), sysFileVO.getUrl(), elementVO);
|
||||
bottom.setBusinessId(sysFileVO.getId());
|
||||
} else {
|
||||
elementVO.getHasUseMd5List().add(collectionElement.getMd5());
|
||||
bottom = coverToDesignPythonItem(collectionElement.getId(), collectionElement.getLevel2Type(), collectionElement.getUrl(), elementVO);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
}
|
||||
return bottom;
|
||||
}
|
||||
|
||||
private DesignPythonItem calculatePythonItemTop(List<CollectionElement> pinData, ValidateElementVO elementVO, CurrentDesignPictureTypeEnum designPictureType) {
|
||||
DesignPythonItem top = null;
|
||||
//剩余的的PinData
|
||||
List<Long> existPinDataIds = elementVO.getExistPinDataIds();
|
||||
List<CollectionElement> residuePinData = residuePinData(pinData, existPinDataIds, elementVO.getHasUseMd5List());
|
||||
if (CollectionUtil.isNotEmpty(residuePinData)) {
|
||||
//single模式
|
||||
if (SingleOverallEnum.SINGLE.getRealName().equals(elementVO.getSingleOverall())) {
|
||||
if (DesignPythonItem.TOPS.contains(elementVO.getSwitchCategory())) {
|
||||
//是否包含的Pin
|
||||
Boolean isPin = residuePinData.stream().filter(residue ->
|
||||
elementVO.getSwitchCategory().equals(residue.getLevel2Type())).findFirst().isPresent();
|
||||
//如果包含Pin只传一个
|
||||
if (isPin) {
|
||||
//Pin的数据
|
||||
pinData = getPinDataByLevel2Type(pinData, elementVO.getSwitchCategory());
|
||||
//剩余的的PinData
|
||||
List<CollectionElement> residueInnerPinDataByType = residuePinData(pinData, existPinDataIds, elementVO.getHasUseMd5List());
|
||||
CollectionElement elementNew = CollectionUtils.isEmpty(residueInnerPinDataByType) ? null : residueInnerPinDataByType.get(0);
|
||||
if (Objects.nonNull(elementNew)) {
|
||||
top = coverToDesignPythonItem(elementNew.getId(), elementVO.getSwitchCategory(), elementNew.getUrl(), elementVO);
|
||||
//去重用
|
||||
existPinDataIds.add(elementNew.getId());
|
||||
//添加已使用的md5
|
||||
elementVO.getHasUseMd5List().add(elementNew.getMd5());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//是否包含skirt的Pin
|
||||
Boolean isPin = residuePinData.stream().filter(residue ->
|
||||
DesignPythonItem.TOPS.contains(residue.getLevel2Type())).findFirst().isPresent();
|
||||
//如果包含Pin只传一个
|
||||
if (isPin) {
|
||||
for (String type : DesignPythonItem.TOPS) {
|
||||
//剩余的的PinData
|
||||
List<CollectionElement> residueInnerPinData = residuePinData(pinData, existPinDataIds, elementVO.getHasUseMd5List());
|
||||
CollectionElement elementNew = residueInnerPinData.stream()
|
||||
.filter(element -> element.getLevel2Type().equals(type)).findFirst().orElse(null);
|
||||
if (Objects.nonNull(elementNew)) {
|
||||
top = coverToDesignPythonItem(elementNew.getId(), type, elementNew.getUrl(), elementVO);
|
||||
//去重用
|
||||
existPinDataIds.add(elementNew.getId());
|
||||
//添加已使用的md5
|
||||
elementVO.getHasUseMd5List().add(elementNew.getMd5());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (Objects.nonNull(top)) {
|
||||
return top;
|
||||
}
|
||||
switch (designPictureType) {
|
||||
case PIN:
|
||||
if (Objects.isNull(top)) {
|
||||
//single模式
|
||||
if (SingleOverallEnum.SINGLE.getRealName().equals(elementVO.getSingleOverall())) {
|
||||
if (DesignPythonItem.TOPS.contains(elementVO.getSwitchCategory())) {
|
||||
//系统获取
|
||||
SysFileVO sysFileVO = getRandomSysFileByLevel2Type(elementVO.getSwitchCategory(), elementVO.getSysFileIds(), elementVO.getModelSex());
|
||||
top = coverToDesignPythonItem(null, sysFileVO.getLevel2Type(), sysFileVO.getUrl(), elementVO);
|
||||
top.setBusinessId(sysFileVO.getId());
|
||||
return top;
|
||||
}
|
||||
} else {
|
||||
//系统获取
|
||||
SysFileVO sysFileVO = getRandomSysFileMaleTops(elementVO.getSysFileVo(),elementVO.getSysFileIds(), elementVO.getModelSex());
|
||||
top = coverToDesignPythonItem(null, sysFileVO.getLevel2Type(), sysFileVO.getUrl(), elementVO);
|
||||
top.setBusinessId(sysFileVO.getId());
|
||||
//添加已使用的md5
|
||||
return top;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case USER_LIBRARY:
|
||||
//single模式
|
||||
if (SingleOverallEnum.SINGLE.getRealName().equals(elementVO.getSingleOverall())) {
|
||||
if (DesignPythonItem.TOPS.contains(elementVO.getSwitchCategory())) {
|
||||
LibraryVo libraryVo = getRandomLibrary(elementVO.getLibraryVos(),
|
||||
Arrays.asList(elementVO.getSwitchCategory()), elementVO.getHasUseMd5List());
|
||||
if (StringUtils.isEmpty(libraryVo)) {
|
||||
//系统获取
|
||||
SysFileVO sysFileVO = getRandomSysFileByLevel2Type(elementVO.getSwitchCategory(), elementVO.getSysFileIds(), elementVO.getModelSex());
|
||||
top = coverToDesignPythonItem(null, sysFileVO.getLevel2Type(), sysFileVO.getUrl(), elementVO);
|
||||
top.setBusinessId(sysFileVO.getId());
|
||||
return top;
|
||||
}
|
||||
top = coverToDesignPythonItem(null, libraryVo.getLevel2Type(), libraryVo.getUrl(), elementVO);
|
||||
elementVO.getHasUseMd5List().add(libraryVo.getMd5());
|
||||
top.setBusinessId(libraryVo.getId());
|
||||
}
|
||||
} else {
|
||||
LibraryVo libraryVo = getRandomLibrary(elementVO.getLibraryVos(),
|
||||
DesignPythonItem.TOPS, elementVO.getHasUseMd5List());
|
||||
if (StringUtils.isEmpty(libraryVo)) {
|
||||
//系统获取
|
||||
SysFileVO sysFileVO = getRandomSysFileMaleTops(elementVO.getSysFileVo(),elementVO.getSysFileIds(), elementVO.getModelSex());
|
||||
top = coverToDesignPythonItem(null, sysFileVO.getLevel2Type(), sysFileVO.getUrl(), elementVO);
|
||||
top.setBusinessId(sysFileVO.getId());
|
||||
//添加已使用的md5
|
||||
return top;
|
||||
}
|
||||
top = coverToDesignPythonItem(null, libraryVo.getLevel2Type(), libraryVo.getUrl(), elementVO);
|
||||
top.setBusinessId(libraryVo.getId());
|
||||
elementVO.getHasUseMd5List().add(libraryVo.getMd5());
|
||||
}
|
||||
break;
|
||||
case SYS_FILE:
|
||||
//single模式
|
||||
if (SingleOverallEnum.SINGLE.getRealName().equals(elementVO.getSingleOverall())) {
|
||||
if (DesignPythonItem.TOPS.contains(elementVO.getSwitchCategory())) {
|
||||
//系统获取
|
||||
SysFileVO sysFileVO = getRandomSysFileByLevel2Type(elementVO.getSwitchCategory(), elementVO.getSysFileIds(), elementVO.getModelSex());
|
||||
top = coverToDesignPythonItem(null, sysFileVO.getLevel2Type(), sysFileVO.getUrl(), elementVO);
|
||||
top.setBusinessId(sysFileVO.getId());
|
||||
return top;
|
||||
}
|
||||
} else {
|
||||
//系统获取
|
||||
SysFileVO sysFileVO = getRandomSysFileMaleTops(elementVO.getSysFileVo(),elementVO.getSysFileIds(), elementVO.getModelSex());
|
||||
top = coverToDesignPythonItem(null, sysFileVO.getLevel2Type(), sysFileVO.getUrl(), elementVO);
|
||||
top.setBusinessId(sysFileVO.getId());
|
||||
//添加已使用的md5
|
||||
return top;
|
||||
}
|
||||
break;
|
||||
case NO_PIN:
|
||||
//single模式
|
||||
if (SingleOverallEnum.SINGLE.getRealName().equals(elementVO.getSingleOverall())) {
|
||||
if (DesignPythonItem.TOPS.contains(elementVO.getSwitchCategory())) {
|
||||
//非Pin的数据
|
||||
List<CollectionElement> noPinDataByType =
|
||||
getNoPinData(elementVO.getSketchBoardElements(), Collections.singletonList(elementVO.getSwitchCategory()));
|
||||
CollectionElement collectionElement = getRandomSketchLibrary(noPinDataByType, elementVO.getHasUseMd5List());
|
||||
if (Objects.isNull(collectionElement)) {
|
||||
//系统获取
|
||||
SysFileVO sysFileVO = getRandomSysFileByLevel2Type(elementVO.getSwitchCategory(), elementVO.getSysFileIds(), elementVO.getModelSex());
|
||||
top = coverToDesignPythonItem(null, sysFileVO.getLevel2Type(), sysFileVO.getUrl(), elementVO);
|
||||
top.setBusinessId(sysFileVO.getId());
|
||||
} else {
|
||||
elementVO.getHasUseMd5List().add(collectionElement.getMd5());
|
||||
top = coverToDesignPythonItem(collectionElement.getId(), collectionElement.getLevel2Type(), collectionElement.getUrl(), elementVO);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//非Pin的数据
|
||||
List<CollectionElement> noPinData = getNoPinData(elementVO.getSketchBoardElements(), DesignPythonItem.TOPS);
|
||||
CollectionElement collectionElement = getRandomSketchLibrary(noPinData, elementVO.getHasUseMd5List());
|
||||
if (Objects.isNull(collectionElement)) {
|
||||
//系统获取
|
||||
SysFileVO sysFileVO = getRandomSysFileMaleTops(elementVO.getSysFileVo(),elementVO.getSysFileIds(), elementVO.getModelSex());
|
||||
top = coverToDesignPythonItem(null, sysFileVO.getLevel2Type(), sysFileVO.getUrl(), elementVO);
|
||||
top.setBusinessId(sysFileVO.getId());
|
||||
} else {
|
||||
elementVO.getHasUseMd5List().add(collectionElement.getMd5());
|
||||
top = coverToDesignPythonItem(collectionElement.getId(), collectionElement.getLevel2Type(), collectionElement.getUrl(), elementVO);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
}
|
||||
return top;
|
||||
}
|
||||
|
||||
private List<DesignPythonItem> calculatePythonItemHairstyleShoes(ValidateElementVO elementVO, DesignLibraryModelPointVO designLibraryModelPoint) {
|
||||
List<DesignPythonItem> items = Lists.newArrayList();
|
||||
for (String type : DesignPythonItem.SYS_HAIRSTYLE_SHOES_BODY) {
|
||||
@@ -945,6 +1291,26 @@ public class PythonService {
|
||||
}
|
||||
}
|
||||
|
||||
private SysFileVO getRandomSysFileMaleTops(List<SysFileVO> sysFileVo, List<Long> sysFileIds, String modelSex) {
|
||||
Long randomIndex = RandomsUtil.randomSysFile(0L, 1L);
|
||||
if(CollectionUtils.isEmpty(sysFileVo)){
|
||||
return getRandomSysFileByLevel2Type(DesignPythonItem.TOPS.get(randomIndex.intValue()), sysFileIds, modelSex);
|
||||
}else{
|
||||
//attribute_retrieval 算法,满足blouse + outwear+dress>8,以及 skirt+trousers>8
|
||||
return getRandomSysFileByAttributeRetrieval(DesignPythonItem.TOPS,sysFileVo, sysFileIds);
|
||||
}
|
||||
}
|
||||
|
||||
private SysFileVO getRandomSysFileMaleBottoms(List<SysFileVO> sysFileVo, List<Long> sysFileIds, String modelSex) {
|
||||
Long randomIndex = RandomsUtil.randomSysFile(0L, 1L);
|
||||
if(CollectionUtils.isEmpty(sysFileVo)){
|
||||
return getRandomSysFileByLevel2Type(DesignPythonItem.BOTTOMS.get(randomIndex.intValue()), sysFileIds, modelSex);
|
||||
}else{
|
||||
//attribute_retrieval 算法,满足blouse + outwear+dress>8,以及 skirt+trousers>8
|
||||
return getRandomSysFileByAttributeRetrieval(DesignPythonItem.BOTTOMS,sysFileVo, sysFileIds);
|
||||
}
|
||||
}
|
||||
|
||||
private SysFileVO getRandomSysFileSkirt(List<SysFileVO> sysFileVo, List<Long> sysFileIds, String modelSex) {
|
||||
Long randomIndex = RandomsUtil.randomSysFile(0L, 2L);
|
||||
if(CollectionUtils.isEmpty(sysFileVo)){
|
||||
|
||||
@@ -77,6 +77,12 @@ public class DesignPythonItem {
|
||||
public static List<String> SKIRT_TROUSERS = Arrays.asList(
|
||||
CollectionLevel2TypeEnum.SKIRT.getRealName(), CollectionLevel2TypeEnum.TROUSERS.getRealName());
|
||||
|
||||
public static List<String> TOPS = Arrays.asList(
|
||||
"Tops");
|
||||
|
||||
public static List<String> BOTTOMS = Arrays.asList(
|
||||
"Bottoms");
|
||||
|
||||
public static List<String> SYS_HAIRSTYLE_SHOES_BODY = Arrays.asList(
|
||||
SysFileLevel2TypeEnum.HAIRSTYLE.getRealName(), SysFileLevel2TypeEnum.SHOES.getRealName(),
|
||||
SysFileLevel2TypeEnum.EARRINGS.getRealName(),SysFileLevel2TypeEnum.BODY.getRealName());
|
||||
|
||||
Reference in New Issue
Block a user