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 BigDecimal discountAmount = BigDecimal.ZERO;
/***
* 是否是默认
*/
private Integer isDefault = 0 ;
} }

View File

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

View File

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

View File

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