霸王餐接口
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
package com.czg.account.dto.freeding;
|
||||
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
*/
|
||||
@Data
|
||||
public class FreeDineConfigEditDTO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@NotNull
|
||||
private Integer id;
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private Boolean enable;
|
||||
/**
|
||||
* 充值倍数
|
||||
*/
|
||||
@Min(1)
|
||||
private Integer rechargeTimes;
|
||||
/**
|
||||
* 满多少可用
|
||||
*/
|
||||
@Min(value = 0)
|
||||
private BigDecimal rechargeThreshold;
|
||||
/**
|
||||
* 与优惠券同享
|
||||
*/
|
||||
private Boolean withCoupon;
|
||||
/**
|
||||
* 积分同享
|
||||
*/
|
||||
private Boolean withPoints;
|
||||
/**
|
||||
* 充值说明
|
||||
*/
|
||||
private String rechargeDesc;
|
||||
/**
|
||||
* 使用类型 dine-in店内 takeout 自取 post快递,takeaway外卖
|
||||
*/
|
||||
private List<String> useType;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.czg.account.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
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 zs
|
||||
* @since 2025-02-21
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("tb_free_dine_config")
|
||||
public class FreeDineConfig implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private Boolean enable;
|
||||
|
||||
/**
|
||||
* 充值多少倍免单
|
||||
*/
|
||||
private Integer rechargeTimes;
|
||||
|
||||
/**
|
||||
* 订单满多少元可以使用
|
||||
*/
|
||||
private BigDecimal rechargeThreshold;
|
||||
|
||||
/**
|
||||
* 是否与优惠券共享
|
||||
*/
|
||||
private Boolean withCoupon;
|
||||
|
||||
/**
|
||||
* 是否与积分同享
|
||||
*/
|
||||
private Boolean withPoints;
|
||||
|
||||
/**
|
||||
* 充值说明
|
||||
*/
|
||||
private String rechargeDesc;
|
||||
|
||||
/**
|
||||
* 使用类型 dine-in店内 takeout 自取 post快递,takeaway外卖
|
||||
*/
|
||||
private String useType;
|
||||
|
||||
/**
|
||||
* 门店id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 可用的子门店id
|
||||
*/
|
||||
private String childShopIdList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.czg.account.service;
|
||||
|
||||
import com.czg.account.dto.freeding.FreeDineConfigEditDTO;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.account.entity.FreeDineConfig;
|
||||
|
||||
/**
|
||||
* 霸王餐配置信息表 服务层。
|
||||
*
|
||||
* @author zs
|
||||
* @since 2025-02-21
|
||||
*/
|
||||
public interface FreeDineConfigService extends IService<FreeDineConfig> {
|
||||
|
||||
FreeDineConfig getConfig(long shopId);
|
||||
|
||||
Boolean edit(long shopId, FreeDineConfigEditDTO freeDineConfigEditDTO);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user