提交修改

This commit is contained in:
quyixiao 2025-10-14 23:06:51 +08:00
parent 581d5c0909
commit c0934ba746
7 changed files with 84 additions and 10 deletions

View File

@ -47,4 +47,8 @@ public interface VvBuyerDao extends BaseMapper<VvBuyerEntity> {
@IF @GE Long minCreateTimestamp,
@IF @LE Long maxCreateTimestamp,
@OrderBy @IF @Column(VvBuyerEntity.create_timestamp) String createTimestampSort);
@LIMIT
VvBuyerEntity selectVvBuyerIsTestById(Long id, Integer isTest);
}

View File

@ -74,9 +74,11 @@ public interface VvProductDao extends BaseMapper<VvProductEntity> {
@IF Integer appCategoryId1,
@IF Integer appCategoryId2,
@IF Integer appCategoryId3,
@IF Integer isTest,
@IF @OrderBy(VvProductEntity.show_sale_price) String salePriceSort,
@IF @OrderBy(VvProductEntity.show_sale_count) String saleCountSort,
@IF @OrderBy(VvProductEntity.create_timestamp) String createTimestampSort);
@IF @OrderBy(VvProductEntity.create_timestamp) String createTimestampSort
);
List<VvProductEntity> selectVvProductByProductIds(@IN List<Long> id);

View File

@ -10,7 +10,7 @@ import java.util.Date;import java.util.Date;
/**
*买家信息
* @author quyixiao
* @since 2025-08-23
* @since 2025-10-14
*/
@Data
@ -30,6 +30,7 @@ private static final long serialVersionUID = 1L;
public final static String buyer_phone = CLASS_NAME + "buyer_phone"; // 买家手机号
public final static String create_timestamp = CLASS_NAME + "create_timestamp"; // 买家创建时间
public final static String modify_timestamp = CLASS_NAME + "modify_timestamp"; // 买家修改时间
public final static String is_test = CLASS_NAME + "is_test"; // 是否是测试账号
//
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ -49,6 +50,8 @@ private static final long serialVersionUID = 1L;
private Long createTimestamp;
//买家修改时间
private Long modifyTimestamp;
//是否是测试账号
private Integer isTest;
/**
*
* @return
@ -184,6 +187,21 @@ private static final long serialVersionUID = 1L;
this.modifyTimestamp = modifyTimestamp;
}
/**
* 是否是测试账号
* @return
*/
public Integer getIsTest() {
return isTest;
}
/**
* 是否是测试账号
* @param isTest
*/
public void setIsTest(Integer isTest) {
this.isTest = isTest;
}
@Override
public String toString() {
return "VvBuyerEntity{" +
@ -196,6 +214,7 @@ private static final long serialVersionUID = 1L;
",buyerPhone=" + buyerPhone +
",createTimestamp=" + createTimestamp +
",modifyTimestamp=" + modifyTimestamp +
",isTest=" + isTest +
"}";
}
}

View File

@ -10,7 +10,7 @@ import java.util.Date;import java.util.Date;
/**
*商品表
* @author quyixiao
* @since 2025-08-26
* @since 2025-10-14
*/
@Data
@ -45,6 +45,7 @@ private static final long serialVersionUID = 1L;
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 seller_id = CLASS_NAME + "seller_id"; // 商家id
public final static String is_test = CLASS_NAME + "is_test"; // 是否是测试单
//
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ -94,6 +95,8 @@ private static final long serialVersionUID = 1L;
private String adminCategoryId5;
//商家id
private Long sellerId;
//是否是测试单
private Integer isTest;
/**
*
* @return
@ -454,6 +457,21 @@ private static final long serialVersionUID = 1L;
this.sellerId = sellerId;
}
/**
* 是否是测试单
* @return
*/
public Integer getIsTest() {
return isTest;
}
/**
* 是否是测试单
* @param isTest
*/
public void setIsTest(Integer isTest) {
this.isTest = isTest;
}
@Override
public String toString() {
return "VvProductEntity{" +
@ -481,6 +499,7 @@ private static final long serialVersionUID = 1L;
",adminCategoryId4=" + adminCategoryId4 +
",adminCategoryId5=" + adminCategoryId5 +
",sellerId=" + sellerId +
",isTest=" + isTest +
"}";
}
}

View File

@ -49,7 +49,7 @@ public class MysqlMain_update {
List<TablesBean> list = new ArrayList<TablesBean>();
String a = "vv_buyer_address";
String a = "vv_buyer";
for (String s : a.split(",")) {
list.add(new TablesBean(s));
}

View File

@ -12,24 +12,20 @@ public class AppIndexPageRequest {
private int pageSize = 10;
/***
* 商品名称
*/
private String productName;
//一级类目id
private Integer categoryId1;
//二级类目
private Integer categoryId2;
//三级类目
private Integer categoryId3;
//是否是首页
private Integer frontPage;
//销售价格
//销售价格传ASC DESC
private String salePriceSort;
// 按真实销量排序传ASC DESC
@ -39,10 +35,27 @@ public class AppIndexPageRequest {
*/
private String createTimestampSort;
/***
* 如果是内部用户可传 1,如果不是内部用户你就传0
*/
private Integer isTest = 0 ;
/***
* 买家id
*/
private Long buyerId;
//是否是首页
private Integer frontPage;
/***
* 状态
*/
private String status ;
}

View File

@ -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;
@ -52,13 +53,28 @@ public class AppIndexPageController {
@Autowired
private VvProductPropertyValueDao vvProductPropertyValueDao;
@Autowired
private VvBuyerDao vvBuyerDao ;
/***
* 列表
* 列表 /app/index/page/list
*/
@RequestMapping("/page/list")
public R list(@RequestBody AppIndexPageRequest vvProductRequest) {
vvProductRequest.setFrontPage(1);
vvProductRequest.setStatus(ProductStatusEnums.online.getStatus());
if(NumberUtil.equals(vvProductRequest.getIsTest() ,1)){
Long buyerId = vvProductRequest.getBuyerId();
VvBuyerEntity vvBuyerEntity = vvBuyerDao.selectVvBuyerIsTestById(buyerId, 1);
if(vvBuyerEntity == null){
return R.error("非内部用户");
}
}
PPageUtils pageUtils = PPageUtils.startPage(vvProductRequest.getPageNum(), vvProductRequest.getPageSize())
.doSelect(new ISelect() {
@Override
@ -70,6 +86,7 @@ public class AppIndexPageController {
vvProductRequest.getCategoryId1(),
vvProductRequest.getCategoryId2(),
vvProductRequest.getCategoryId3(),
vvProductRequest.getIsTest(),
vvProductRequest.getSalePriceSort(),
vvProductRequest.getSaleCountSort(),
vvProductRequest.getCreateTimestampSort()