From 56e264287413217c07b8f5cd7759a41bb4ba81e4 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Fri, 25 Jul 2025 14:02:42 +0800
Subject: [PATCH] feat(clothes): 添加衣服图案和位置的框尺寸和百分比属性
---
src/main/resources/templates/febs/views/modules/clothesType/patternAdd.html | 41 ++++++++++
src/main/java/cc/mrbird/febs/mall/vo/clothes/ApiClothesPatternVo.java | 5 +
src/main/resources/templates/febs/views/modules/clothesType/locationAdd.html | 40 ++++++++++
src/main/resources/templates/febs/views/modules/clothesType/locationInfo.html | 44 +++++++++++
src/main/java/cc/mrbird/febs/mall/vo/clothes/ApiClothesLocationVo.java | 5 +
src/main/java/cc/mrbird/febs/mall/entity/ClothesLocation.java | 4 +
src/main/resources/mapper/modules/ClothesTypeLocationMapper.xml | 6 +
src/main/java/cc/mrbird/febs/mall/service/impl/ClothesTypeServiceImpl.java | 17 ++++
src/main/resources/mapper/modules/ClothesTypePatternMapper.xml | 6 +
src/main/java/cc/mrbird/febs/mall/entity/ClothesPattern.java | 4 +
src/main/resources/templates/febs/views/modules/clothesType/patternInfo.html | 47 +++++++++++
11 files changed, 217 insertions(+), 2 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/mall/entity/ClothesLocation.java b/src/main/java/cc/mrbird/febs/mall/entity/ClothesLocation.java
index 6a53f71..5054437 100644
--- a/src/main/java/cc/mrbird/febs/mall/entity/ClothesLocation.java
+++ b/src/main/java/cc/mrbird/febs/mall/entity/ClothesLocation.java
@@ -23,4 +23,8 @@
private String content;
private BigDecimal price;
private Integer orderNum;
+ private Integer boxWidth;
+ private Integer boxHeight;
+ private Integer leftPercent;
+ private Integer topPercent;
}
diff --git a/src/main/java/cc/mrbird/febs/mall/entity/ClothesPattern.java b/src/main/java/cc/mrbird/febs/mall/entity/ClothesPattern.java
index 8fb2b5a..2ed1303 100644
--- a/src/main/java/cc/mrbird/febs/mall/entity/ClothesPattern.java
+++ b/src/main/java/cc/mrbird/febs/mall/entity/ClothesPattern.java
@@ -22,6 +22,10 @@
private String name;
private String image;
private String content;
+ private String boxWidth;
+ private String boxHeight;
+ private Integer leftPercent;
+ private Integer topPercent;
private BigDecimal price;
private Integer orderNum;
private Integer type;
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 c585ba9..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("操作成功");
diff --git a/src/main/java/cc/mrbird/febs/mall/vo/clothes/ApiClothesLocationVo.java b/src/main/java/cc/mrbird/febs/mall/vo/clothes/ApiClothesLocationVo.java
index e614162..d1b7c50 100644
--- a/src/main/java/cc/mrbird/febs/mall/vo/clothes/ApiClothesLocationVo.java
+++ b/src/main/java/cc/mrbird/febs/mall/vo/clothes/ApiClothesLocationVo.java
@@ -28,4 +28,9 @@
@ApiModelProperty(value = "价格")
private BigDecimal price;
+ private String boxWidth;
+ private String boxHeight;
+ private Integer leftPercent;
+ private Integer topPercent;
+
}
diff --git a/src/main/java/cc/mrbird/febs/mall/vo/clothes/ApiClothesPatternVo.java b/src/main/java/cc/mrbird/febs/mall/vo/clothes/ApiClothesPatternVo.java
index 5dc948b..0b39923 100644
--- a/src/main/java/cc/mrbird/febs/mall/vo/clothes/ApiClothesPatternVo.java
+++ b/src/main/java/cc/mrbird/febs/mall/vo/clothes/ApiClothesPatternVo.java
@@ -32,4 +32,9 @@
@ApiModelProperty(value = "类型 1-仅文字 2-仅图案 3-文字加图案")
private Integer type;
+ private String boxWidth;
+ private String boxHeight;
+ private Integer leftPercent;
+ private Integer topPercent;
+
}
diff --git a/src/main/resources/mapper/modules/ClothesTypeLocationMapper.xml b/src/main/resources/mapper/modules/ClothesTypeLocationMapper.xml
index 4316b5e..571cc3d 100644
--- a/src/main/resources/mapper/modules/ClothesTypeLocationMapper.xml
+++ b/src/main/resources/mapper/modules/ClothesTypeLocationMapper.xml
@@ -9,7 +9,11 @@
b.name as name,
b.image as image,
b.content as content,
- b.price as price
+ b.price as price,
+ b.box_width as boxWidth,
+ b.box_height as boxHeight,
+ b.left_percent as leftPercent,
+ b.top_percent as topPercent
from clothes_type_location a
left join clothes_location b on a.location_id = b.id
<where>
diff --git a/src/main/resources/mapper/modules/ClothesTypePatternMapper.xml b/src/main/resources/mapper/modules/ClothesTypePatternMapper.xml
index b580905..4a70dae 100644
--- a/src/main/resources/mapper/modules/ClothesTypePatternMapper.xml
+++ b/src/main/resources/mapper/modules/ClothesTypePatternMapper.xml
@@ -11,7 +11,11 @@
b.image as image,
b.content as content,
b.type as type,
- b.price as price
+ b.price as price,
+ b.box_width as boxWidth,
+ b.box_height as boxHeight,
+ b.left_percent as leftPercent,
+ b.top_percent as topPercent
from clothes_type_pattern a
left join clothes_pattern b on a.pattern_id = b.id
<where>
diff --git a/src/main/resources/templates/febs/views/modules/clothesType/locationAdd.html b/src/main/resources/templates/febs/views/modules/clothesType/locationAdd.html
index 3a4640a..2b3b8c1 100644
--- a/src/main/resources/templates/febs/views/modules/clothesType/locationAdd.html
+++ b/src/main/resources/templates/febs/views/modules/clothesType/locationAdd.html
@@ -81,6 +81,46 @@
</div>
</div>
+ <div class="layui-row layui-col-space10 layui-form-item">
+ <div class="layui-col-lg6">
+ <label class="layui-form-label febs-form-item-require">高度:</label>
+ <div class="layui-input-block">
+ <input type="text" name="boxHeight" lay-verify="required"
+ placeholder="" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ </div>
+
+ <div class="layui-row layui-col-space10 layui-form-item">
+ <div class="layui-col-lg6">
+ <label class="layui-form-label febs-form-item-require">宽度:</label>
+ <div class="layui-input-block">
+ <input type="text" name="boxWidth" lay-verify="required"
+ placeholder="" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ </div>
+ <div class="layui-row layui-col-space10 layui-form-item">
+ <div class="layui-col-lg6">
+ <label class="layui-form-label febs-form-item-require">左边距:</label>
+ <div class="layui-input-block">
+ <input type="text" name="leftPercent" lay-verify="required"
+ placeholder="" autocomplete="off" class="layui-input">
+ <div class="layui-form-mid layui-word-aux">百分比</div>
+ </div>
+ </div>
+ </div>
+ <div class="layui-row layui-col-space10 layui-form-item">
+ <div class="layui-col-lg6">
+ <label class="layui-form-label febs-form-item-require">右边距:</label>
+ <div class="layui-input-block">
+ <input type="text" name="topPercent" lay-verify="required"
+ placeholder="" autocomplete="off" class="layui-input">
+ <div class="layui-form-mid layui-word-aux">百分比</div>
+ </div>
+ </div>
+ </div>
+
</div>
</div>
</div>
diff --git a/src/main/resources/templates/febs/views/modules/clothesType/locationInfo.html b/src/main/resources/templates/febs/views/modules/clothesType/locationInfo.html
index 5714f84..59ba63a 100644
--- a/src/main/resources/templates/febs/views/modules/clothesType/locationInfo.html
+++ b/src/main/resources/templates/febs/views/modules/clothesType/locationInfo.html
@@ -83,6 +83,46 @@
</div>
</div>
+ <div class="layui-row layui-col-space10 layui-form-item">
+ <div class="layui-col-lg6">
+ <label class="layui-form-label febs-form-item-require">高度:</label>
+ <div class="layui-input-block">
+ <input type="text" name="boxHeight" lay-verify="required"
+ placeholder="" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ </div>
+
+ <div class="layui-row layui-col-space10 layui-form-item">
+ <div class="layui-col-lg6">
+ <label class="layui-form-label febs-form-item-require">宽度:</label>
+ <div class="layui-input-block">
+ <input type="text" name="boxWidth" lay-verify="required"
+ placeholder="" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ </div>
+ <div class="layui-row layui-col-space10 layui-form-item">
+ <div class="layui-col-lg6">
+ <label class="layui-form-label febs-form-item-require">左边距:</label>
+ <div class="layui-input-block">
+ <input type="text" name="leftPercent" lay-verify="required"
+ placeholder="" autocomplete="off" class="layui-input">
+ <div class="layui-form-mid layui-word-aux">百分比</div>
+ </div>
+ </div>
+ </div>
+ <div class="layui-row layui-col-space10 layui-form-item">
+ <div class="layui-col-lg6">
+ <label class="layui-form-label febs-form-item-require">右边距:</label>
+ <div class="layui-input-block">
+ <input type="text" name="topPercent" lay-verify="required"
+ placeholder="" autocomplete="off" class="layui-input">
+ <div class="layui-form-mid layui-word-aux">百分比</div>
+ </div>
+ </div>
+ </div>
+
</div>
</div>
</div>
@@ -178,6 +218,10 @@
"code": clothesLocation.code,
"price": clothesLocation.price,
"orderNum": clothesLocation.orderNum,
+ "leftPercent": clothesLocation.leftPercent,
+ "topPercent": clothesLocation.topPercent,
+ "boxWidth": clothesLocation.boxWidth,
+ "boxHeight": clothesLocation.boxHeight,
});
diff --git a/src/main/resources/templates/febs/views/modules/clothesType/patternAdd.html b/src/main/resources/templates/febs/views/modules/clothesType/patternAdd.html
index f78993c..f9cd7fb 100644
--- a/src/main/resources/templates/febs/views/modules/clothesType/patternAdd.html
+++ b/src/main/resources/templates/febs/views/modules/clothesType/patternAdd.html
@@ -94,6 +94,47 @@
</div>
</div>
+
+ <div class="layui-row layui-col-space10 layui-form-item">
+ <div class="layui-col-lg6">
+ <label class="layui-form-label febs-form-item-require">高度:</label>
+ <div class="layui-input-block">
+ <input type="text" name="boxHeight" lay-verify="required"
+ placeholder="" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ </div>
+
+ <div class="layui-row layui-col-space10 layui-form-item">
+ <div class="layui-col-lg6">
+ <label class="layui-form-label febs-form-item-require">宽度:</label>
+ <div class="layui-input-block">
+ <input type="text" name="boxWidth" lay-verify="required"
+ placeholder="" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ </div>
+ <div class="layui-row layui-col-space10 layui-form-item">
+ <div class="layui-col-lg6">
+ <label class="layui-form-label febs-form-item-require">左边距:</label>
+ <div class="layui-input-block">
+ <input type="text" name="leftPercent" lay-verify="required"
+ placeholder="" autocomplete="off" class="layui-input">
+ <div class="layui-form-mid layui-word-aux">百分比</div>
+ </div>
+ </div>
+ </div>
+ <div class="layui-row layui-col-space10 layui-form-item">
+ <div class="layui-col-lg6">
+ <label class="layui-form-label febs-form-item-require">右边距:</label>
+ <div class="layui-input-block">
+ <input type="text" name="topPercent" lay-verify="required"
+ placeholder="" autocomplete="off" class="layui-input">
+ <div class="layui-form-mid layui-word-aux">百分比</div>
+ </div>
+ </div>
+ </div>
+
</div>
</div>
</div>
diff --git a/src/main/resources/templates/febs/views/modules/clothesType/patternInfo.html b/src/main/resources/templates/febs/views/modules/clothesType/patternInfo.html
index b5ae00e..626122e 100644
--- a/src/main/resources/templates/febs/views/modules/clothesType/patternInfo.html
+++ b/src/main/resources/templates/febs/views/modules/clothesType/patternInfo.html
@@ -96,6 +96,48 @@
</div>
</div>
+
+
+ <div class="layui-row layui-col-space10 layui-form-item">
+ <div class="layui-col-lg6">
+ <label class="layui-form-label febs-form-item-require">高度:</label>
+ <div class="layui-input-block">
+ <input type="text" name="boxHeight" lay-verify="required"
+ placeholder="" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ </div>
+
+ <div class="layui-row layui-col-space10 layui-form-item">
+ <div class="layui-col-lg6">
+ <label class="layui-form-label febs-form-item-require">宽度:</label>
+ <div class="layui-input-block">
+ <input type="text" name="boxWidth" lay-verify="required"
+ placeholder="" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ </div>
+ <div class="layui-row layui-col-space10 layui-form-item">
+ <div class="layui-col-lg6">
+ <label class="layui-form-label febs-form-item-require">左边距:</label>
+ <div class="layui-input-block">
+ <input type="text" name="leftPercent" lay-verify="required"
+ placeholder="" autocomplete="off" class="layui-input">
+ <div class="layui-form-mid layui-word-aux">百分比</div>
+ </div>
+ </div>
+ </div>
+ <div class="layui-row layui-col-space10 layui-form-item">
+ <div class="layui-col-lg6">
+ <label class="layui-form-label febs-form-item-require">右边距:</label>
+ <div class="layui-input-block">
+ <input type="text" name="topPercent" lay-verify="required"
+ placeholder="" autocomplete="off" class="layui-input">
+ <div class="layui-form-mid layui-word-aux">百分比</div>
+ </div>
+ </div>
+ </div>
+
</div>
</div>
</div>
@@ -191,6 +233,11 @@
"code": clothesPattern.code,
"price": clothesPattern.price,
"orderNum": clothesPattern.orderNum,
+ "leftPercent": clothesPattern.leftPercent,
+ "topPercent": clothesPattern.topPercent,
+ "boxWidth": clothesPattern.boxWidth,
+ "boxHeight": clothesPattern.boxHeight,
+
});
--
Gitblit v1.9.1