| Pass |
- 18:10:53 |
+ 17:37:45 |
Test passed
|
@@ -128,13 +128,13 @@
Started
-
五月 13, 2026 18:10:53
+
五月 16, 2026 17:37:44
Ended
-
五月 13, 2026 18:10:53
+
五月 16, 2026 17:37:45
diff --git a/hiver-modules/hiver-base/src/main/java/cc/hiver/base/controller/manage/AuthController.java b/hiver-modules/hiver-base/src/main/java/cc/hiver/base/controller/manage/AuthController.java
index ecb2696c..4f148dbb 100644
--- a/hiver-modules/hiver-base/src/main/java/cc/hiver/base/controller/manage/AuthController.java
+++ b/hiver-modules/hiver-base/src/main/java/cc/hiver/base/controller/manage/AuthController.java
@@ -430,6 +430,7 @@ public class AuthController {
shop.setShopLecard(registerShopVo.getShopLecard());
shop.setAliAccount(registerShopVo.getAliAccount());
shop.setAliName(registerShopVo.getAliName());
+ shop.setMerchantType(registerShopVo.getMerchantType());
shop.setRegion(registerShopVo.getRegion());
shop.setRegionId(registerShopVo.getRegionId());
shop.setIsStudent(registerShopVo.getIsStudent());
diff --git a/hiver-modules/hiver-base/src/main/java/cc/hiver/base/vo/RegisterShopVo.java b/hiver-modules/hiver-base/src/main/java/cc/hiver/base/vo/RegisterShopVo.java
index 02919aad..086871f0 100644
--- a/hiver-modules/hiver-base/src/main/java/cc/hiver/base/vo/RegisterShopVo.java
+++ b/hiver-modules/hiver-base/src/main/java/cc/hiver/base/vo/RegisterShopVo.java
@@ -17,6 +17,8 @@ public class RegisterShopVo {
private Integer isStudent;
+ private Integer merchantType;
+
private String unionid;
private String password;
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/AdminSeckillGroupController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/AdminSeckillGroupController.java
new file mode 100644
index 00000000..bb94c05a
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/AdminSeckillGroupController.java
@@ -0,0 +1,216 @@
+package cc.hiver.mall.controller;
+
+import cc.hiver.core.common.utils.ResultUtil;
+import cc.hiver.core.common.vo.Result;
+import cc.hiver.mall.entity.SeckillGroupCategory;
+import cc.hiver.mall.entity.SeckillGroupProduct;
+import cc.hiver.mall.pojo.dto.SeckillGroupProductDTO;
+import cc.hiver.mall.pojo.query.SeckillGroupProductQuery;
+import cc.hiver.mall.pojo.vo.SeckillGroupProductVO;
+import cc.hiver.mall.service.mybatis.SeckillGroupCategoryService;
+import cc.hiver.mall.service.mybatis.SeckillGroupProductService;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@Slf4j
+@RestController
+@Api(tags = "鍚庡彴绠$悊绯荤粺绉掓潃鍥㈡帴鍙")
+@RequestMapping("/hiver/mall/admin/seckillGroup")
+@Transactional
+public class AdminSeckillGroupController {
+
+ @Autowired
+ private SeckillGroupCategoryService seckillGroupCategoryService;
+
+ @Autowired
+ private SeckillGroupProductService seckillGroupProductService;
+
+ @RequestMapping(value = "/category/save", method = RequestMethod.POST)
+ @ApiOperation(value = "鏂板绉掓潃鍥㈠垎绫")
+ public Result saveCategory(@RequestBody SeckillGroupCategory category) {
+ if (category == null || StringUtils.isBlank(category.getCategoryName())) {
+ return ResultUtil.error("鍒嗙被鍚嶇О涓嶈兘涓虹┖");
+ }
+ if (StringUtils.isBlank(category.getRegionId())) {
+ return ResultUtil.error("鍖哄煙ID涓嶈兘涓虹┖");
+ }
+ category.setStatus(category.getStatus() == null ? 1 : category.getStatus());
+ category.setSort(category.getSort() == null ? 0 : category.getSort());
+ boolean result = seckillGroupCategoryService.save(category);
+ if (result) {
+ seckillGroupCategoryService.refreshCategoryCache(category.getRegionId());
+ return ResultUtil.success("娣诲姞鎴愬姛");
+ }
+ return ResultUtil.error("娣诲姞澶辫触");
+ }
+
+ @RequestMapping(value = "/category/edit", method = RequestMethod.POST)
+ @ApiOperation(value = "淇敼绉掓潃鍥㈠垎绫")
+ public Result editCategory(@RequestBody SeckillGroupCategory category) {
+ if (category == null || StringUtils.isBlank(category.getId())) {
+ return ResultUtil.error("鍒嗙被ID涓嶈兘涓虹┖");
+ }
+ SeckillGroupCategory old = seckillGroupCategoryService.getById(category.getId());
+ if (old == null) {
+ return ResultUtil.error("鍒嗙被涓嶅瓨鍦");
+ }
+ boolean result = seckillGroupCategoryService.updateById(category);
+ if (result) {
+ seckillGroupCategoryService.refreshCategoryCache(old.getRegionId());
+ if (StringUtils.isNotBlank(category.getRegionId()) && !category.getRegionId().equals(old.getRegionId())) {
+ seckillGroupCategoryService.refreshCategoryCache(category.getRegionId());
+ }
+ return ResultUtil.success("淇敼鎴愬姛");
+ }
+ return ResultUtil.error("淇敼澶辫触");
+ }
+
+ @RequestMapping(value = "/category/delete", method = RequestMethod.POST)
+ @ApiOperation(value = "鍒犻櫎绉掓潃鍥㈠垎绫")
+ public Result deleteCategory(String id) {
+ if (StringUtils.isBlank(id)) {
+ return ResultUtil.error("鍒嗙被ID涓嶈兘涓虹┖");
+ }
+ SeckillGroupCategory category = seckillGroupCategoryService.getById(id);
+ if (category == null) {
+ return ResultUtil.error("鍒嗙被涓嶅瓨鍦");
+ }
+ category.setDelFlag(1);
+ boolean result = seckillGroupCategoryService.updateById(category);
+ if (result) {
+ seckillGroupCategoryService.removeCategoryCache(category.getRegionId(), id);
+ seckillGroupCategoryService.refreshCategoryCache(category.getRegionId());
+ seckillGroupProductService.removeProductCache(id);
+ return ResultUtil.success("鍒犻櫎鎴愬姛");
+ }
+ return ResultUtil.error("鍒犻櫎澶辫触");
+ }
+
+ @RequestMapping(value = "/category/list", method = RequestMethod.GET)
+ @ApiOperation(value = "鏌ヨ绉掓潃鍥㈠垎绫诲垪琛")
+ public Result> listCategory(@RequestParam(value = "regionId") String regionId) {
+ LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
+ wrapper.eq(SeckillGroupCategory::getDelFlag, 0);
+ if (StringUtils.isNotBlank(regionId)) {
+ wrapper.eq(SeckillGroupCategory::getRegionId, regionId);
+ }
+ wrapper.orderByDesc(SeckillGroupCategory::getSort)
+ .orderByAsc(SeckillGroupCategory::getCreateTime);
+ return new ResultUtil>().setData(seckillGroupCategoryService.list(wrapper));
+ }
+
+ @RequestMapping(value = "/category/sort", method = RequestMethod.POST)
+ @ApiOperation(value = "鎵归噺璋冩暣绉掓潃鍥㈠垎绫绘帓搴")
+ public Result sortCategory(@RequestBody List categories) {
+ if (categories == null || categories.isEmpty()) {
+ return ResultUtil.error("鍒嗙被鍒楄〃涓嶈兘涓虹┖");
+ }
+ boolean result = seckillGroupCategoryService.updateBatchById(categories);
+ if (result) {
+ for (SeckillGroupCategory category : categories) {
+ if (StringUtils.isNotBlank(category.getRegionId())) {
+ seckillGroupCategoryService.refreshCategoryCache(category.getRegionId());
+ } else if (StringUtils.isNotBlank(category.getId())) {
+ SeckillGroupCategory old = seckillGroupCategoryService.getById(category.getId());
+ if (old != null) {
+ seckillGroupCategoryService.refreshCategoryCache(old.getRegionId());
+ }
+ }
+ }
+ return ResultUtil.success("鎺掑簭鎴愬姛");
+ }
+ return ResultUtil.error("鎺掑簭澶辫触");
+ }
+
+ @RequestMapping(value = "/product/save", method = RequestMethod.POST)
+ @ApiOperation(value = "鏂板绉掓潃鍥㈠晢鍝")
+ public Result saveProduct(@RequestBody SeckillGroupProductDTO dto) {
+ try {
+ return new ResultUtil().setData(seckillGroupProductService.saveFromProduct(dto));
+ } catch (IllegalArgumentException e) {
+ return ResultUtil.error(e.getMessage());
+ }
+ }
+
+ @RequestMapping(value = "/product/edit", method = RequestMethod.POST)
+ @ApiOperation(value = "淇敼绉掓潃鍥㈠晢鍝")
+ public Result editProduct(@RequestBody SeckillGroupProductDTO dto) {
+ try {
+ return new ResultUtil().setData(seckillGroupProductService.editSeckillProduct(dto));
+ } catch (IllegalArgumentException e) {
+ return ResultUtil.error(e.getMessage());
+ }
+ }
+
+ @RequestMapping(value = "/product/page", method = RequestMethod.POST)
+ @ApiOperation(value = "鍒嗛〉鏌ヨ绉掓潃鍥㈠晢鍝")
+ public Result> pageProduct(@RequestBody SeckillGroupProductQuery query) {
+ if (query == null) {
+ query = new SeckillGroupProductQuery();
+ }
+ return new ResultUtil>().setData(seckillGroupProductService.pageProducts(query));
+ }
+
+ @RequestMapping(value = "/product/up", method = RequestMethod.POST)
+ @ApiOperation(value = "涓婃灦绉掓潃鍥㈠晢鍝")
+ public Result upProduct(String id) {
+ return updateProductStatus(id, 1, "涓婃灦");
+ }
+
+ @RequestMapping(value = "/product/down", method = RequestMethod.POST)
+ @ApiOperation(value = "涓嬫灦绉掓潃鍥㈠晢鍝")
+ public Result downProduct(String id) {
+ return updateProductStatus(id, 0, "涓嬫灦");
+ }
+
+ @RequestMapping(value = "/product/delete", method = RequestMethod.POST)
+ @ApiOperation(value = "鍒犻櫎绉掓潃鍥㈠晢鍝")
+ public Result deleteProduct(String id) {
+ if (StringUtils.isBlank(id)) {
+ return ResultUtil.error("鍟嗗搧ID涓嶈兘涓虹┖");
+ }
+ SeckillGroupProduct product = seckillGroupProductService.getById(id);
+ if (product == null) {
+ return ResultUtil.error("鍟嗗搧涓嶅瓨鍦");
+ }
+ product.setDelFlag(1);
+ boolean result = seckillGroupProductService.updateById(product);
+ if (result) {
+ seckillGroupProductService.refreshProductCache(product.getCategoryId());
+ seckillGroupProductService.removeProductDetailCache(id);
+ return ResultUtil.success("鍒犻櫎鎴愬姛");
+ }
+ return ResultUtil.error("鍒犻櫎澶辫触");
+ }
+
+ private Result updateProductStatus(String id, Integer status, String actionName) {
+ if (StringUtils.isBlank(id)) {
+ return ResultUtil.error("鍟嗗搧ID涓嶈兘涓虹┖");
+ }
+ SeckillGroupProduct product = seckillGroupProductService.getById(id);
+ if (product == null) {
+ return ResultUtil.error("鍟嗗搧涓嶅瓨鍦");
+ }
+ product.setStatus(status);
+ boolean result = seckillGroupProductService.updateById(product);
+ if (result) {
+ if (status == 1) {
+ seckillGroupProductService.refreshProductCacheByProductId(id);
+ } else {
+ seckillGroupProductService.refreshProductCache(product.getCategoryId());
+ seckillGroupProductService.removeProductDetailCache(id);
+ }
+ return ResultUtil.success(actionName + "鎴愬姛");
+ }
+ return ResultUtil.error(actionName + "澶辫触");
+ }
+}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SeckillGroupController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SeckillGroupController.java
new file mode 100644
index 00000000..15be2f31
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SeckillGroupController.java
@@ -0,0 +1,66 @@
+package cc.hiver.mall.controller;
+
+import cc.hiver.core.common.annotation.RateLimiter;
+import cc.hiver.core.common.utils.ResultUtil;
+import cc.hiver.core.common.vo.Result;
+import cc.hiver.mall.entity.SeckillGroupCategory;
+import cc.hiver.mall.pojo.query.SeckillGroupProductQuery;
+import cc.hiver.mall.pojo.vo.SeckillGroupProductVO;
+import cc.hiver.mall.service.mybatis.SeckillGroupCategoryService;
+import cc.hiver.mall.service.mybatis.SeckillGroupProductService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@Api(tags = "绉掓潃鍥㈡帴鍙")
+@RequestMapping("/hiver/app/seckillGroup")
+public class SeckillGroupController {
+
+ @Autowired
+ private SeckillGroupCategoryService seckillGroupCategoryService;
+
+ @Autowired
+ private SeckillGroupProductService seckillGroupProductService;
+
+ @RequestMapping(value = "/category/list", method = RequestMethod.GET)
+ @ApiOperation(value = "鏌ヨ绉掓潃鍥㈡í鎺掑垎绫")
+ public Result> listCategory(String regionId) {
+ if (StringUtils.isBlank(regionId)) {
+ return ResultUtil.error("鍖哄煙ID涓嶈兘涓虹┖");
+ }
+ return new ResultUtil>().setData(seckillGroupCategoryService.listFromCache(regionId));
+ }
+
+ @RequestMapping(value = "/product/page", method = RequestMethod.POST)
+ @ApiOperation(value = "鍒嗛〉鏌ヨ绉掓潃鍥㈠晢鍝")
+ @RateLimiter(name = "seckillGroupProductPage", ipLimit = true)
+ public Result> pageProduct(@RequestBody SeckillGroupProductQuery query) {
+ if (query == null) {
+ query = new SeckillGroupProductQuery();
+ }
+ if (StringUtils.isBlank(query.getRegionId())) {
+ return ResultUtil.error("鍖哄煙ID涓嶈兘涓虹┖");
+ }
+ query.setOnlyActive(true);
+ return new ResultUtil>().setData(seckillGroupProductService.appPageProducts(query));
+ }
+
+ @RequestMapping(value = "/product/detail/{id}", method = RequestMethod.GET)
+ @ApiOperation(value = "鏌ヨ绉掓潃鍥㈠晢鍝佽鎯")
+ public Result detail(@PathVariable("id") String id) {
+ if (StringUtils.isBlank(id)) {
+ return ResultUtil.error("鍟嗗搧ID涓嶈兘涓虹┖");
+ }
+ SeckillGroupProductVO detail = seckillGroupProductService.getDetail(id);
+ if (detail == null) {
+ return ResultUtil.error("鍟嗗搧涓嶅瓨鍦");
+ }
+ return new ResultUtil().setData(detail);
+ }
+}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java
index 681dab27..a67ee230 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java
@@ -246,7 +246,17 @@ public class ShopController {
}
if (shop.getIsStudent() != null) {
- if (!(shop.getIsStudent() == s.getIsStudent())) {
+ if (!shop.getIsStudent().equals(s.getIsStudent())) {
+ continue;
+ }
+ }
+ if (shop.getMerchantType() != null) {
+ Integer merchantType = s.getMerchantType();
+ if (shop.getMerchantType().equals(1)) {
+ if (merchantType != null && !shop.getMerchantType().equals(merchantType)) {
+ continue;
+ }
+ } else if (!shop.getMerchantType().equals(merchantType)) {
continue;
}
}
@@ -427,7 +437,7 @@ public class ShopController {
final Shop shop = shopService.get(id);
shop.setStatus(ShopConstant.SHOP_STATUS_LOCK);
shopService.update(shop);
- shopService.removeShopCache(shop.getId(), shop.getRegionId());
+ shopService.refreshShopCache(shop.getId(), shop.getRegionId());
return ResultUtil.success("鎿嶄綔鎴愬姛");
}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/WechatPayController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/WechatPayController.java
index 563e4889..4f3eac27 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/WechatPayController.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/WechatPayController.java
@@ -99,11 +99,16 @@ public class WechatPayController {
String description = request.get("description");
String outTradeNo = request.get("outTradeNo");
String userRequireMake = request.get("userRequireMake");
- if(userRequireMake != null && userRequireMake.equals("1")){
+ String isPack = request.get("isPack");
+ if(isPack != null){
MallOrder order = mallOrderService.getById(outTradeNo);
- order.setUserRequireMake(1);
+ order.setIsPack(Integer.valueOf(isPack));
+ if(userRequireMake != null && userRequireMake.equals("1")){
+ order.setUserRequireMake(1);
+ }
mallOrderService.updateById(order);
}
+
if(description.equals("澧炲姞閰嶉佷剑閲")){
outTradeNo = "ORDERDE_" + outTradeNo;
}else{
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/SeckillGroupCategoryMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/SeckillGroupCategoryMapper.java
new file mode 100644
index 00000000..95f9e13c
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/SeckillGroupCategoryMapper.java
@@ -0,0 +1,9 @@
+package cc.hiver.mall.dao.mapper;
+
+import cc.hiver.mall.entity.SeckillGroupCategory;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface SeckillGroupCategoryMapper extends BaseMapper {
+}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/SeckillGroupProductMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/SeckillGroupProductMapper.java
new file mode 100644
index 00000000..767d649e
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/SeckillGroupProductMapper.java
@@ -0,0 +1,9 @@
+package cc.hiver.mall.dao.mapper;
+
+import cc.hiver.mall.entity.SeckillGroupProduct;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface SeckillGroupProductMapper extends BaseMapper {
+}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/MallOrder.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/MallOrder.java
index dbc49350..719e2c49 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/MallOrder.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/MallOrder.java
@@ -84,6 +84,8 @@ public class MallOrder implements Serializable {
private String regionId;
@ApiModelProperty("鏄惁鍏嶅崟")
private Integer isFreeOrder;
+ @ApiModelProperty("0 鍫傞 1 鎵撳寘")
+ private Integer isPack;
@ApiModelProperty("鍏嶅崟閲戦")
private BigDecimal freeAmount;
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/SeckillGroupCategory.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/SeckillGroupCategory.java
new file mode 100644
index 00000000..ccb00070
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/SeckillGroupCategory.java
@@ -0,0 +1,32 @@
+package cc.hiver.mall.entity;
+
+import cc.hiver.core.base.HiverBaseEntity;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "绉掓潃鍥㈡í鎺掑垎绫")
+@TableName(value = "t_seckill_group_category", autoResultMap = true)
+public class SeckillGroupCategory extends HiverBaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty(value = "鍒嗙被鍚嶇О")
+ private String categoryName;
+
+ @ApiModelProperty(value = "鍒嗙被鍥炬爣")
+ private String categoryIcon;
+
+ @ApiModelProperty(value = "鍖哄煙ID")
+ private String regionId;
+
+ @ApiModelProperty(value = "鎺掑簭鍊硷紝瓒婂ぇ瓒婇潬鍓")
+ private Integer sort;
+
+ @ApiModelProperty(value = "鐘舵侊細0绂佺敤 1鍚敤")
+ private Integer status;
+
+ @ApiModelProperty(value = "澶囨敞")
+ private String remark;
+}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/SeckillGroupProduct.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/SeckillGroupProduct.java
new file mode 100644
index 00000000..07629242
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/SeckillGroupProduct.java
@@ -0,0 +1,95 @@
+package cc.hiver.mall.entity;
+
+import cc.hiver.core.base.HiverBaseEntity;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@ApiModel(value = "绉掓潃鍥㈠晢鍝")
+@TableName(value = "t_seckill_group_product", autoResultMap = true)
+public class SeckillGroupProduct extends HiverBaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty(value = "绉掓潃鍒嗙被ID")
+ private String categoryId;
+
+ @ApiModelProperty(value = "鍘熷晢鍝両D")
+ private String productId;
+
+ @ApiModelProperty(value = "鍟嗗搧鍚嶇О蹇収")
+ private String productName;
+
+ @ApiModelProperty(value = "鍟嗗搧鍥剧墖蹇収")
+ private String productPicture;
+
+ @ApiModelProperty(value = "鍗曚綅蹇収")
+ private String unit;
+
+ @ApiModelProperty(value = "鍟嗗搧灞炴у垪琛/瑙勬牸蹇収")
+ private String attributeList;
+
+ @ApiModelProperty(value = "鍟嗗搧绠浠嬪揩鐓")
+ private String productIntro;
+
+ @ApiModelProperty(value = "鍘熶环/鍒掔嚎浠峰揩鐓")
+ private BigDecimal originalPrice;
+
+ @ApiModelProperty(value = "绉掓潃浠锋牸")
+ private BigDecimal seckillPrice;
+
+ @ApiModelProperty(value = "绉掓潃鎬诲簱瀛")
+ private Integer totalStock;
+
+ @ApiModelProperty(value = "宸插敭搴撳瓨")
+ private Integer soldStock;
+
+ @ApiModelProperty(value = "閿佸畾搴撳瓨")
+ private Integer lockStock;
+
+ @ApiModelProperty(value = "姣忎汉闄愯喘鏁伴噺锛岀┖琛ㄧず涓嶉檺")
+ private Integer limitNum;
+
+ @ApiModelProperty(value = "鍟嗗ID")
+ private String shopId;
+
+ @ApiModelProperty(value = "鍟嗗鍚嶇О蹇収")
+ private String shopName;
+
+ @ApiModelProperty(value = "鍟嗗鐢佃瘽蹇収")
+ private String shopPhone;
+
+ @ApiModelProperty(value = "鍟嗗鍦板潃蹇収")
+ private String shopAddress;
+
+ @ApiModelProperty(value = "鍙栬揣鍖哄煙ID锛屼究浜庝笅鍗曚紶鍙")
+ private String getAreaId;
+
+ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "绉掓潃寮濮嬫椂闂")
+ private Date startTime;
+
+ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "绉掓潃缁撴潫鏃堕棿")
+ private Date endTime;
+
+ @ApiModelProperty(value = "浜哄伐鎺掑簭鍊硷紝瓒婂ぇ瓒婇潬鍓")
+ private Integer orderFiled;
+
+ @ApiModelProperty(value = "绋冲畾闅忔満鎺掑簭鍊")
+ private Long sortHash;
+
+ @ApiModelProperty(value = "鐘舵侊細0涓嬫灦 1涓婃灦")
+ private Integer status;
+
+ @ApiModelProperty(value = "澶囨敞")
+ private String remark;
+}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Shop.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Shop.java
index a7d58e52..32f00fd6 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Shop.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Shop.java
@@ -175,6 +175,9 @@ public class Shop extends HiverBaseEntity {
@ApiModelProperty(value = "鏄惁涓哄鐢熷晢瀹 0 涓嶆槸 1鏄")
private Integer isStudent;
+ @ApiModelProperty(value = "1澶栧崠鍟嗗 / 2鍥㈣喘鍟嗗")
+ private Integer merchantType;
+
@Transient
@TableField(exist = false)
@ApiModelProperty(value = "搴楅摵鎶戒剑绛夎缃")
@@ -184,4 +187,9 @@ public class Shop extends HiverBaseEntity {
@TableField(exist = false)
@ApiModelProperty(value = "妯$硦鎼滅储鏉′欢")
private String keyWord;
+
+ @Transient
+ @TableField(exist = false)
+ @ApiModelProperty(value = "鏄惁鍚庡彴鏌ヨ")
+ private Integer isAdmin;
}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/dto/CreateOrderDTO.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/dto/CreateOrderDTO.java
index 5e213796..6940972f 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/dto/CreateOrderDTO.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/dto/CreateOrderDTO.java
@@ -42,6 +42,9 @@ public class CreateOrderDTO {
@ApiModelProperty(value = "閫佽揣鍖哄煙ID(鐢ㄦ埛鏀惰揣鍦板潃鍏宠仈鍖哄煙id)")
private String putAreaId;
+ @ApiModelProperty("0 鍫傞 1 鎵撳寘")
+ private Integer isPack;
+
@ApiModelProperty(value = "鎵撳寘璐癸紙榛樿0锛")
private BigDecimal packageFee;
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/dto/SeckillGroupProductDTO.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/dto/SeckillGroupProductDTO.java
new file mode 100644
index 00000000..cb4807f3
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/dto/SeckillGroupProductDTO.java
@@ -0,0 +1,55 @@
+package cc.hiver.mall.pojo.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@ApiModel("绉掓潃鍥㈠晢鍝佷繚瀛樺璞")
+public class SeckillGroupProductDTO {
+
+ @ApiModelProperty(value = "绉掓潃鍥㈠晢鍝両D锛岀紪杈戞椂蹇呬紶")
+ private String id;
+
+ @ApiModelProperty(value = "绉掓潃鍒嗙被ID", required = true)
+ private String categoryId;
+
+ @ApiModelProperty(value = "鍘熷晢鍝両D", required = true)
+ private String productId;
+
+ @ApiModelProperty(value = "绉掓潃浠锋牸", required = true)
+ private BigDecimal seckillPrice;
+
+ @ApiModelProperty(value = "绉掓潃搴撳瓨", required = true)
+ private Integer totalStock;
+
+ @ApiModelProperty(value = "姣忎汉闄愯喘鏁伴噺")
+ private Integer limitNum;
+
+ @ApiModelProperty(value = "鍙栬揣鍖哄煙ID锛屼笉浼犲垯浣跨敤鍟嗗鎵灞炲尯鍩烮D")
+ private String getAreaId;
+
+ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "绉掓潃寮濮嬫椂闂")
+ private Date startTime;
+
+ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "绉掓潃缁撴潫鏃堕棿")
+ private Date endTime;
+
+ @ApiModelProperty(value = "浜哄伐鎺掑簭鍊硷紝瓒婂ぇ瓒婇潬鍓")
+ private Integer orderFiled;
+
+ @ApiModelProperty(value = "鐘舵侊細0涓嬫灦 1涓婃灦")
+ private Integer status;
+
+ @ApiModelProperty(value = "澶囨敞")
+ private String remark;
+}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/query/SeckillGroupProductQuery.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/query/SeckillGroupProductQuery.java
new file mode 100644
index 00000000..bda6e09e
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/query/SeckillGroupProductQuery.java
@@ -0,0 +1,32 @@
+package cc.hiver.mall.pojo.query;
+
+import cc.hiver.core.base.HiverBasePageQuery;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel("绉掓潃鍥㈠晢鍝佸垎椤垫煡璇㈠璞")
+public class SeckillGroupProductQuery extends HiverBasePageQuery {
+
+ @ApiModelProperty(value = "绉掓潃鍒嗙被ID")
+ private String categoryId;
+
+ @ApiModelProperty(value = "鍖哄煙ID")
+ private String regionId;
+
+ @ApiModelProperty(value = "鍟嗗ID")
+ private String shopId;
+
+ @ApiModelProperty(value = "鍏抽敭瀛")
+ private String keywords;
+
+ @ApiModelProperty(value = "鍟嗗搧鍚嶇О")
+ private String productName;
+
+ @ApiModelProperty(value = "鐘舵侊細0涓嬫灦 1涓婃灦")
+ private Integer status;
+
+ @ApiModelProperty(value = "鏄惁浠呮煡璇㈠綋鍓嶆湁鏁堟椿鍔ㄥ晢鍝")
+ private Boolean onlyActive;
+}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SeckillGroupProductVO.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SeckillGroupProductVO.java
new file mode 100644
index 00000000..3ed611aa
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SeckillGroupProductVO.java
@@ -0,0 +1,89 @@
+package cc.hiver.mall.pojo.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class SeckillGroupProductVO {
+
+ @ApiModelProperty(value = "绉掓潃鍥㈠晢鍝両D")
+ private String id;
+
+ @ApiModelProperty(value = "绉掓潃鍒嗙被ID")
+ private String categoryId;
+
+ @ApiModelProperty(value = "鍘熷晢鍝両D")
+ private String productId;
+
+ @ApiModelProperty(value = "鍟嗗搧鍚嶇О")
+ private String productName;
+
+ @ApiModelProperty(value = "鍟嗗搧鍥剧墖")
+ private String productPicture;
+
+ @ApiModelProperty(value = "鍗曚綅")
+ private String unit;
+
+ @ApiModelProperty(value = "鍟嗗搧灞炴у垪琛/瑙勬牸")
+ private String attributeList;
+
+ @ApiModelProperty(value = "鍟嗗搧绠浠")
+ private String productIntro;
+
+ @ApiModelProperty(value = "鍘熶环/鍒掔嚎浠")
+ private BigDecimal originalPrice;
+
+ @ApiModelProperty(value = "绉掓潃浠锋牸")
+ private BigDecimal seckillPrice;
+
+ @ApiModelProperty(value = "绉掓潃鎬诲簱瀛")
+ private Integer totalStock;
+
+ @ApiModelProperty(value = "宸插敭搴撳瓨")
+ private Integer soldStock;
+
+ @ApiModelProperty(value = "閿佸畾搴撳瓨")
+ private Integer lockStock;
+
+ @ApiModelProperty(value = "鍙敭搴撳瓨")
+ private Integer availableStock;
+
+ @ApiModelProperty(value = "姣忎汉闄愯喘鏁伴噺")
+ private Integer limitNum;
+
+ @ApiModelProperty(value = "鍟嗗ID")
+ private String shopId;
+
+ @ApiModelProperty(value = "鍟嗗鍚嶇О")
+ private String shopName;
+
+ @ApiModelProperty(value = "鍟嗗鐢佃瘽")
+ private String shopPhone;
+
+ @ApiModelProperty(value = "鍟嗗鍦板潃")
+ private String shopAddress;
+
+ @ApiModelProperty(value = "鍙栬揣鍖哄煙ID")
+ private String getAreaId;
+
+ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "绉掓潃寮濮嬫椂闂")
+ private Date startTime;
+
+ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "绉掓潃缁撴潫鏃堕棿")
+ private Date endTime;
+
+ @ApiModelProperty(value = "浜哄伐鎺掑簭鍊")
+ private Integer orderFiled;
+
+ @ApiModelProperty(value = "鐘舵侊細0涓嬫灦 1涓婃灦")
+ private Integer status;
+}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/SeckillGroupCategoryService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/SeckillGroupCategoryService.java
new file mode 100644
index 00000000..509f8583
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/SeckillGroupCategoryService.java
@@ -0,0 +1,17 @@
+package cc.hiver.mall.service.mybatis;
+
+import cc.hiver.mall.entity.SeckillGroupCategory;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+public interface SeckillGroupCategoryService extends IService {
+
+ List listForApp(String regionId);
+
+ List listFromCache(String regionId);
+
+ void refreshCategoryCache(String regionId);
+
+ void removeCategoryCache(String regionId, String categoryId);
+}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/SeckillGroupProductService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/SeckillGroupProductService.java
new file mode 100644
index 00000000..bcfc3147
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/SeckillGroupProductService.java
@@ -0,0 +1,29 @@
+package cc.hiver.mall.service.mybatis;
+
+import cc.hiver.mall.entity.SeckillGroupProduct;
+import cc.hiver.mall.pojo.dto.SeckillGroupProductDTO;
+import cc.hiver.mall.pojo.query.SeckillGroupProductQuery;
+import cc.hiver.mall.pojo.vo.SeckillGroupProductVO;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+public interface SeckillGroupProductService extends IService {
+
+ SeckillGroupProduct saveFromProduct(SeckillGroupProductDTO dto);
+
+ SeckillGroupProduct editSeckillProduct(SeckillGroupProductDTO dto);
+
+ IPage pageProducts(SeckillGroupProductQuery query);
+
+ IPage appPageProducts(SeckillGroupProductQuery query);
+
+ SeckillGroupProductVO getDetail(String id);
+
+ void refreshProductCache(String categoryId);
+
+ void refreshProductCacheByProductId(String id);
+
+ void removeProductCache(String categoryId);
+
+ void removeProductDetailCache(String id);
+}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/ShopServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/ShopServiceImpl.java
index 5fe81ced..5e4da361 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/ShopServiceImpl.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/ShopServiceImpl.java
@@ -116,7 +116,8 @@ public class ShopServiceImpl implements ShopService {
final Path ShopNameField = root.get("shopName");
final Path regionField = root.get("regionId");
final Path shopAreaField = root.get("shopArea");
- final Path isStudentField = root.get("isStudent");
+ final Path isStudentField = root.get("isStudent");
+ final Path merchantTypeField = root.get("merchantType");
final Path statusField = root.get("status");
@@ -160,6 +161,13 @@ public class ShopServiceImpl implements ShopService {
if (shop.getIsStudent() != null) {
list.add(cb.equal(isStudentField, shop.getIsStudent()));
}
+ if (shop.getMerchantType() != null) {
+ if (shop.getMerchantType().equals(1)) {
+ list.add(cb.or(cb.equal(merchantTypeField, shop.getMerchantType()), cb.isNull(merchantTypeField)));
+ } else {
+ list.add(cb.equal(merchantTypeField, shop.getMerchantType()));
+ }
+ }
final Predicate[] arr = new Predicate[list.size()];
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/MallOrderServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/MallOrderServiceImpl.java
index 0cb3d214..57162358 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/MallOrderServiceImpl.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/MallOrderServiceImpl.java
@@ -1480,6 +1480,7 @@ public class MallOrderServiceImpl extends ServiceImpl implements SeckillGroupCategoryService {
+
+ private static final String CATEGORY_CACHE_KEY = "SECKILL_GROUP_CATEGORY_CACHE";
+
+ @Autowired
+ private RedisTemplateHelper redisTemplateHelper;
+
+ @Override
+ public List listForApp(String regionId) {
+ LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
+ wrapper.eq(SeckillGroupCategory::getDelFlag, 0)
+ .eq(SeckillGroupCategory::getStatus, 1)
+ .eq(SeckillGroupCategory::getRegionId, regionId)
+ .orderByDesc(SeckillGroupCategory::getSort)
+ .orderByAsc(SeckillGroupCategory::getCreateTime);
+ return list(wrapper);
+ }
+
+ @Override
+ public List listFromCache(String regionId) {
+ if (CharSequenceUtil.isBlank(regionId)) {
+ return new ArrayList<>();
+ }
+ List