diff --git a/hiver-core/src/main/java/cc/hiver/core/logisticsentruckinglog/mapper/LogisticsEntruckingLogMapper.java b/hiver-core/src/main/java/cc/hiver/core/logisticsentruckinglog/mapper/LogisticsEntruckingLogMapper.java
index 4084a96d..c3a75e0d 100644
--- a/hiver-core/src/main/java/cc/hiver/core/logisticsentruckinglog/mapper/LogisticsEntruckingLogMapper.java
+++ b/hiver-core/src/main/java/cc/hiver/core/logisticsentruckinglog/mapper/LogisticsEntruckingLogMapper.java
@@ -3,6 +3,8 @@ package cc.hiver.core.logisticsentruckinglog.mapper;
import cc.hiver.core.logisticsentruckinglog.entity.LogisticsEntruckingLog;
import cc.hiver.core.logisticsentruckinglog.vo.LogisticsEntruckingLogDatePageVo;
import cc.hiver.core.logisticsentruckinglog.vo.LogisticsEntruckingLogQueryVo;
+import cc.hiver.core.logisticsorder.vo.LogisticsOrderQueryVo;
+import cc.hiver.core.logisticsorder.vo.StatisticsVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -27,4 +29,6 @@ public interface LogisticsEntruckingLogMapper extends BaseMapper
logisticsEntruckingLogs,@Param("nowDate") String nowDate,@Param("afterDay") String afterDay);
IPage getDateLogisticsEntruckingLogPageList(Page page,@Param("queryParams") LogisticsEntruckingLogQueryVo logisticsEntruckingLogQueryVo);
+
+ StatisticsVo getCarStatistics(@Param("logisticsOrderQueryVo") LogisticsOrderQueryVo logisticsOrderQueryVo);
}
diff --git a/hiver-core/src/main/java/cc/hiver/core/logisticsentruckinglog/service/LogisticsEntruckingLogService.java b/hiver-core/src/main/java/cc/hiver/core/logisticsentruckinglog/service/LogisticsEntruckingLogService.java
index 542c7b4f..176a62e9 100644
--- a/hiver-core/src/main/java/cc/hiver/core/logisticsentruckinglog/service/LogisticsEntruckingLogService.java
+++ b/hiver-core/src/main/java/cc/hiver/core/logisticsentruckinglog/service/LogisticsEntruckingLogService.java
@@ -3,6 +3,8 @@ package cc.hiver.core.logisticsentruckinglog.service;
import cc.hiver.core.logisticsentruckinglog.entity.LogisticsEntruckingLog;
import cc.hiver.core.logisticsentruckinglog.vo.LogisticsEntruckingLogDatePageVo;
import cc.hiver.core.logisticsentruckinglog.vo.LogisticsEntruckingLogQueryVo;
+import cc.hiver.core.logisticsorder.vo.LogisticsOrderQueryVo;
+import cc.hiver.core.logisticsorder.vo.StatisticsVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
@@ -23,4 +25,6 @@ public interface LogisticsEntruckingLogService extends IService logisticsEntruckingLogs);
IPage getDateLogisticsEntruckingLogPageList(LogisticsEntruckingLogQueryVo logisticsEntruckingLogQueryVo);
+
+ StatisticsVo getCarStatistics(LogisticsOrderQueryVo logisticsOrderQueryVo);
}
diff --git a/hiver-core/src/main/java/cc/hiver/core/logisticsentruckinglog/service/impl/LogisticsEntruckingLogServiceImpl.java b/hiver-core/src/main/java/cc/hiver/core/logisticsentruckinglog/service/impl/LogisticsEntruckingLogServiceImpl.java
index 66c18cbd..05552a34 100644
--- a/hiver-core/src/main/java/cc/hiver/core/logisticsentruckinglog/service/impl/LogisticsEntruckingLogServiceImpl.java
+++ b/hiver-core/src/main/java/cc/hiver/core/logisticsentruckinglog/service/impl/LogisticsEntruckingLogServiceImpl.java
@@ -5,6 +5,8 @@ import cc.hiver.core.logisticsentruckinglog.mapper.LogisticsEntruckingLogMapper;
import cc.hiver.core.logisticsentruckinglog.service.LogisticsEntruckingLogService;
import cc.hiver.core.logisticsentruckinglog.vo.LogisticsEntruckingLogDatePageVo;
import cc.hiver.core.logisticsentruckinglog.vo.LogisticsEntruckingLogQueryVo;
+import cc.hiver.core.logisticsorder.vo.LogisticsOrderQueryVo;
+import cc.hiver.core.logisticsorder.vo.StatisticsVo;
import cc.hiver.core.utils.DateUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -79,4 +81,9 @@ public class LogisticsEntruckingLogServiceImpl extends ServiceImpl getLogisticsOrderDetail(String orderId) {
return new ResultUtil().setData(logisticsOrderService.getById(orderId));
}
+
+ // 鏁版嵁缁熻锛堝彲鎸夌収绾胯矾銆佺墿娴佸叕鍙搞佸埌杈剧珯鎼滅储锛夛細瀹㈡埛鎬昏繍璐广佽繍鍗曟暟銆佸鎴锋暟銆佽繍杈撹垂銆佽杞﹁垂銆佸皬璐广佷繚璐
+ @RequestMapping(value = "/getLogisticsOrderStatistics", method = RequestMethod.POST)
+ @ApiOperation(value = "鐗╂祦璁㈠崟鏁版嵁缁熻")
+ public Result getLogisticsOrderStatistics(@RequestBody(required = false) LogisticsOrderQueryVo logisticsOrderQueryVo) {
+ try{
+ return new ResultUtil().setData(logisticsOrderService.getLogisticsOrderStatistics(logisticsOrderQueryVo));
+ }catch (Exception e){
+ return ResultUtil.error("鏌ヨ鐗╂祦缁熻澶辫触锛");
+ }
+ }
}
diff --git a/hiver-core/src/main/java/cc/hiver/core/logisticsorder/mapper/LogisticsOrderMapper.java b/hiver-core/src/main/java/cc/hiver/core/logisticsorder/mapper/LogisticsOrderMapper.java
index d5b49dd9..f6a3290f 100644
--- a/hiver-core/src/main/java/cc/hiver/core/logisticsorder/mapper/LogisticsOrderMapper.java
+++ b/hiver-core/src/main/java/cc/hiver/core/logisticsorder/mapper/LogisticsOrderMapper.java
@@ -3,6 +3,7 @@ package cc.hiver.core.logisticsorder.mapper;
import cc.hiver.core.logisticsorder.entity.LogisticsOrder;
import cc.hiver.core.logisticsorder.entity.LogisticsOrderChangeLog;
import cc.hiver.core.logisticsorder.vo.LogisticsOrderQueryVo;
+import cc.hiver.core.logisticsorder.vo.StatisticsVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -38,4 +39,8 @@ public interface LogisticsOrderMapper extends BaseMapper {
* @return int
*/
List getLogisticsOrderChangeLog(@Param("orderId") String orderId);
+
+ StatisticsVo getLogisticsOrderStatistics(@Param("logisticsOrderQueryVo") LogisticsOrderQueryVo logisticsOrderQueryVo);
+
+ int getCustomerCount(@Param("logisticsOrderQueryVo") LogisticsOrderQueryVo logisticsOrderQueryVo);
}
diff --git a/hiver-core/src/main/java/cc/hiver/core/logisticsorder/service/LogisticsOrderService.java b/hiver-core/src/main/java/cc/hiver/core/logisticsorder/service/LogisticsOrderService.java
index 75c96ae3..9c6ca9c6 100644
--- a/hiver-core/src/main/java/cc/hiver/core/logisticsorder/service/LogisticsOrderService.java
+++ b/hiver-core/src/main/java/cc/hiver/core/logisticsorder/service/LogisticsOrderService.java
@@ -4,6 +4,7 @@ import cc.hiver.core.logisticsorder.entity.LogisticsOrder;
import cc.hiver.core.logisticsorder.entity.LogisticsOrderChangeLog;
import cc.hiver.core.logisticsorder.vo.LogisticsOrderChangeLogVo;
import cc.hiver.core.logisticsorder.vo.LogisticsOrderQueryVo;
+import cc.hiver.core.logisticsorder.vo.StatisticsVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
@@ -42,4 +43,13 @@ public interface LogisticsOrderService extends IService {
* @return int
*/
List getLogisticsOrderChangeLog(String orderId);
+
+ /**
+ * 鐗╂祦璁㈠崟鏁版嵁缁熻
+ * @author 鐜嬪瘜搴
+ * @date 2024/9/7
+ * @param logisticsOrderQueryVo
+ * @return StatisticsVo
+ */
+ StatisticsVo getLogisticsOrderStatistics(LogisticsOrderQueryVo logisticsOrderQueryVo);
}
diff --git a/hiver-core/src/main/java/cc/hiver/core/logisticsorder/service/impl/LogisticsOrderServiceImpl.java b/hiver-core/src/main/java/cc/hiver/core/logisticsorder/service/impl/LogisticsOrderServiceImpl.java
index 4210d4c4..d23297e2 100644
--- a/hiver-core/src/main/java/cc/hiver/core/logisticsorder/service/impl/LogisticsOrderServiceImpl.java
+++ b/hiver-core/src/main/java/cc/hiver/core/logisticsorder/service/impl/LogisticsOrderServiceImpl.java
@@ -1,13 +1,11 @@
package cc.hiver.core.logisticsorder.service.impl;
+import cc.hiver.core.logisticsentruckinglog.service.LogisticsEntruckingLogService;
import cc.hiver.core.logisticsorder.entity.LogisticsOrder;
import cc.hiver.core.logisticsorder.entity.LogisticsOrderChangeLog;
import cc.hiver.core.logisticsorder.mapper.LogisticsOrderMapper;
import cc.hiver.core.logisticsorder.service.LogisticsOrderService;
-import cc.hiver.core.logisticsorder.vo.CompareObjectUtils;
-import cc.hiver.core.logisticsorder.vo.DiffAttr;
-import cc.hiver.core.logisticsorder.vo.LogisticsOrderChangeLogVo;
-import cc.hiver.core.logisticsorder.vo.LogisticsOrderQueryVo;
+import cc.hiver.core.logisticsorder.vo.*;
import cc.hiver.core.utils.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -29,6 +27,9 @@ public class LogisticsOrderServiceImpl extends ServiceImpl
+
\ No newline at end of file
diff --git a/hiver-core/src/main/resources/mapper/LogisticsOrderMapper.xml b/hiver-core/src/main/resources/mapper/LogisticsOrderMapper.xml
index e961a6bd..87980aa8 100644
--- a/hiver-core/src/main/resources/mapper/LogisticsOrderMapper.xml
+++ b/hiver-core/src/main/resources/mapper/LogisticsOrderMapper.xml
@@ -170,4 +170,42 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/controller/CustomerCategoryController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/controller/CustomerCategoryController.java
new file mode 100644
index 00000000..8ff5eb3f
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/controller/CustomerCategoryController.java
@@ -0,0 +1,146 @@
+package cc.hiver.mall.customercategory.controller;
+
+import cc.hiver.core.common.utils.ResultUtil;
+import cc.hiver.core.common.vo.Result;
+import cc.hiver.mall.customercategory.entity.CustomerCategory;
+import cc.hiver.mall.customercategory.service.CustomerCategoryService;
+import cc.hiver.mall.customercategory.vo.CustomerCategoryQueryVo;
+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;
+
+/**
+ * 瀹㈡埛鍒嗙被鎺у埗鍣
+ *
+ * @author 鐜嬪瘜搴
+ * @date 2024/8/24
+ */
+@Slf4j
+@RestController
+@Api(tags = "瀹㈡埛鍒嗙被鎺ュ彛")
+@RequestMapping("/hiver/app/customerCategory/")
+@Transactional
+public class CustomerCategoryController {
+
+ @Autowired
+ private CustomerCategoryService customerCategoryService;
+
+ /**
+ * 鏂板鐗╂祦瀹㈡埛鍒嗙被
+ *
+ * @param customerCategory
+ * @return Result
+ * @author 鐜嬪瘜搴
+ * @date 2024/8/24
+ */
+ @PostMapping(value = "/addCustomerCategory")
+ @ApiOperation("鏂板鐗╂祦瀹㈡埛鍒嗙被")
+ public Result addCustomerCategory(@RequestBody CustomerCategory customerCategory) {
+
+ final boolean b = customerCategoryService.saveOrUpdate(customerCategory);
+ if (b) {
+ return ResultUtil.success("淇濆瓨鎴愬姛锛");
+ } else {
+ return ResultUtil.error("淇濆瓨澶辫触锛");
+ }
+ }
+
+ /**
+ * 鏇存柊鐗╂祦瀹㈡埛鍒嗙被
+ *
+ * @param customerCategory
+ * @return Result
+ * @author 鐜嬪瘜搴
+ * @date 2024/8/24
+ */
+ @PostMapping(value = "/updateCustomerCategory")
+ @ApiOperation("鏇存柊鐗╂祦瀹㈡埛鍒嗙被")
+ public Result updateCustomerCategory(@RequestBody CustomerCategory customerCategory) {
+
+ final boolean b = customerCategoryService.saveOrUpdate(customerCategory);
+ if (b) {
+ return ResultUtil.success("淇濆瓨鎴愬姛锛");
+ } else {
+ return ResultUtil.error("淇濆瓨澶辫触锛");
+ }
+ }
+
+ /**
+ * 鍒犻櫎鐗╂祦瀹㈡埛鍒嗙被
+ *
+ * @param id
+ * @return Result
+ * @author 鐜嬪瘜搴
+ * @date 2024/8/24
+ */
+ @PostMapping(value = "/deleteCustomerCategory")
+ @ApiOperation("鍒犻櫎鐗╂祦瀹㈡埛鍒嗙被")
+ public Result deleteCustomerCategory(String id) {
+
+ final boolean b = customerCategoryService.removeById(id);
+ if (b) {
+ return ResultUtil.success("鍒犻櫎鎴愬姛锛");
+ } else {
+ return ResultUtil.error("鍒犻櫎澶辫触锛");
+ }
+ }
+
+ /**
+ * 鍒嗛〉鏌ヨ鐗╂祦瀹㈡埛鍒嗙被
+ *
+ * @param logisticsRouteQueryVo
+ * @return Result>
+ * @author 鐜嬪瘜搴
+ * @date 2024/8/24
+ */
+ @RequestMapping(value = "/getCustomerCategoryPageList", method = RequestMethod.POST)
+ @ApiOperation(value = "鍒嗛〉鏌ヨ鐗╂祦瀹㈡埛鍒嗙被")
+ public Result> getCustomerCategoryPageList(@RequestBody(required = false) CustomerCategoryQueryVo logisticsRouteQueryVo) {
+ final IPage result = customerCategoryService.getCustomerCategoryPageList(logisticsRouteQueryVo);
+ return new ResultUtil>().setData(result);
+ }
+
+ /**
+ * 鏍规嵁搴楅摵id鏌ヨ鎵鏈夊鎴峰垎绫
+ *
+ * @param shopId
+ * @return Result>
+ * @author 鐜嬪瘜搴
+ * @date 2024/8/28
+ */
+ @RequestMapping(value = "/getCustomerCategoryListByShopId", method = RequestMethod.POST)
+ @ApiOperation(value = "鏍规嵁搴楅摵id鏌ヨ鎵鏈夊鎴峰垎绫")
+ public Result> getCustomerCategoryListByShopId(String shopId) {
+ if (StringUtils.isEmpty(shopId)) {
+ return ResultUtil.error("搴楅摵淇℃伅涓嶈兘涓虹┖锛");
+ }
+ final List result = customerCategoryService.getCustomerCategoryListByShopId(shopId);
+ return new ResultUtil>().setData(result);
+ }
+
+ /**
+ * 鎵归噺鏂板鐗╂祦瀹㈡埛鍒嗙被
+ * @author 鐜嬪瘜搴
+ * @date 2024/9/6
+ * @param customerCategoryList
+ * @return Result
+ */
+ @PostMapping(value = "/addCustomerCategoryList")
+ @ApiOperation("鎵归噺鏂板鐗╂祦瀹㈡埛鍒嗙被")
+ public Result addCustomerCategoryList(@RequestBody List customerCategoryList) {
+
+ final boolean b = customerCategoryService.saveBatch(customerCategoryList);
+ if (b) {
+ return ResultUtil.success("淇濆瓨鎴愬姛锛");
+ } else {
+ return ResultUtil.error("淇濆瓨澶辫触锛");
+ }
+ }
+}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/entity/CustomerCategory.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/entity/CustomerCategory.java
new file mode 100644
index 00000000..9df2e358
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/entity/CustomerCategory.java
@@ -0,0 +1,29 @@
+package cc.hiver.mall.customercategory.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;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 鐗╂祦瀹㈡埛鍒嗙被瀹炰綋
+ *
+ * @author 鐜嬪瘜搴
+ * @date 2024/8/24
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel(value = "鐗╂祦瀹㈡埛鍒嗙被琛")
+@TableName(value = "t_customer_category", autoResultMap = true)
+public class CustomerCategory extends HiverBaseEntity {
+
+ private static final long serialVersionUID = 1L;
+ @ApiModelProperty(value = "搴楅摵id")
+ private String shopId;
+
+ @ApiModelProperty(value = "鍒嗙被鍚嶇О")
+ private String categoryName;
+
+}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/mapper/CustomerCategoryMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/mapper/CustomerCategoryMapper.java
new file mode 100644
index 00000000..523946e0
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/mapper/CustomerCategoryMapper.java
@@ -0,0 +1,34 @@
+package cc.hiver.mall.customercategory.mapper;
+
+import cc.hiver.mall.customercategory.entity.CustomerCategory;
+import cc.hiver.mall.customercategory.vo.CustomerCategoryQueryVo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface CustomerCategoryMapper extends BaseMapper {
+
+ /**
+ * 鍒嗛〉鏌ヨ鐗╂祦瀹㈡埛鍒嗙被
+ *
+ * @param page
+ * @param logisticsRouteQueryVo
+ * @return IPage
+ * @author 鐜嬪瘜搴
+ * @date 2024/8/24
+ */
+ IPage getCustomerCategoryPageList(Page page, @Param("queryParams") CustomerCategoryQueryVo logisticsRouteQueryVo);
+
+ /**
+ * 鏍规嵁搴楅摵id鏌ヨ鎵鏈夊鎴峰垎绫
+ *
+ * @param shopId
+ * @return List
+ * @author 鐜嬪瘜搴
+ * @date 2024/8/28
+ */
+ List getCustomerCategoryListByShopId(@Param("shopId")String shopId);
+}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/service/CustomerCategoryService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/service/CustomerCategoryService.java
new file mode 100644
index 00000000..6e53ff0d
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/service/CustomerCategoryService.java
@@ -0,0 +1,31 @@
+package cc.hiver.mall.customercategory.service;
+
+import cc.hiver.mall.customercategory.entity.CustomerCategory;
+import cc.hiver.mall.customercategory.vo.CustomerCategoryQueryVo;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+public interface CustomerCategoryService extends IService {
+
+ /**
+ * 鍒嗛〉鏌ヨ鐗╂祦瀹㈡埛鍒嗙被
+ *
+ * @param customerCategoryQueryVo
+ * @return IPage
+ * @author 鐜嬪瘜搴
+ * @date 2024/8/24
+ */
+ IPage getCustomerCategoryPageList(CustomerCategoryQueryVo customerCategoryQueryVo);
+
+ /**
+ * 鏍规嵁搴楅摵id鏌ヨ鎵鏈夊鎴峰垎绫
+ *
+ * @param shopId
+ * @return List
+ * @author 鐜嬪瘜搴
+ * @date 2024/8/28
+ */
+ List getCustomerCategoryListByShopId(String shopId);
+}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/service/impl/CustomerCategoryServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/service/impl/CustomerCategoryServiceImpl.java
new file mode 100644
index 00000000..d0deae33
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/service/impl/CustomerCategoryServiceImpl.java
@@ -0,0 +1,47 @@
+package cc.hiver.mall.customercategory.service.impl;
+
+import cc.hiver.mall.customercategory.entity.CustomerCategory;
+import cc.hiver.mall.customercategory.mapper.CustomerCategoryMapper;
+import cc.hiver.mall.customercategory.service.CustomerCategoryService;
+import cc.hiver.mall.customercategory.vo.CustomerCategoryQueryVo;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class CustomerCategoryServiceImpl extends ServiceImpl implements CustomerCategoryService {
+
+ @Autowired
+ private CustomerCategoryMapper customerCategoryMapper;
+
+ /**
+ * 鍒嗛〉鏌ヨ鐗╂祦瀹㈡埛鍒嗙被
+ *
+ * @param logisticsRouteQueryVo
+ * @return IPage
+ * @author 鐜嬪瘜搴
+ * @date 2024/8/24
+ */
+ @Override
+ public IPage getCustomerCategoryPageList(CustomerCategoryQueryVo logisticsRouteQueryVo) {
+ final Page page = new Page<>(logisticsRouteQueryVo.getPageNum(), logisticsRouteQueryVo.getPageSize());
+ return customerCategoryMapper.getCustomerCategoryPageList(page, logisticsRouteQueryVo);
+ }
+
+ /**
+ * 鏍规嵁搴楅摵id鏌ヨ鎵鏈夊鎴峰垎绫
+ *
+ * @param shopId
+ * @return List
+ * @author 鐜嬪瘜搴
+ * @date 2024/8/28
+ */
+ @Override
+ public List getCustomerCategoryListByShopId(String shopId) {
+ return customerCategoryMapper.getCustomerCategoryListByShopId(shopId);
+ }
+}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/vo/CustomerCategoryQueryVo.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/vo/CustomerCategoryQueryVo.java
new file mode 100644
index 00000000..7802fbe5
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/customercategory/vo/CustomerCategoryQueryVo.java
@@ -0,0 +1,22 @@
+package cc.hiver.mall.customercategory.vo;
+
+import cc.hiver.core.base.HiverBasePageQuery;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 鐗╂祦瀹㈡埛鍒嗙被鏌ヨ鍙傛暟
+ * @author 鐜嬪瘜搴
+ * @date 2024/8/24
+ */
+@Data
+public class CustomerCategoryQueryVo extends HiverBasePageQuery {
+
+ private static final long serialVersionUID = 1L;
+ @ApiModelProperty(value = "搴楅摵id")
+ private String shopId;
+
+ @ApiModelProperty(value = "鍒嗙被鍚嶇О")
+ private String categoryName;
+
+}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Customer.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Customer.java
index a7dd4638..b88877d3 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Customer.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Customer.java
@@ -77,4 +77,12 @@ public class Customer implements Serializable {
@ApiModelProperty(value = "鏈熷垵娆犳")
private BigDecimal amountOwed;
+ // 鍒嗙被id
+ @ApiModelProperty(value = "瀹㈡埛鍒嗙被id")
+ private String categoryId;
+
+ // 鍒嗙被鍚嶇О
+ @ApiModelProperty(value = "瀹㈡埛鍒嗙被鍚嶇О")
+ private String categoryName;
+
}
\ No newline at end of file
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Product.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Product.java
index 3a1eb689..833f517c 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Product.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Product.java
@@ -114,4 +114,7 @@ public class Product implements Serializable {
@ApiModelProperty(value = "鍏ュ簱鐘舵侊細0锛氬緟鍏ュ簱锛堟湭缁存姢瀵瑰簲鐨勯噰璐环淇℃伅锛夛紱1锛氬凡鍏ュ簱锛涙柊澧炲晢鍝佹椂涓哄凡鍏ュ簱")
private Integer inStorageStatus = 1;
+ @ApiModelProperty(value = "瀹㈡埛鍒嗙被浠锋牸瑙勫垯")
+ private String customerCategoryRule;
+
}
\ No newline at end of file
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductServiceImpl.java
index 47075691..5201a210 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductServiceImpl.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductServiceImpl.java
@@ -18,6 +18,7 @@ import cc.hiver.mall.productpicture.service.ProductPictureService;
import cc.hiver.mall.service.mybatis.ProductCategoryService;
import cc.hiver.mall.service.mybatis.ProductService;
import cc.hiver.mall.service.mybatis.StockService;
+import cc.hiver.mall.utils.DateUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -51,6 +52,10 @@ public class ProductServiceImpl extends ServiceImpl impl
@Override
public IPage getShareList(ProductPageQuery productPageQuery) {
+ if(StringUtils.isNotEmpty(productPageQuery.getEndDate())){
+ // 鍔犱竴澶
+ productPageQuery.setEndDate(DateUtil.addDay(productPageQuery.getEndDate(), 1));
+ }
final Page page = new Page<>(productPageQuery.getPageNum(), productPageQuery.getPageSize());
final List list = baseMapper.getShareList(page, productPageQuery);
// 鑾峰彇鍟嗗搧瀛愬浘
diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/CustomerCategoryMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/CustomerCategoryMapper.xml
new file mode 100644
index 00000000..a0c322e7
--- /dev/null
+++ b/hiver-modules/hiver-mall/src/main/resources/mapper/CustomerCategoryMapper.xml
@@ -0,0 +1,158 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, create_by,create_by_name, create_time, del_flag, update_by, update_time, shop_id, category_name
+
+
+
+
+
+ delete from t_customer_category
+ where id = #{id,jdbcType=VARCHAR}
+
+
+
+ insert into t_customer_category
+ (id, create_by,create_by_name, create_time, del_flag, update_by, update_time, shop_id, category_name)
+ values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createByName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
+ #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
+ #{shopId,jdbcType=VARCHAR}, #{categoryName,jdbcType=VARCHAR})
+
+
+
+ update t_customer_category
+
+
+ id = #{record.id,jdbcType=VARCHAR},
+
+
+ create_by = #{record.createBy,jdbcType=VARCHAR},
+
+
+ create_by_name = #{record.createByName,jdbcType=VARCHAR},
+
+
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
+
+
+ del_flag = #{record.delFlag,jdbcType=INTEGER},
+
+
+ update_by = #{record.updateBy,jdbcType=VARCHAR},
+
+
+ update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+
+
+ shop_id = #{record.shopId,jdbcType=VARCHAR},
+
+
+ category_name = #{record.categoryName,jdbcType=VARCHAR},
+
+
+
+
+
+ update t_customer_category
+ set id = #{record.id,jdbcType=VARCHAR},
+ create_by = #{record.createBy,jdbcType=VARCHAR},
+ create_by_name = #{record.createByName,jdbcType=VARCHAR},
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
+ del_flag = #{record.delFlag,jdbcType=INTEGER},
+ update_by = #{record.updateBy,jdbcType=VARCHAR},
+ update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+ shop_id = #{record.shopId,jdbcType=VARCHAR},
+ category_name = #{record.categoryName,jdbcType=VARCHAR}
+
+
+
+ update t_customer_category
+
+
+ create_by = #{createBy,jdbcType=VARCHAR},
+
+
+ create_by_name = #{createByName,jdbcType=VARCHAR},
+
+
+ create_time = #{createTime,jdbcType=TIMESTAMP},
+
+
+ del_flag = #{delFlag,jdbcType=INTEGER},
+
+
+ update_by = #{updateBy,jdbcType=VARCHAR},
+
+
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
+
+
+ shop_id = #{shopId,jdbcType=VARCHAR},
+
+
+ category_name = #{categoryName,jdbcType=VARCHAR},
+
+
+ where id = #{id,jdbcType=VARCHAR}
+
+
+
+ update t_customer_category
+ set create_by = #{createBy,jdbcType=VARCHAR},
+ create_by_name = #{createByName,jdbcType=VARCHAR},
+ create_time = #{createTime,jdbcType=TIMESTAMP},
+ del_flag = #{delFlag,jdbcType=INTEGER},
+ update_by = #{updateBy,jdbcType=VARCHAR},
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
+ shop_id = #{shopId,jdbcType=VARCHAR},
+ category_name = #{categoryName,jdbcType=VARCHAR}
+ where id = #{id,jdbcType=VARCHAR}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/CustomerMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/CustomerMapper.xml
index 2b5e37d7..289bccd3 100644
--- a/hiver-modules/hiver-mall/src/main/resources/mapper/CustomerMapper.xml
+++ b/hiver-modules/hiver-mall/src/main/resources/mapper/CustomerMapper.xml
@@ -17,6 +17,8 @@
+
+
@@ -83,7 +85,7 @@
id, create_by, create_time, del_flag, update_by, update_time, name, sex, phone, address,
- province, city, area, shop_id, user_id
+ province, city, area, shop_id, user_id, category_id, category_name
@@ -93,7 +94,7 @@
id, create_by, create_time, del_flag, update_by, update_time, product_name, unit,
shop_id, category_id,attr_id, attribute_list, supplier_id,supplier_name, product_sn, barcode, price, purchase_price,
wholesale_price, product_picture, product_video, product_intro, sales_week, print_barcode,
- tail_warn,in_storage_status
+ tail_warn,in_storage_status,customer_category_rule
select
@@ -134,7 +135,7 @@
product_sn, barcode, price,
purchase_price, wholesale_price, product_picture,
product_video, product_intro, sales_week,
- print_barcode, tail_warn,in_storage_status)
+ print_barcode, tail_warn,in_storage_status,customer_category_rule)
values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{productName,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR},
@@ -143,7 +144,8 @@
#{purchasePrice,jdbcType=DECIMAL}, #{wholesalePrice,jdbcType=DECIMAL},
#{productPicture,jdbcType=VARCHAR},
#{productVideo,jdbcType=VARCHAR}, #{productIntro,jdbcType=VARCHAR}, #{salesWeek,jdbcType=TIMESTAMP},
- #{printBarcode,jdbcType=VARCHAR}, #{tailWarn,jdbcType=INTEGER}, #{inStorageStatus,jdbcType=INTEGER})
+ #{printBarcode,jdbcType=VARCHAR}, #{tailWarn,jdbcType=INTEGER}, #{inStorageStatus,jdbcType=INTEGER},
+ #{customerCategoryRule,jdbcType=VARCHAR})
insert into t_product
@@ -223,6 +225,9 @@
in_storage_status,
+
+ customer_category_rule,
+
@@ -300,6 +305,9 @@
#{inStorageStatus,jdbcType=INTEGER},
+
+ #{customerCategoryRule,jdbcType=VARCHAR},
+
@@ -386,6 +394,9 @@
in_storage_status = #{record.inStorageStatus,jdbcType=INTEGER},
+
+ customer_category_rule = #{record.customerCategoryRule,jdbcType=VARCHAR},
+
@@ -417,7 +428,8 @@
sales_week = #{record.salesWeek,jdbcType=TIMESTAMP},
print_barcode = #{record.printBarcode,jdbcType=VARCHAR},
tail_warn = #{record.tailWarn,jdbcType=INTEGER},
- in_storage_status = #{record.inStorageStatus,jdbcType=INTEGER}
+ in_storage_status = #{record.inStorageStatus,jdbcType=INTEGER},
+ customer_category_rule = #{record.customerCategoryRule,jdbcType=VARCHAR}
@@ -497,6 +509,9 @@
in_storage_status = #{inStorageStatus,jdbcType=INTEGER},
+
+ customer_category_rule = #{customerCategoryRule,jdbcType=VARCHAR},
+
where id = #{id,jdbcType=VARCHAR}
@@ -525,7 +540,8 @@
sales_week = #{salesWeek,jdbcType=TIMESTAMP},
print_barcode = #{printBarcode,jdbcType=VARCHAR},
tail_warn = #{tailWarn,jdbcType=INTEGER},
- in_storage_status = #{inStorageStatus,jdbcType=INTEGER}
+ in_storage_status = #{inStorageStatus,jdbcType=INTEGER},
+ customer_category_rule = #{customerCategoryRule,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
@@ -558,8 +574,11 @@
t.print_barcode,
t.tail_warn,
t.in_storage_status,
- COALESCE(ss.stock_count, 0) AS stock_count,
- COALESCE(sd.total_sold, 0) AS total_sold
+ t.customer_category_rule,
+ COALESCE(ss.stock_count, 0) AS stock_count
+
+ , COALESCE(sd.total_sold, 0) AS total_sold
+
FROM t_product t
LEFT JOIN (
SELECT