日志记录
This commit is contained in:
@@ -18,9 +18,13 @@ package cn.ysk.cashier.mapper.product;
|
||||
import cn.ysk.cashier.base.BaseMapper;
|
||||
import cn.ysk.cashier.pojo.product.TbProduct;
|
||||
import cn.ysk.cashier.dto.product.TbProductDto;
|
||||
import cn.ysk.cashier.utils.ListUtil;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
@@ -28,5 +32,18 @@ import org.mapstruct.ReportingPolicy;
|
||||
**/
|
||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface TbProductMapper extends BaseMapper<TbProductDto, TbProduct> {
|
||||
default List<Integer> map(String value) {
|
||||
return ListUtil.stringChangeIntegerList(value);
|
||||
}
|
||||
|
||||
// 如果需要从DTO转回实体,也可能需要实现反向的映射方法
|
||||
default String map(List<Integer> values) {
|
||||
if (values == null || values.isEmpty()) {
|
||||
return "";
|
||||
}
|
||||
// 将整数列表转换为由逗号分隔的字符串
|
||||
return values.stream()
|
||||
.map(String::valueOf)
|
||||
.collect(Collectors.joining(","));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package cn.ysk.cashier.mapper.shop;
|
||||
|
||||
//import base.cn.ysk.cashier.BaseMapper;
|
||||
import cn.ysk.cashier.base.BaseMapper;
|
||||
import cn.ysk.cashier.dto.shop.TbCouponCategoryDto;
|
||||
import cn.ysk.cashier.pojo.shop.TbCouponCategory;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
/**
|
||||
* @author ww
|
||||
* @date 2024-04-25
|
||||
**/
|
||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface TbCouponCategoryMapper extends BaseMapper<TbCouponCategoryDto, TbCouponCategory> {
|
||||
|
||||
}
|
||||
@@ -16,7 +16,7 @@
|
||||
package cn.ysk.cashier.mapper.shop;
|
||||
|
||||
import cn.ysk.cashier.base.BaseMapper;
|
||||
import cn.ysk.cashier.controller.shop.TbPrintMachine;
|
||||
import cn.ysk.cashier.pojo.shop.TbPrintMachine;
|
||||
import cn.ysk.cashier.dto.shop.TbPrintMachineDto;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package cn.ysk.cashier.mapper.shop;
|
||||
|
||||
import cn.ysk.cashier.base.BaseMapper;
|
||||
import cn.ysk.cashier.dto.shop.TbPurchaseNoticeDto;
|
||||
import cn.ysk.cashier.pojo.shop.TbPurchaseNotice;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author ww
|
||||
* @date 2024-04-25
|
||||
**/
|
||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface TbPurchaseNoticeMapper extends BaseMapper<TbPurchaseNoticeDto, TbPurchaseNotice> {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user