1. add magnet
This commit is contained in:
2026-11-28 13:10:27 +08:00
parent 2f2142d7cc
commit 453c06d4f4
9 changed files with 48 additions and 1 deletions

7
doc/sql/update.sql Normal file
View File

@@ -0,0 +1,7 @@
# 2026-11-28
alter table kiosk_price_list add magnet int default 1 null after stand_price;
alter table kiosk_price_list add magnet_price decimal(10, 2) default 0 null after magnet;
alter table kiosk_order_detail add magnet int default 2 null after stand;

View File

@@ -7,7 +7,6 @@
<result column="id" property="id"/>
<result column="tenant_id" property="tenantId"/>
<result column="order_id" property="orderId"/>
<result column="category_id" property="categoryId"/>
<result column="category_type" property="categoryType"/>
<result column="category_name" property="categoryName"/>
<result column="material" property="material"/>

View File

@@ -39,6 +39,8 @@ public class OrderApiRequest implements Serializable {
private Boolean extraStand;
private Boolean extraMagnet;
private Boolean sizeUp;
private Boolean materialUp;

View File

@@ -147,6 +147,11 @@ public class OrderDetailEntity extends TenantEntity {
*/
@Schema(description = "支架")
private Integer stand;
/**
* 磁吸
*/
@Schema(description = "磁吸")
private Integer magnet;
/**
* 数量
*/

View File

@@ -151,6 +151,16 @@ public class PriceListEntity extends TenantEntity {
*/
@Schema(description = "支架价格")
private BigDecimal standPrice;
/**
* 磁吸
*/
@Schema(description = "磁吸")
private Integer magnet;
/**
* 磁吸价格
*/
@Schema(description = "磁吸价格")
private BigDecimal magnetPrice;
/**
* 目标部门
*/

View File

@@ -60,6 +60,8 @@ public class OrderDetailVO extends TenantEntity {
private String size;
private String sizeDesc;
private String tag;
private String shape;

View File

@@ -84,6 +84,10 @@ public class PriceListApiVO implements Serializable {
private BigDecimal standPrice;
private Boolean magnet;
private BigDecimal magnetPrice;
private String tag;
}

View File

@@ -148,6 +148,16 @@ public class PriceListVO extends TenantEntity {
*/
@Schema(description = "支架价格")
private BigDecimal standPrice;
/**
* 磁吸
*/
@Schema(description = "磁吸")
private Integer magnet;
/**
* 磁吸价格
*/
@Schema(description = "磁吸价格")
private BigDecimal magnetPrice;
/**
* 目标部门
*/

View File

@@ -272,6 +272,14 @@ public class KioskServiceImpl implements IKioskApiService {
detailAmount = detailAmount.add(priceList.getStandPrice());
}
if (item.getExtraMagnet()){
if (priceList.getMagnet() != 1){
throw new ServiceException("Invalid extra magnet.");
}
orderDetail.setMagnet(1);
detailAmount = detailAmount.add(priceList.getMagnetPrice());
}
PhotoAttachmentEntity snapshotPhoto = photoAttachmentService.getById(item.getSnapshot());
if (snapshotPhoto == null) {
throw new ServiceException("Invalid snapshot.");