This commit is contained in:
quyixiao 2025-12-04 00:25:24 +08:00
parent 5c51e43806
commit 755ed1c5d5
4 changed files with 11 additions and 24 deletions

View File

@ -22,12 +22,5 @@ public class VvSkuDTO extends VvSkuEntity {
private BigDecimal discountAmount = BigDecimal.ZERO;
/***
* 是否是默认
*/
private Integer isDefault = 0 ;
}

View File

@ -10,7 +10,7 @@ import java.util.Date;import java.util.Date;
/**
*sku详描
* @author quyixiao
* @since 2025-11-21
* @since 2025-12-04
*/
@Data
@ -33,7 +33,7 @@ private static final long serialVersionUID = 1L;
public final static String real_sale_count = CLASS_NAME + "real_sale_count"; // 真实销售数量
public final static String show_sale_count = CLASS_NAME + "show_sale_count"; // 展示销售数量
public final static String promotion_price = CLASS_NAME + "promotion_price"; // 促销价格
public final static String is_front = CLASS_NAME + "is_front"; // 是否是商品首页展示的价格
public final static String is_default = CLASS_NAME + "is_default"; // 是否是商品首页展示的价格
//
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ -60,7 +60,7 @@ private static final long serialVersionUID = 1L;
//促销价格
private BigDecimal promotionPrice;
//是否是商品首页展示的价格
private Integer isFront;
private Integer isDefault;
/**
*
* @return
@ -245,15 +245,15 @@ private static final long serialVersionUID = 1L;
* 是否是商品首页展示的价格
* @return
*/
public Integer getIsFront() {
return isFront;
public Integer getIsDefault() {
return isDefault;
}
/**
* 是否是商品首页展示的价格
* @param isFront
* @param isDefault
*/
public void setIsFront(Integer isFront) {
this.isFront = isFront;
public void setIsDefault(Integer isDefault) {
this.isDefault = isDefault;
}
@Override
@ -271,7 +271,7 @@ private static final long serialVersionUID = 1L;
",realSaleCount=" + realSaleCount +
",showSaleCount=" + showSaleCount +
",promotionPrice=" + promotionPrice +
",isFront=" + isFront +
",isDefault=" + isDefault +
"}";
}
}

View File

@ -48,7 +48,7 @@ public class MysqlMain_update {
}
List<TablesBean> list = new ArrayList<TablesBean>();
list.add(new TablesBean("vv_comment"));
list.add(new TablesBean("vv_sku"));
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
for (int i = 0; i < list.size(); i++) {

View File

@ -265,17 +265,11 @@ public class AdminProductController {
Long skuId = vvSkuDTO.getId();
vvSkuDTO.setProductId(productId);
vvSkuDao.insertOrUpdateVvSku(vvSkuDTO);
if (NumberUtil.equals(vvSkuDTO.getIsFront(), 1)) {
if (NumberUtil.equals(vvSkuDTO.getIsDefault(), 1)) {
vvProductDTO.setSkuId(skuId);
vvProductDTO.setShowPromotionPrice(vvSkuDTO.getPromotionPrice());
vvProductDao.insertOrUpdateVvProduct(vvProductDTO);
}
if (NumberUtil.equals(vvSkuDTO.getIsFront(), 1)) {
productSkuId = vvSkuDTO.getId();
}
/***
* 更新
*/