Merge branch 'test' into prod
# Conflicts: # cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkDistributionUserServiceImpl.java # cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkShareBaseServiceImpl.java
This commit is contained in:
@@ -30,10 +30,7 @@
|
||||
<groupId>com.mybatis-flex</groupId>
|
||||
<artifactId>mybatis-flex-processor</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.pig4cloud.excel</groupId>
|
||||
<artifactId>excel-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.dubbo</groupId>
|
||||
<artifactId>dubbo-spring-boot-starter</artifactId>
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.math.BigDecimal;
|
||||
@Data
|
||||
public class ShopInfoEditDTO {
|
||||
@NotNull(message = "id不为空")
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
private String code;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.czg.account.entity;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.czg.utils.CzgRandomUtils;
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
@@ -152,22 +151,6 @@ public class ShopUser implements Serializable {
|
||||
private LocalDateTime nextDeliverTime;
|
||||
// 是否分销员
|
||||
private String distributionShops;
|
||||
/**
|
||||
* 上级分销员id
|
||||
*/
|
||||
private Long parentUserId;
|
||||
/**
|
||||
* 上上级分销员id
|
||||
*/
|
||||
private Long gradeUserId;
|
||||
/**
|
||||
* 一级分销收入
|
||||
*/
|
||||
private BigDecimal oneIncome;
|
||||
/**
|
||||
* 二级分销收入
|
||||
*/
|
||||
private BigDecimal twoIncome;
|
||||
|
||||
private String memberCircleName;
|
||||
private Integer memberCircleReward;
|
||||
@@ -179,8 +162,6 @@ public class ShopUser implements Serializable {
|
||||
private Integer discount;
|
||||
@Column(ignore = true)
|
||||
private Integer isMemberPrice;
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime inviteTime;
|
||||
|
||||
/**
|
||||
* 添加或更新分销店铺:若shopId已存在(无论后缀),则替换为新的id_后缀;否则插入
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.czg.account.vo;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnore;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.pig4cloud.plugin.excel.annotation.ExcelLine;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
@@ -26,7 +25,6 @@ public class HandoverProductListVo implements Serializable {
|
||||
/**
|
||||
* 导入时候回显行号
|
||||
*/
|
||||
@ExcelLine
|
||||
@ExcelIgnore
|
||||
@JSONField(serialize = false)
|
||||
private Long lineNum;
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.czg.market.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 全民股东邀请关系 实体类。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2026-01-31
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("mk_distribution_invite")
|
||||
public class MkDistributionInvite implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 店铺Id
|
||||
*/
|
||||
private Long shopId;
|
||||
/**
|
||||
* 用户Id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 用户Id
|
||||
*/
|
||||
private Long shopUserId;
|
||||
|
||||
/**
|
||||
* 邀请人ID mk_distribution_user.id
|
||||
*/
|
||||
private Long parentUserId;
|
||||
|
||||
/**
|
||||
* 邀请人上级ID mk_distribution_user.id
|
||||
*/
|
||||
private Long gradeUserId;
|
||||
|
||||
/**
|
||||
* 一级分润
|
||||
*/
|
||||
private BigDecimal oneIncome;
|
||||
|
||||
/**
|
||||
* 二级分润
|
||||
*/
|
||||
private BigDecimal twoIncome;
|
||||
|
||||
/**
|
||||
* 邀请时间
|
||||
*/
|
||||
private LocalDateTime inviteTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.czg.market.service;
|
||||
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.market.entity.MkDistributionInvite;
|
||||
|
||||
/**
|
||||
* 全民股东邀请关系 服务层。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2026-01-31
|
||||
*/
|
||||
public interface MkDistributionInviteService extends IService<MkDistributionInvite> {
|
||||
|
||||
MkDistributionInvite getByShopIdAndShopUserId(Long shopId, Long shopUserId);
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.czg.order.entity;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnore;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
@@ -59,42 +59,42 @@ public class ShopProdStatistic implements Serializable {
|
||||
* 销售数量
|
||||
*/
|
||||
@ExcelProperty("销量")
|
||||
@ColumnWidth(5)
|
||||
@ColumnWidth(15)
|
||||
private BigDecimal saleCount;
|
||||
|
||||
/**
|
||||
* 销售金额
|
||||
*/
|
||||
@ExcelProperty("销售金额")
|
||||
@ColumnWidth(7)
|
||||
@ColumnWidth(15)
|
||||
private BigDecimal saleAmount;
|
||||
|
||||
/**
|
||||
* 退单量
|
||||
*/
|
||||
@ExcelProperty("退单量")
|
||||
@ColumnWidth(5)
|
||||
@ColumnWidth(15)
|
||||
private BigDecimal refundCount;
|
||||
|
||||
/**
|
||||
* 退单金额
|
||||
*/
|
||||
@ExcelProperty("退款金额")
|
||||
@ColumnWidth(7)
|
||||
@ColumnWidth(15)
|
||||
private BigDecimal refundAmount;
|
||||
|
||||
/**
|
||||
* 实际销售数量(过滤掉退单后的数量)
|
||||
*/
|
||||
@ExcelProperty("实际销量")
|
||||
@ColumnWidth(5)
|
||||
@ColumnWidth(15)
|
||||
private BigDecimal validSaleCount;
|
||||
|
||||
/**
|
||||
* 实际销售金额(过滤掉退单后的金额)
|
||||
*/
|
||||
@ExcelProperty("实际销售额")
|
||||
@ColumnWidth(7)
|
||||
@ColumnWidth(15)
|
||||
private BigDecimal validSaleAmount;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.czg.order.service;
|
||||
|
||||
import com.czg.order.param.TableSummaryParam;
|
||||
import com.czg.order.vo.TableSummaryExportVo;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +15,7 @@ import java.util.List;
|
||||
public interface TableSummaryService {
|
||||
|
||||
|
||||
List<TableSummaryExportVo> summaryExportList(TableSummaryParam param);
|
||||
void summaryExportList(TableSummaryParam param, HttpServletResponse response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.czg.order.vo;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnore;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.pig4cloud.plugin.excel.annotation.ExcelLine;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
@@ -25,7 +24,6 @@ public class TableSummaryExportVo implements Serializable {
|
||||
/**
|
||||
* 导入时候回显行号
|
||||
*/
|
||||
@ExcelLine
|
||||
@ExcelIgnore
|
||||
@JSONField(serialize = false)
|
||||
private Long lineNum;
|
||||
@@ -36,18 +34,20 @@ public class TableSummaryExportVo implements Serializable {
|
||||
private String tableConcatDate;
|
||||
@ExcelIgnore
|
||||
private String tableCode;
|
||||
/**
|
||||
* 台桌
|
||||
*/
|
||||
@ExcelProperty("台桌")
|
||||
@ColumnWidth(10)
|
||||
private String tableName;
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@ExcelProperty("日期")
|
||||
@ColumnWidth(10)
|
||||
@ColumnWidth(15)
|
||||
private String createDate;
|
||||
|
||||
/**
|
||||
* 台桌
|
||||
*/
|
||||
@ExcelProperty("台桌")
|
||||
@ColumnWidth(13)
|
||||
private String tableName;
|
||||
|
||||
/**
|
||||
* 商品分类
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.czg.product.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author yjjie
|
||||
* @date 2026/1/30 18:15
|
||||
*/
|
||||
@Data
|
||||
public class ProductCategoryExportDTO {
|
||||
|
||||
@ExcelProperty("分类名称")
|
||||
private String name;
|
||||
|
||||
|
||||
@ExcelProperty("简称")
|
||||
private String shortName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.czg.product.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 商品单位导出
|
||||
* @author yjjie
|
||||
* @date 2026/1/30 17:51
|
||||
*/
|
||||
@Data
|
||||
public class ProductUnitExportDTO {
|
||||
|
||||
@ExcelProperty("单位名称")
|
||||
private String name;
|
||||
/**
|
||||
* 单位类型 number-计数 weight-记重
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String unitType;
|
||||
@ExcelProperty("单位类型")
|
||||
private String unitTypeRemark;
|
||||
|
||||
/**
|
||||
* 单位来源 1-系统预设 0-商家创建
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private Integer isSystem;
|
||||
@ExcelProperty("单位来源")
|
||||
private String isSystemRemark;
|
||||
|
||||
public String getUnitTypeRemark() {
|
||||
return "number".equals(unitType) ? "计数" : "记重";
|
||||
}
|
||||
|
||||
public String getIsSystemRemark() {
|
||||
return isSystem == 1 ? "系统预设" : "商家创建";
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import com.czg.product.dto.ShopProdCategoryDTO;
|
||||
import com.czg.product.entity.ShopProdCategory;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -30,6 +31,8 @@ public interface ShopProdCategoryService extends IService<ShopProdCategory> {
|
||||
*/
|
||||
List<ShopProdCategoryDTO> getShopProdCategoryList(ShopProdCategoryDTO param);
|
||||
|
||||
void exportShopProdCategory(ShopProdCategoryDTO param, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 获取店铺商品分类详情
|
||||
* @param id id
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.czg.product.dto.ShopProdUnitDTO;
|
||||
import com.czg.product.entity.ShopProdUnit;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -31,6 +32,8 @@ public interface ShopProdUnitService extends IService<ShopProdUnit> {
|
||||
*/
|
||||
List<ShopProdUnitDTO> getShopProdUnitList(ShopProdUnitDTO param);
|
||||
|
||||
void exportShopProdUnit(ShopProdUnitDTO param, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 获取商品单位详情
|
||||
*
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.write.builder.ExcelWriterBuilder;
|
||||
import com.alibaba.excel.write.builder.ExcelWriterSheetBuilder;
|
||||
import com.alibaba.excel.write.handler.SheetWriteHandler;
|
||||
import com.alibaba.excel.write.merge.OnceAbsoluteMergeStrategy;
|
||||
import com.alibaba.excel.write.metadata.WriteSheet;
|
||||
import com.alibaba.excel.write.metadata.style.WriteCellStyle;
|
||||
import com.alibaba.excel.write.style.HorizontalCellStyleStrategy;
|
||||
@@ -26,6 +27,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* EasyExcel导出工具类
|
||||
*
|
||||
* @author yjjie
|
||||
* @date 2026/1/28 10:48
|
||||
*/
|
||||
@@ -34,14 +36,18 @@ public class ExcelExportUtil {
|
||||
|
||||
private static final ExcelExportConfig DEFAULT_CONFIG = new ExcelExportConfig();
|
||||
|
||||
public static OnceAbsoluteMergeStrategy createMergeStrategy(int firstRow, int lastRow, int firstCol, int lastCol) {
|
||||
return new OnceAbsoluteMergeStrategy(firstRow, lastRow, firstCol, lastCol);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出Excel到HttpServletResponse
|
||||
*
|
||||
* @param data 数据列表
|
||||
* @param clazz 数据类型
|
||||
* @param data 数据列表
|
||||
* @param clazz 数据类型
|
||||
* @param fileName 文件名(不含扩展名)
|
||||
* @param response HttpServletResponse
|
||||
* @param <T> 数据类型
|
||||
* @param <T> 数据类型
|
||||
*/
|
||||
public static <T> void exportToResponse(List<T> data, Class<T> clazz,
|
||||
String fileName, HttpServletResponse response) {
|
||||
@@ -51,12 +57,12 @@ public class ExcelExportUtil {
|
||||
/**
|
||||
* 导出Excel到HttpServletResponse(自定义配置)
|
||||
*
|
||||
* @param data 数据列表
|
||||
* @param clazz 数据类型
|
||||
* @param data 数据列表
|
||||
* @param clazz 数据类型
|
||||
* @param fileName 文件名(不含扩展名)
|
||||
* @param config 配置信息
|
||||
* @param config 配置信息
|
||||
* @param response HttpServletResponse
|
||||
* @param <T> 数据类型
|
||||
* @param <T> 数据类型
|
||||
*/
|
||||
public static <T> void exportToResponse(List<T> data, Class<T> clazz,
|
||||
String fileName, ExcelExportConfig config,
|
||||
@@ -86,10 +92,10 @@ public class ExcelExportUtil {
|
||||
/**
|
||||
* 导出Excel到文件
|
||||
*
|
||||
* @param data 数据列表
|
||||
* @param clazz 数据类型
|
||||
* @param data 数据列表
|
||||
* @param clazz 数据类型
|
||||
* @param filePath 文件路径
|
||||
* @param <T> 数据类型
|
||||
* @param <T> 数据类型
|
||||
*/
|
||||
public static <T> void exportToFile(List<T> data, Class<T> clazz, String filePath) {
|
||||
exportToFile(data, clazz, filePath, DEFAULT_CONFIG);
|
||||
@@ -98,11 +104,11 @@ public class ExcelExportUtil {
|
||||
/**
|
||||
* 导出Excel到文件(自定义配置)
|
||||
*
|
||||
* @param data 数据列表
|
||||
* @param clazz 数据类型
|
||||
* @param data 数据列表
|
||||
* @param clazz 数据类型
|
||||
* @param filePath 文件路径
|
||||
* @param config 配置信息
|
||||
* @param <T> 数据类型
|
||||
* @param config 配置信息
|
||||
* @param <T> 数据类型
|
||||
*/
|
||||
public static <T> void exportToFile(List<T> data, Class<T> clazz,
|
||||
String filePath, ExcelExportConfig config) {
|
||||
@@ -124,11 +130,11 @@ public class ExcelExportUtil {
|
||||
/**
|
||||
* 带样式的Excel导出到Response
|
||||
*
|
||||
* @param data 数据列表
|
||||
* @param clazz 数据类型
|
||||
* @param data 数据列表
|
||||
* @param clazz 数据类型
|
||||
* @param fileName 文件名
|
||||
* @param response HttpServletResponse
|
||||
* @param <T> 数据类型
|
||||
* @param <T> 数据类型
|
||||
*/
|
||||
public static <T> void exportWithStyleToResponse(List<T> data, Class<T> clazz,
|
||||
String fileName, HttpServletResponse response) {
|
||||
@@ -162,11 +168,11 @@ public class ExcelExportUtil {
|
||||
* 大数据量分批导出(避免内存溢出)
|
||||
*
|
||||
* @param dataSupplier 数据提供者(分页获取数据)
|
||||
* @param clazz 数据类型
|
||||
* @param fileName 文件名
|
||||
* @param response HttpServletResponse
|
||||
* @param batchSize 每批大小
|
||||
* @param <T> 数据类型
|
||||
* @param clazz 数据类型
|
||||
* @param fileName 文件名
|
||||
* @param response HttpServletResponse
|
||||
* @param batchSize 每批大小
|
||||
* @param <T> 数据类型
|
||||
*/
|
||||
public static <T> void exportBigDataToResponse(DataSupplier<T> dataSupplier,
|
||||
Class<T> clazz, String fileName,
|
||||
@@ -254,13 +260,13 @@ public class ExcelExportUtil {
|
||||
* 带合并单元格的导出到Response
|
||||
* 多sheet导出到response
|
||||
*
|
||||
* @param sheetDataList 数据列表
|
||||
* @param fileName 文件名
|
||||
* @param response HttpServletResponse
|
||||
* @param sheetDataList 数据列表
|
||||
* @param fileName 文件名
|
||||
* @param response HttpServletResponse
|
||||
*/
|
||||
public static void exportMultipleSheetsToResponse(List<SheetData> sheetDataList,
|
||||
String fileName,
|
||||
HttpServletResponse response) {
|
||||
String fileName,
|
||||
HttpServletResponse response) {
|
||||
if (CollectionUtil.isEmpty(sheetDataList)) {
|
||||
throw new CzgException("数据列表不能为空");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user