update:
1. add magnet
This commit is contained in:
7
doc/sql/update.sql
Normal file
7
doc/sql/update.sql
Normal 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;
|
||||
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -39,6 +39,8 @@ public class OrderApiRequest implements Serializable {
|
||||
|
||||
private Boolean extraStand;
|
||||
|
||||
private Boolean extraMagnet;
|
||||
|
||||
private Boolean sizeUp;
|
||||
|
||||
private Boolean materialUp;
|
||||
|
||||
@@ -147,6 +147,11 @@ public class OrderDetailEntity extends TenantEntity {
|
||||
*/
|
||||
@Schema(description = "支架")
|
||||
private Integer stand;
|
||||
/**
|
||||
* 磁吸
|
||||
*/
|
||||
@Schema(description = "磁吸")
|
||||
private Integer magnet;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
|
||||
@@ -151,6 +151,16 @@ public class PriceListEntity extends TenantEntity {
|
||||
*/
|
||||
@Schema(description = "支架价格")
|
||||
private BigDecimal standPrice;
|
||||
/**
|
||||
* 磁吸
|
||||
*/
|
||||
@Schema(description = "磁吸")
|
||||
private Integer magnet;
|
||||
/**
|
||||
* 磁吸价格
|
||||
*/
|
||||
@Schema(description = "磁吸价格")
|
||||
private BigDecimal magnetPrice;
|
||||
/**
|
||||
* 目标部门
|
||||
*/
|
||||
|
||||
@@ -60,6 +60,8 @@ public class OrderDetailVO extends TenantEntity {
|
||||
|
||||
private String size;
|
||||
|
||||
private String sizeDesc;
|
||||
|
||||
private String tag;
|
||||
|
||||
private String shape;
|
||||
|
||||
@@ -84,6 +84,10 @@ public class PriceListApiVO implements Serializable {
|
||||
|
||||
private BigDecimal standPrice;
|
||||
|
||||
private Boolean magnet;
|
||||
|
||||
private BigDecimal magnetPrice;
|
||||
|
||||
private String tag;
|
||||
|
||||
}
|
||||
|
||||
@@ -148,6 +148,16 @@ public class PriceListVO extends TenantEntity {
|
||||
*/
|
||||
@Schema(description = "支架价格")
|
||||
private BigDecimal standPrice;
|
||||
/**
|
||||
* 磁吸
|
||||
*/
|
||||
@Schema(description = "磁吸")
|
||||
private Integer magnet;
|
||||
/**
|
||||
* 磁吸价格
|
||||
*/
|
||||
@Schema(description = "磁吸价格")
|
||||
private BigDecimal magnetPrice;
|
||||
/**
|
||||
* 目标部门
|
||||
*/
|
||||
|
||||
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user