From 9d1a8cc632d8b6969b984b5f586548ddd68f39fc Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Fri, 01 Aug 2025 11:29:32 +0800
Subject: [PATCH] feat(ai): 新增产品知识点关系模块并更新产品角色模型
---
src/main/java/cc/mrbird/febs/mall/service/impl/ClothesTypeServiceImpl.java | 140 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 140 insertions(+), 0 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ClothesTypeServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ClothesTypeServiceImpl.java
index 47645d3..25e79e9 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/ClothesTypeServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ClothesTypeServiceImpl.java
@@ -215,6 +215,10 @@
clothesPattern.setOrderNum(dto.getOrderNum());
clothesPattern.setImage(dto.getImage());
clothesPattern.setContent(dto.getContent());
+ clothesPattern.setBoxWidth(dto.getBoxWidth());
+ clothesPattern.setBoxHeight(dto.getBoxHeight());
+ clothesPattern.setLeftPercent(dto.getLeftPercent());
+ clothesPattern.setTopPercent(dto.getTopPercent());
clothesPatternMapper.insert(clothesPattern);
return new FebsResponse().success().message("操作成功");
}
@@ -233,6 +237,11 @@
.set(ClothesPattern::getContent, dto.getContent())
.set(ClothesPattern::getOrderNum, dto.getOrderNum())
.set(ClothesPattern::getPrice, dto.getPrice())
+ .set(ClothesPattern::getBoxHeight, dto.getBoxHeight())
+ .set(ClothesPattern::getBoxWidth, dto.getBoxWidth())
+ .set(ClothesPattern::getLeftPercent, dto.getLeftPercent())
+ .set(ClothesPattern::getTopPercent, dto.getTopPercent())
+
);
}
return new FebsResponse().success().message("操作成功");
@@ -255,6 +264,10 @@
clothesLocation.setContent(dto.getContent());
clothesLocation.setPrice(dto.getPrice());
clothesLocation.setOrderNum(dto.getOrderNum());
+ clothesLocation.setBoxHeight(dto.getBoxHeight());
+ clothesLocation.setBoxWidth(dto.getBoxWidth());
+ clothesLocation.setLeftPercent(dto.getLeftPercent());
+ clothesLocation.setTopPercent(dto.getTopPercent());
clothesLocationMapper.insert(clothesLocation);
return new FebsResponse().success().message("操作成功");
}
@@ -273,6 +286,10 @@
.set(ClothesLocation::getPrice, dto.getPrice())
.set(ClothesLocation::getImage, dto.getImage())
.set(ClothesLocation::getContent, dto.getContent())
+ .set(ClothesLocation::getBoxHeight, dto.getBoxHeight())
+ .set(ClothesLocation::getBoxWidth, dto.getBoxWidth())
+ .set(ClothesLocation::getLeftPercent, dto.getLeftPercent())
+ .set(ClothesLocation::getTopPercent, dto.getTopPercent())
);
}
return new FebsResponse().success().message("操作成功");
@@ -977,6 +994,8 @@
entity.setContent(dto.getContent());
entity.setIndexFile(dto.getIndexFile());
entity.setOrderCnt(dto.getOrderCnt());
+ entity.setLikeCnt(dto.getLikeCnt());
+ entity.setCollectCnt(dto.getCollectCnt());
clothesSocialMapper.updateById(entity);
@@ -1239,4 +1258,125 @@
return new FebsResponse().success().data(objectObjectHashMap);
}
+ @Override
+ public AdminClothesPrintOrderVo printOrderEvent(AdminClothesPrintOrderDto dto) {
+
+ AdminClothesPrintOrderVo vo = new AdminClothesPrintOrderVo();
+
+ ClothesOrder order = clothesOrderMapper.selectById(dto.getId());
+ if (ObjectUtil.isNotNull(order)){
+ vo.setOrderNo(order.getOrderNo());
+ }
+ ClothesType clothesType = clothesTypeMapper.selectById(order.getTypeId());
+ if (ObjectUtil.isNotNull(clothesType)) {
+ vo.setTypeName(clothesType.getName());
+ vo.setTypeFront(clothesType.getImageFront());
+ vo.setTypeBack(clothesType.getImageBack());
+ }
+ List<ClothesOrderItem> clothesOrderItems = clothesOrderItemMapper.selectList(
+ Wrappers.lambdaQuery(ClothesOrderItem.class)
+ .eq(ClothesOrderItem::getOrderId, order.getId())
+ );
+ if(CollUtil.isNotEmpty(clothesOrderItems)){
+ String nullStr = "暂无";
+ List<AdminClothesPrintLocationVo> locations = new ArrayList<>();
+ List<AdminClothesPrintPatternVo> patterns = new ArrayList<>();
+ for (ClothesOrderItem item : clothesOrderItems){
+ if (ClothesOrderItemEnum.CLOTH.getCode() == item.getType()) {
+ ClothesCloth cloth = clothesClothMapper.selectById(item.getItemId());
+ if (ObjectUtil.isNotNull(cloth)) {
+ vo.setClothCode(cloth.getCode());
+ vo.setClothName(cloth.getName());
+ }else{
+ vo.setClothCode(nullStr);
+ vo.setClothName(nullStr);
+ }
+ continue;
+ } else if (ClothesOrderItemEnum.SIZE.getCode() == item.getType()) {
+ ClothesSize size = clothesSizeMapper.selectById(item.getItemId());
+ if (ObjectUtil.isNotNull(size)) {
+ vo.setSizeName(size.getName());
+ vo.setSizeCode(size.getCode());
+ }else {
+ vo.setSizeName(nullStr);
+ vo.setSizeCode(nullStr);
+ }
+ continue;
+ } else if (ClothesOrderItemEnum.LOCATION.getCode() == item.getType()) {
+ AdminClothesPrintLocationVo locationVo = new AdminClothesPrintLocationVo();
+ ClothesLocation location = clothesLocationMapper.selectById(item.getItemId());
+ if (ObjectUtil.isNotNull(location)) {
+ locationVo.setLocationName(location.getName());
+ locationVo.setLocationCode(location.getCode());
+
+ JSON parse = JSONUtil.parse(item.getRemark());
+ locationVo.setLocationText(parse.getByPath("text", String.class));
+ locationVo.setLocationImage(parse.getByPath("file", String.class));
+ }else{
+ locationVo.setLocationName(nullStr);
+ locationVo.setLocationCode(nullStr);
+ locationVo.setLocationText(nullStr);
+ locationVo.setLocationImage(nullStr);
+ }
+ locations.add(locationVo);
+ vo.setLocations( locations);
+ continue;
+ } else if (ClothesOrderItemEnum.PATTERN.getCode() == item.getType()) {
+ AdminClothesPrintPatternVo patternVo = new AdminClothesPrintPatternVo();
+
+ ClothesPattern pattern = clothesPatternMapper.selectById(item.getItemId());
+ if (ObjectUtil.isNotNull(pattern)) {
+ patternVo.setPatternName(pattern.getName());
+ patternVo.setPatternCode(pattern.getCode());
+
+ JSON parse = JSONUtil.parse(item.getRemark());
+ patternVo.setPatternText(parse.getByPath("text", String.class));
+ patternVo.setPatternImage(parse.getByPath("file", String.class));
+ }else{
+ patternVo.setPatternName(nullStr);
+ patternVo.setPatternCode(nullStr);
+ patternVo.setPatternText(nullStr);
+ patternVo.setPatternImage(nullStr);
+ }
+ patterns.add(patternVo);
+ vo.setPatterns( patterns);
+ continue;
+ } else if (ClothesOrderItemEnum.ART.getCode() == item.getType()) {
+ ClothesArt art = clothesArtMapper.selectById(item.getItemId());
+ if (ObjectUtil.isNotNull(art)) {
+ vo.setArtName(art.getName());
+ vo.setArtCode(art.getCode());
+ }else{
+ vo.setArtName(nullStr);
+ vo.setArtCode(nullStr);
+ }
+ continue;
+ } else if (ClothesOrderItemEnum.CUSTOMIZE.getCode() == item.getType()) {
+ AdminClothesPrintMemberStatureVo memberStature = new AdminClothesPrintMemberStatureVo();
+ ClothesMemberStature clothesMemberStature = clothesMemberStatureMapper.selectById(item.getItemId());
+ if (ObjectUtil.isNotNull(clothesMemberStature)) {
+ memberStature.setName(clothesMemberStature.getName());
+ memberStature.setHeightLine(clothesMemberStature.getHeightLine());
+ memberStature.setBustLine(clothesMemberStature.getBustLine());
+ memberStature.setWaistLine(clothesMemberStature.getWaistLine());
+ memberStature.setWideLine(clothesMemberStature.getWideLine());
+ memberStature.setHipLine(clothesMemberStature.getHipLine());
+ }else{
+ memberStature.setName(nullStr);
+ memberStature.setHeightLine(BigDecimal.ZERO);
+ memberStature.setBustLine(BigDecimal.ZERO);
+ memberStature.setWaistLine(BigDecimal.ZERO);
+ memberStature.setWideLine(BigDecimal.ZERO);
+ memberStature.setHipLine(BigDecimal.ZERO);
+ }
+ vo.setMemberStature(memberStature);
+ continue;
+ } else {
+ continue;
+ }
+ }
+ }
+ return vo;
+ }
+
}
--
Gitblit v1.9.1