下单支持堂食外带, 增加餐位费, 多次下单功能

This commit is contained in:
2024-09-25 11:11:27 +08:00
parent 31b92e21c4
commit 0f702ecbe5
19 changed files with 576 additions and 47 deletions

View File

@@ -0,0 +1,18 @@
package com.chaozhanggui.system.cashierservice.entity.Enum;
import lombok.Getter;
/**
* 订餐用餐类型枚举
*/
@Getter
public enum OrderUseTypeEnum {
TAKEOUT("takeout"),
DINE_IN_AFTER("dine-in-after"),
DINE_IN_BEFORE("dine-in-before");
private final String value;
OrderUseTypeEnum(String value) {
this.value = value;
}
}

View File

@@ -0,0 +1,13 @@
package com.chaozhanggui.system.cashierservice.entity.Enum;
import lombok.Getter;
@Getter
public enum PlatformTypeEnum {
MINI_APP("miniapp");
private final String value;
PlatformTypeEnum(String value) {
this.value = value;
}
}

View File

@@ -0,0 +1,18 @@
package com.chaozhanggui.system.cashierservice.entity.Enum;
import lombok.Getter;
/**
* 店铺就餐类型
*/
@Getter
public enum ShopInfoEatModelEnum {
TAKE_OUT("take-out"),
DINE_IN("dine-in");
private final String value;
ShopInfoEatModelEnum(String value) {
this.value = value;
}
}

View File

@@ -0,0 +1,20 @@
package com.chaozhanggui.system.cashierservice.entity.Enum;
import lombok.Getter;
/**
* 店铺注册类型枚举
*/
@Getter
public enum ShopInfoRegisterlEnum {
// 快餐版
MUNCHIES("munchies"),
// 餐饮版
RESTAURANT("restaurant");
private final String value;
ShopInfoRegisterlEnum(String value) {
this.value = value;
}
}

View File

@@ -1,5 +1,8 @@
package com.chaozhanggui.system.cashierservice.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
@@ -8,6 +11,7 @@ import java.math.BigDecimal;
@Data
public class TbCashierCart implements Serializable {
@TableId(type = IdType.AUTO)
private Integer id;
private String masterId;
@@ -59,7 +63,13 @@ public class TbCashierCart implements Serializable {
private Integer userId;
private String tableId;
private Byte isVip;
@TableField(exist = false)
private TbProductSpec tbProductSpec;
private String note;
private String platformType;
private String useType;
private Integer placeNum;
private static final long serialVersionUID = 1L;
@@ -70,4 +80,4 @@ public class TbCashierCart implements Serializable {
return "";
}
}
}
}

View File

@@ -1,5 +1,6 @@
package com.chaozhanggui.system.cashierservice.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.io.Serializable;
@@ -37,7 +38,12 @@ public class TbOrderDetail implements Serializable {
private BigDecimal priceAmount;
private BigDecimal packAmount;
@TableField(exist = false)
private String remark;
private Integer cartId;
private Integer placeNum;
private String useType;
private static final long serialVersionUID = 1L;
}

View File

@@ -1,5 +1,8 @@
package com.chaozhanggui.system.cashierservice.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.io.Serializable;
@@ -8,6 +11,7 @@ import java.util.List;
@Data
public class TbOrderInfo implements Serializable {
@TableId(type = IdType.AUTO)
private Integer id;
//订单号
@@ -58,11 +62,15 @@ public class TbOrderInfo implements Serializable {
private Byte isVip;
private String memberId;
@TableField(exist = false)
private String userName;
@TableField(exist = false)
private String memberName;
@TableField(exist = false)
private String zdNo;
private String userId;
@TableField(exist = false)
private String imgUrl;
private Integer productScore;
@@ -97,16 +105,25 @@ public class TbOrderInfo implements Serializable {
private String masterId;
private String isBuyCoupon;
private String isUseCoupon;
@TableField(exist = false)
private Integer totalNumber;
@TableField(exist = false)
private List<TbOrderDetail> detailList;
@TableField(exist = false)
private String winnnerNo;
@TableField(exist = false)
private String isWinner;
@TableField(exist = false)
private String shopName;
private String useType;
// 下单次数
private Integer placeNum;
//根据状态返回 需付款 已付款 未付款 已退
@TableField(exist = false)
private String description;
public void setDescription(String shopName) {

View File

@@ -1,5 +1,7 @@
package com.chaozhanggui.system.cashierservice.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.math.BigDecimal;
@@ -36,6 +38,7 @@ public class TbShopTable implements Serializable {
private String qrcode;
@TableField(exist = false)
private String areaname;
@@ -176,4 +179,4 @@ public class TbShopTable implements Serializable {
public void setUpdatedAt(Long updatedAt) {
this.updatedAt = updatedAt;
}
}
}

View File

@@ -0,0 +1,18 @@
package com.chaozhanggui.system.cashierservice.entity.dto;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@Data
public class ChoseCountDTO {
@NotNull
private Integer shopId;
@NotEmpty
private String tableId;
@NotNull
@Min(1)
private Integer num;
}

View File

@@ -0,0 +1,16 @@
package com.chaozhanggui.system.cashierservice.entity.dto;
import com.chaozhanggui.system.cashierservice.entity.TbShopInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
@Data
@AllArgsConstructor
public class ShopEatTypeInfoDTO {
private boolean isTakeout;
private boolean isMunchies;
private boolean isDineInAfter;
private boolean isDineInBefore;
private TbShopInfo shopInfo;
private String useType;
}