TASK:模块化;

This commit is contained in:
shahaibo
2025-03-28 11:14:48 +08:00
parent 63513df053
commit 2cfd342ef8

View File

@@ -1184,31 +1184,86 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
private ProductImageAttribute toAttrDict(AttributeRecognitionJSON attrDictJSON) {
ProductImageAttribute attributeRetrieval = new ProductImageAttribute();
// attributeRetrieval.setImgName(attrDictJSON.getImgName().get(0));
// attributeRetrieval.setLength(attrDictJSON.getLength().get(0));
// attributeRetrieval.setSleeveLength(attrDictJSON.getSleeveLength().get(0));
// attributeRetrieval.setSleeveShape(attrDictJSON.getSleeveShape().get(0));
// attributeRetrieval.setSleeveShoulder(attrDictJSON.getSleeveShoulder().get(0));
// attributeRetrieval.setNeckline(attrDictJSON.getNeckline().get(0));
// attributeRetrieval.setCollar(attrDictJSON.getCollar().get(0));
// 处理 imgName
if (CollectionUtil.isNotEmpty(attrDictJSON.getImgName()) && attrDictJSON.getImgName().get(0) != null) {
attributeRetrieval.setImgName(attrDictJSON.getImgName().get(0));
}
// 处理 length
if (CollectionUtil.isNotEmpty(attrDictJSON.getLength()) && attrDictJSON.getLength().get(0) != null) {
attributeRetrieval.setLength(attrDictJSON.getLength().get(0));
}
// 处理 sleeveLength
if (CollectionUtil.isNotEmpty(attrDictJSON.getSleeveLength()) && attrDictJSON.getSleeveLength().get(0) != null) {
attributeRetrieval.setSleeveLength(attrDictJSON.getSleeveLength().get(0));
}
// 处理 sleeveShape
if (CollectionUtil.isNotEmpty(attrDictJSON.getSleeveShape()) && attrDictJSON.getSleeveShape().get(0) != null) {
attributeRetrieval.setSleeveShape(attrDictJSON.getSleeveShape().get(0));
}
// 处理 sleeveShoulder
if (CollectionUtil.isNotEmpty(attrDictJSON.getSleeveShoulder()) && attrDictJSON.getSleeveShoulder().get(0) != null) {
attributeRetrieval.setSleeveShoulder(attrDictJSON.getSleeveShoulder().get(0));
}
// 处理 neckline
if (CollectionUtil.isNotEmpty(attrDictJSON.getNeckline()) && attrDictJSON.getNeckline().get(0) != null) {
attributeRetrieval.setNeckline(attrDictJSON.getNeckline().get(0));
}
// 处理 collar
if (CollectionUtil.isNotEmpty(attrDictJSON.getCollar()) && attrDictJSON.getCollar().get(0) != null) {
attributeRetrieval.setCollar(attrDictJSON.getCollar().get(0));
}
// 处理 design
if (CollectionUtil.isNotEmpty(attrDictJSON.getDesign()) && attrDictJSON.getDesign().get(0) != null) {
attributeRetrieval.setDesign(attrDictJSON.getDesign().get(0));
}
// 处理 silhouette
if (CollectionUtil.isNotEmpty(attrDictJSON.getSilhouette()) && attrDictJSON.getSilhouette().get(0) != null) {
attributeRetrieval.setSilhouette(attrDictJSON.getSilhouette().get(0));
}
// 处理 type
if (CollectionUtil.isNotEmpty(attrDictJSON.getType()) && attrDictJSON.getType().get(0) != null) {
attributeRetrieval.setType(attrDictJSON.getType().get(0));
}
if (CollectionUtil.isNotEmpty(attrDictJSON.getSubtype()) && attrDictJSON.getSubtype().get(0) != null) {
attributeRetrieval.setSubtype(attrDictJSON.getSubtype().get(0));
}
// 处理 openingType
if (CollectionUtil.isNotEmpty(attrDictJSON.getOpeningType()) && attrDictJSON.getOpeningType().get(0) != null) {
attributeRetrieval.setOpeningType(attrDictJSON.getOpeningType().get(0));
}
// 处理 subtype
if (CollectionUtil.isNotEmpty(attrDictJSON.getSubtype()) && attrDictJSON.getSubtype().get(0) != null) {
attributeRetrieval.setSubtype(attrDictJSON.getSubtype().get(0));
}
return attributeRetrieval;
}
// private ProductImageAttribute toAttrDict(AttributeRecognitionJSON attrDictJSON) {
// ProductImageAttribute attributeRetrieval = new ProductImageAttribute();
//// attributeRetrieval.setImgName(attrDictJSON.getImgName().get(0));
//// attributeRetrieval.setLength(attrDictJSON.getLength().get(0));
//// attributeRetrieval.setSleeveLength(attrDictJSON.getSleeveLength().get(0));
//// attributeRetrieval.setSleeveShape(attrDictJSON.getSleeveShape().get(0));
//// attributeRetrieval.setSleeveShoulder(attrDictJSON.getSleeveShoulder().get(0));
//// attributeRetrieval.setNeckline(attrDictJSON.getNeckline().get(0));
//// attributeRetrieval.setCollar(attrDictJSON.getCollar().get(0));
// if (CollectionUtil.isNotEmpty(attrDictJSON.getDesign()) && attrDictJSON.getDesign().get(0) != null) {
// attributeRetrieval.setDesign(attrDictJSON.getDesign().get(0));
// }
// if (CollectionUtil.isNotEmpty(attrDictJSON.getSilhouette()) && attrDictJSON.getSilhouette().get(0) != null) {
// attributeRetrieval.setSilhouette(attrDictJSON.getSilhouette().get(0));
// }
// if (CollectionUtil.isNotEmpty(attrDictJSON.getType()) && attrDictJSON.getType().get(0) != null) {
// attributeRetrieval.setType(attrDictJSON.getType().get(0));
// }
// if (CollectionUtil.isNotEmpty(attrDictJSON.getSubtype()) && attrDictJSON.getSubtype().get(0) != null) {
// attributeRetrieval.setSubtype(attrDictJSON.getSubtype().get(0));
// }
// if (CollectionUtil.isNotEmpty(attrDictJSON.getOpeningType()) && attrDictJSON.getOpeningType().get(0) != null) {
// attributeRetrieval.setOpeningType(attrDictJSON.getOpeningType().get(0));
// }
// return attributeRetrieval;
// }
@Override
public IPage<ProjectVO> getPage(ProjectQueryDTO query) {
AuthPrincipalVo authPrincipalVo = UserContext.getUserHolder();