店铺信息 桌位费 收款码 付款模式 就餐形式
This commit is contained in:
@@ -23,6 +23,7 @@ import javax.persistence.Column;
|
|||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://eladmin.vip
|
* @website https://eladmin.vip
|
||||||
@@ -192,4 +193,10 @@ public class TbShopInfoDto implements Serializable {
|
|||||||
private String isReturn;
|
private String isReturn;
|
||||||
private String isMemberIn;
|
private String isMemberIn;
|
||||||
private String isMemberReturn;
|
private String isMemberReturn;
|
||||||
|
private Integer isTableFee;
|
||||||
|
private BigDecimal tableFee;
|
||||||
|
private List<String> eatModel;
|
||||||
|
//程序码(零点八零首页)
|
||||||
|
private String smallQrcode;
|
||||||
|
private String paymentQrcode;
|
||||||
}
|
}
|
||||||
@@ -18,8 +18,13 @@ package cn.ysk.cashier.mapper.shop;
|
|||||||
import cn.ysk.cashier.base.BaseMapper;
|
import cn.ysk.cashier.base.BaseMapper;
|
||||||
import cn.ysk.cashier.pojo.shop.TbShopInfo;
|
import cn.ysk.cashier.pojo.shop.TbShopInfo;
|
||||||
import cn.ysk.cashier.dto.shop.TbShopInfoDto;
|
import cn.ysk.cashier.dto.shop.TbShopInfoDto;
|
||||||
|
import cn.ysk.cashier.utils.ListUtil;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.ReportingPolicy;
|
import org.mapstruct.ReportingPolicy;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @website https://eladmin.vip
|
* @website https://eladmin.vip
|
||||||
@@ -29,4 +34,19 @@ import org.mapstruct.ReportingPolicy;
|
|||||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||||
public interface TbShopInfoMapper extends BaseMapper<TbShopInfoDto, TbShopInfo> {
|
public interface TbShopInfoMapper extends BaseMapper<TbShopInfoDto, TbShopInfo> {
|
||||||
|
|
||||||
|
// 自定义的字符串到整数列表的转换方法
|
||||||
|
default List<String> map(String value) {
|
||||||
|
return ListUtil.stringChangeStringList(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果需要从DTO转回实体,也可能需要实现反向的映射方法
|
||||||
|
default String map(List<String> values) {
|
||||||
|
if (!CollectionUtils.isEmpty(values)) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
// 将整数列表转换为由逗号分隔的字符串
|
||||||
|
return values.stream()
|
||||||
|
.map(String::valueOf)
|
||||||
|
.collect(Collectors.joining(","));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -258,13 +258,28 @@ public class TbShopInfo implements Serializable {
|
|||||||
@ApiModelProperty(value = "是否允许用户自定义金额")
|
@ApiModelProperty(value = "是否允许用户自定义金额")
|
||||||
private String isMemberIn;
|
private String isMemberIn;
|
||||||
|
|
||||||
|
|
||||||
@Column(name = "is_member_return")
|
@Column(name = "is_member_return")
|
||||||
@ApiModelProperty(value = "是否允许用户自定义金额")
|
@ApiModelProperty(value = "是否允许用户自定义金额")
|
||||||
private String isMemberReturn;
|
private String isMemberReturn;
|
||||||
|
|
||||||
|
@Column(name = "is_table_fee")
|
||||||
|
@ApiModelProperty(value = "是否免除桌位费 0否1是")
|
||||||
|
private Integer isTableFee;
|
||||||
|
|
||||||
|
@Column(name = "tableFee")
|
||||||
|
@ApiModelProperty(value = "桌位费")
|
||||||
|
private BigDecimal tableFee;
|
||||||
|
|
||||||
|
@Column(name = "eat_model")
|
||||||
|
@ApiModelProperty(value = "就餐模式 堂食 dine-in 外带 take-out")
|
||||||
|
private String eatModel;
|
||||||
|
|
||||||
|
@Column(name = "small_qrcode")
|
||||||
|
@ApiModelProperty(value = "程序码(零点八零首页)")
|
||||||
|
private String smallQrcode;
|
||||||
|
@Column(name = "payment_qrcode")
|
||||||
|
@ApiModelProperty(value = "店铺收款码")
|
||||||
|
private String paymentQrcode;
|
||||||
|
|
||||||
public void copy(TbShopInfo source){
|
public void copy(TbShopInfo source){
|
||||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(false));
|
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(false));
|
||||||
|
|||||||
Reference in New Issue
Block a user