提交修改
This commit is contained in:
parent
a5963ba1a9
commit
fe8c61b9e4
@ -1,16 +1,15 @@
|
||||
package com.heyu.api.data.entity.vv;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.lz.mybatis.plugin.annotations.AS;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;import java.util.Date;
|
||||
import java.util.Date;
|
||||
/**
|
||||
*评论表
|
||||
* @author quyixiao
|
||||
* @since 2025-10-14
|
||||
* @since 2025-10-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -42,6 +41,7 @@ private static final long serialVersionUID = 1L;
|
||||
public final static String buyer_name = CLASS_NAME + "buyer_name"; // 买家名称
|
||||
public final static String buyer_phone = CLASS_NAME + "buyer_phone"; // 买家手机号
|
||||
public final static String track_number = CLASS_NAME + "track_number"; // 包裹id
|
||||
public final static String is_system = CLASS_NAME + "is_system"; // 是否是系统评论
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
@ -85,6 +85,8 @@ private static final long serialVersionUID = 1L;
|
||||
private String buyerPhone;
|
||||
//包裹id
|
||||
private String trackNumber;
|
||||
//是否是系统评论
|
||||
private Integer isSystem;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -400,6 +402,21 @@ private static final long serialVersionUID = 1L;
|
||||
this.trackNumber = trackNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否是系统评论
|
||||
* @return
|
||||
*/
|
||||
public Integer getIsSystem() {
|
||||
return isSystem;
|
||||
}
|
||||
/**
|
||||
* 是否是系统评论
|
||||
* @param isSystem
|
||||
*/
|
||||
public void setIsSystem(Integer isSystem) {
|
||||
this.isSystem = isSystem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VvCommentEntity{" +
|
||||
@ -424,6 +441,7 @@ private static final long serialVersionUID = 1L;
|
||||
",buyerName=" + buyerName +
|
||||
",buyerPhone=" + buyerPhone +
|
||||
",trackNumber=" + trackNumber +
|
||||
",isSystem=" + isSystem +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -10,7 +10,7 @@ import java.util.Date;import java.util.Date;
|
||||
/**
|
||||
*商品表
|
||||
* @author quyixiao
|
||||
* @since 2025-10-14
|
||||
* @since 2025-10-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -44,9 +44,16 @@ private static final long serialVersionUID = 1L;
|
||||
public final static String admin_category_id3 = CLASS_NAME + "admin_category_id3"; // admin3级类目
|
||||
public final static String admin_category_id4 = CLASS_NAME + "admin_category_id4"; // admin4级类目
|
||||
public final static String admin_category_id5 = CLASS_NAME + "admin_category_id5"; // admin5级类目
|
||||
public final static String admin_category_id6 = CLASS_NAME + "admin_category_id6"; // admin6级类目
|
||||
public final static String admin_category_id7 = CLASS_NAME + "admin_category_id7"; // admin7级类目
|
||||
public final static String admin_category_id8 = CLASS_NAME + "admin_category_id8"; // admin8级类目
|
||||
public final static String admin_category_id9 = CLASS_NAME + "admin_category_id9"; // admin9级类目
|
||||
public final static String seller_id = CLASS_NAME + "seller_id"; // 商家id
|
||||
public final static String is_test = CLASS_NAME + "is_test"; // 是否是测试单
|
||||
public final static String show_promotion_price = CLASS_NAME + "show_promotion_price"; // 促销价
|
||||
public final static String sku_id = CLASS_NAME + "sku_id"; // sku_id
|
||||
public final static String feature1_ = CLASS_NAME + "feature1"; // 特色1
|
||||
public final static String feature2_ = CLASS_NAME + "feature2"; // 特色2
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
@ -85,21 +92,35 @@ private static final long serialVersionUID = 1L;
|
||||
//app三级类目
|
||||
private Integer appCategoryId3;
|
||||
//admin1级类目
|
||||
private String adminCategoryId1;
|
||||
private Integer adminCategoryId1;
|
||||
//admin2级类目
|
||||
private String adminCategoryId2;
|
||||
private Integer adminCategoryId2;
|
||||
//admin3级类目
|
||||
private String adminCategoryId3;
|
||||
private Integer adminCategoryId3;
|
||||
//admin4级类目
|
||||
private String adminCategoryId4;
|
||||
private Integer adminCategoryId4;
|
||||
//admin5级类目
|
||||
private String adminCategoryId5;
|
||||
private Integer adminCategoryId5;
|
||||
//admin6级类目
|
||||
private Integer adminCategoryId6;
|
||||
//admin7级类目
|
||||
private Integer adminCategoryId7;
|
||||
//admin8级类目
|
||||
private Integer adminCategoryId8;
|
||||
//admin9级类目
|
||||
private Integer adminCategoryId9;
|
||||
//商家id
|
||||
private Long sellerId;
|
||||
//是否是测试单
|
||||
private Integer isTest;
|
||||
//促销价
|
||||
private BigDecimal showPromotionPrice;
|
||||
//sku_id
|
||||
private Long skuId;
|
||||
//特色1
|
||||
private String feature1;
|
||||
//特色2
|
||||
private String feature2;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -374,14 +395,14 @@ private static final long serialVersionUID = 1L;
|
||||
* admin1级类目
|
||||
* @return
|
||||
*/
|
||||
public String getAdminCategoryId1() {
|
||||
public Integer getAdminCategoryId1() {
|
||||
return adminCategoryId1;
|
||||
}
|
||||
/**
|
||||
* admin1级类目
|
||||
* @param adminCategoryId1
|
||||
*/
|
||||
public void setAdminCategoryId1(String adminCategoryId1) {
|
||||
public void setAdminCategoryId1(Integer adminCategoryId1) {
|
||||
this.adminCategoryId1 = adminCategoryId1;
|
||||
}
|
||||
|
||||
@ -389,14 +410,14 @@ private static final long serialVersionUID = 1L;
|
||||
* admin2级类目
|
||||
* @return
|
||||
*/
|
||||
public String getAdminCategoryId2() {
|
||||
public Integer getAdminCategoryId2() {
|
||||
return adminCategoryId2;
|
||||
}
|
||||
/**
|
||||
* admin2级类目
|
||||
* @param adminCategoryId2
|
||||
*/
|
||||
public void setAdminCategoryId2(String adminCategoryId2) {
|
||||
public void setAdminCategoryId2(Integer adminCategoryId2) {
|
||||
this.adminCategoryId2 = adminCategoryId2;
|
||||
}
|
||||
|
||||
@ -404,14 +425,14 @@ private static final long serialVersionUID = 1L;
|
||||
* admin3级类目
|
||||
* @return
|
||||
*/
|
||||
public String getAdminCategoryId3() {
|
||||
public Integer getAdminCategoryId3() {
|
||||
return adminCategoryId3;
|
||||
}
|
||||
/**
|
||||
* admin3级类目
|
||||
* @param adminCategoryId3
|
||||
*/
|
||||
public void setAdminCategoryId3(String adminCategoryId3) {
|
||||
public void setAdminCategoryId3(Integer adminCategoryId3) {
|
||||
this.adminCategoryId3 = adminCategoryId3;
|
||||
}
|
||||
|
||||
@ -419,14 +440,14 @@ private static final long serialVersionUID = 1L;
|
||||
* admin4级类目
|
||||
* @return
|
||||
*/
|
||||
public String getAdminCategoryId4() {
|
||||
public Integer getAdminCategoryId4() {
|
||||
return adminCategoryId4;
|
||||
}
|
||||
/**
|
||||
* admin4级类目
|
||||
* @param adminCategoryId4
|
||||
*/
|
||||
public void setAdminCategoryId4(String adminCategoryId4) {
|
||||
public void setAdminCategoryId4(Integer adminCategoryId4) {
|
||||
this.adminCategoryId4 = adminCategoryId4;
|
||||
}
|
||||
|
||||
@ -434,17 +455,77 @@ private static final long serialVersionUID = 1L;
|
||||
* admin5级类目
|
||||
* @return
|
||||
*/
|
||||
public String getAdminCategoryId5() {
|
||||
public Integer getAdminCategoryId5() {
|
||||
return adminCategoryId5;
|
||||
}
|
||||
/**
|
||||
* admin5级类目
|
||||
* @param adminCategoryId5
|
||||
*/
|
||||
public void setAdminCategoryId5(String adminCategoryId5) {
|
||||
public void setAdminCategoryId5(Integer adminCategoryId5) {
|
||||
this.adminCategoryId5 = adminCategoryId5;
|
||||
}
|
||||
|
||||
/**
|
||||
* admin6级类目
|
||||
* @return
|
||||
*/
|
||||
public Integer getAdminCategoryId6() {
|
||||
return adminCategoryId6;
|
||||
}
|
||||
/**
|
||||
* admin6级类目
|
||||
* @param adminCategoryId6
|
||||
*/
|
||||
public void setAdminCategoryId6(Integer adminCategoryId6) {
|
||||
this.adminCategoryId6 = adminCategoryId6;
|
||||
}
|
||||
|
||||
/**
|
||||
* admin7级类目
|
||||
* @return
|
||||
*/
|
||||
public Integer getAdminCategoryId7() {
|
||||
return adminCategoryId7;
|
||||
}
|
||||
/**
|
||||
* admin7级类目
|
||||
* @param adminCategoryId7
|
||||
*/
|
||||
public void setAdminCategoryId7(Integer adminCategoryId7) {
|
||||
this.adminCategoryId7 = adminCategoryId7;
|
||||
}
|
||||
|
||||
/**
|
||||
* admin8级类目
|
||||
* @return
|
||||
*/
|
||||
public Integer getAdminCategoryId8() {
|
||||
return adminCategoryId8;
|
||||
}
|
||||
/**
|
||||
* admin8级类目
|
||||
* @param adminCategoryId8
|
||||
*/
|
||||
public void setAdminCategoryId8(Integer adminCategoryId8) {
|
||||
this.adminCategoryId8 = adminCategoryId8;
|
||||
}
|
||||
|
||||
/**
|
||||
* admin9级类目
|
||||
* @return
|
||||
*/
|
||||
public Integer getAdminCategoryId9() {
|
||||
return adminCategoryId9;
|
||||
}
|
||||
/**
|
||||
* admin9级类目
|
||||
* @param adminCategoryId9
|
||||
*/
|
||||
public void setAdminCategoryId9(Integer adminCategoryId9) {
|
||||
this.adminCategoryId9 = adminCategoryId9;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商家id
|
||||
* @return
|
||||
@ -490,6 +571,51 @@ private static final long serialVersionUID = 1L;
|
||||
this.showPromotionPrice = showPromotionPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* sku_id
|
||||
* @return
|
||||
*/
|
||||
public Long getSkuId() {
|
||||
return skuId;
|
||||
}
|
||||
/**
|
||||
* sku_id
|
||||
* @param skuId
|
||||
*/
|
||||
public void setSkuId(Long skuId) {
|
||||
this.skuId = skuId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 特色1
|
||||
* @return
|
||||
*/
|
||||
public String getFeature1() {
|
||||
return feature1;
|
||||
}
|
||||
/**
|
||||
* 特色1
|
||||
* @param feature1
|
||||
*/
|
||||
public void setFeature1(String feature1) {
|
||||
this.feature1 = feature1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 特色2
|
||||
* @return
|
||||
*/
|
||||
public String getFeature2() {
|
||||
return feature2;
|
||||
}
|
||||
/**
|
||||
* 特色2
|
||||
* @param feature2
|
||||
*/
|
||||
public void setFeature2(String feature2) {
|
||||
this.feature2 = feature2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VvProductEntity{" +
|
||||
@ -516,9 +642,16 @@ private static final long serialVersionUID = 1L;
|
||||
",adminCategoryId3=" + adminCategoryId3 +
|
||||
",adminCategoryId4=" + adminCategoryId4 +
|
||||
",adminCategoryId5=" + adminCategoryId5 +
|
||||
",adminCategoryId6=" + adminCategoryId6 +
|
||||
",adminCategoryId7=" + adminCategoryId7 +
|
||||
",adminCategoryId8=" + adminCategoryId8 +
|
||||
",adminCategoryId9=" + adminCategoryId9 +
|
||||
",sellerId=" + sellerId +
|
||||
",isTest=" + isTest +
|
||||
",showPromotionPrice=" + showPromotionPrice +
|
||||
",skuId=" + skuId +
|
||||
",feature1=" + feature1 +
|
||||
",feature2=" + feature2 +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -1,16 +1,16 @@
|
||||
package com.heyu.api.data.entity.vv;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.lz.mybatis.plugin.annotations.AS;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;import java.util.Date;
|
||||
import java.util.Date;
|
||||
/**
|
||||
*sku详描
|
||||
* @author quyixiao
|
||||
* @since 2025-08-26
|
||||
* @since 2025-10-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -33,6 +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"; // 是否是商品首页展示的价格
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
@ -58,6 +59,8 @@ private static final long serialVersionUID = 1L;
|
||||
private Integer showSaleCount;
|
||||
//促销价格
|
||||
private BigDecimal promotionPrice;
|
||||
//是否是商品首页展示的价格
|
||||
private Integer isFront;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -238,6 +241,21 @@ private static final long serialVersionUID = 1L;
|
||||
this.promotionPrice = promotionPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否是商品首页展示的价格
|
||||
* @return
|
||||
*/
|
||||
public Integer getIsFront() {
|
||||
return isFront;
|
||||
}
|
||||
/**
|
||||
* 是否是商品首页展示的价格
|
||||
* @param isFront
|
||||
*/
|
||||
public void setIsFront(Integer isFront) {
|
||||
this.isFront = isFront;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VvSkuEntity{" +
|
||||
@ -253,6 +271,7 @@ private static final long serialVersionUID = 1L;
|
||||
",realSaleCount=" + realSaleCount +
|
||||
",showSaleCount=" + showSaleCount +
|
||||
",promotionPrice=" + promotionPrice +
|
||||
",isFront=" + isFront +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -49,7 +49,7 @@ public class MysqlMain_update {
|
||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||
|
||||
|
||||
String a = "vv_all_data";
|
||||
String a = "vv_comment";
|
||||
for (String s : a.split(",")) {
|
||||
list.add(new TablesBean(s));
|
||||
}
|
||||
|
||||
@ -88,6 +88,7 @@ public class AdminCommentController {
|
||||
Long commentId = vvCommentDTO.getId();
|
||||
VvCommentEntity vvCommentEntity = new VvCommentEntity();
|
||||
BeanUtils.copyProperties(vvCommentDTO, vvCommentEntity);
|
||||
vvCommentEntity.setIsSystem(1);
|
||||
vvCommentDao.insertOrUpdateVvComment(vvCommentEntity);
|
||||
if (commentId != null) {
|
||||
List<VvCommentDetailEntity> vvCommentDetailDB = vvCommentDetailDao.selectVvCommentDetailByCommentId(commentId);
|
||||
|
||||
@ -10,6 +10,7 @@ import com.heyu.api.data.dto.vv.VvProductDTO;
|
||||
import com.heyu.api.data.dto.vv.VvProductPropertyDTO;
|
||||
import com.heyu.api.data.dto.vv.VvSkuDTO;
|
||||
import com.heyu.api.data.entity.vv.*;
|
||||
import com.heyu.api.data.utils.NumberUtil;
|
||||
import com.heyu.api.data.utils.R;
|
||||
import com.heyu.api.utils.ISelect;
|
||||
import com.heyu.api.utils.PPageUtils;
|
||||
@ -71,8 +72,6 @@ public class AdminProductController {
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestBody VvProductRequest vvProductRequest) {
|
||||
|
||||
|
||||
PPageUtils pageUtils = PPageUtils.startPage(vvProductRequest.getPageNum(), vvProductRequest.getPageSize())
|
||||
.doSelect(new ISelect() {
|
||||
@Override
|
||||
@ -230,11 +229,8 @@ public class AdminProductController {
|
||||
@RequestMapping("/insertOrUpadate")
|
||||
public R insertOrUpadate(@RequestBody VvProductDTO vvProductDTO) {
|
||||
Long productId = vvProductDTO.getId() == null ? -1L : vvProductDTO.getId();
|
||||
|
||||
vvProductDao.insertOrUpdateVvProduct(vvProductDTO);
|
||||
|
||||
List<VvProductDetailEntity> productDetailEntities = vvProductDetailDao.selectVvProductDetailByProductId(productId);
|
||||
|
||||
// 1. 如果传过来的参数存在,则更新 ,如果不存在 ,则直接物理删除掉
|
||||
for (VvProductDetailEntity productDetailEntity : productDetailEntities) {
|
||||
boolean flag = true;
|
||||
@ -274,6 +270,12 @@ public class AdminProductController {
|
||||
for (VvSkuDTO vvSkuDTO : vvSkuDTOS) {
|
||||
Long skuId = vvSkuDTO.getId();
|
||||
vvSkuDao.insertOrUpdateVvSku(vvSkuDTO);
|
||||
|
||||
if(NumberUtil.equals(vvSkuDTO.getIsFront(),1)){
|
||||
vvProductDTO.setSkuId(skuId);
|
||||
vvProductDTO.setShowPromotionPrice(vvSkuDTO.getPromotionPrice());
|
||||
vvProductDao.insertOrUpdateVvProduct(vvProductDTO);
|
||||
}
|
||||
/***
|
||||
* 插入
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user