优惠券 记录
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package com.czg.account.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author ww
|
||||
*/
|
||||
@Data
|
||||
public class QueryReceiveDto {
|
||||
@NotBlank(message = "优惠券id 不可为空")
|
||||
private Long couponId;
|
||||
@NotBlank(message = "店铺Id 不可为空")
|
||||
private Long shopId;
|
||||
//用户昵称 手机号 模糊
|
||||
private String value;
|
||||
//状态 0未使用 1已使用 2已过期
|
||||
private Integer status;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.czg.account.service;
|
||||
|
||||
import com.czg.account.dto.QueryReceiveDto;
|
||||
import com.czg.account.vo.CouponReceiveVo;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.account.entity.ShopActivateCouponRecord;
|
||||
|
||||
@@ -11,4 +14,6 @@ import com.czg.account.entity.ShopActivateCouponRecord;
|
||||
*/
|
||||
public interface ShopActivateCouponRecordService extends IService<ShopActivateCouponRecord> {
|
||||
|
||||
|
||||
Page<CouponReceiveVo> queryReceive(Page<CouponReceiveVo> page, QueryReceiveDto param);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.czg.account.service;
|
||||
|
||||
import com.czg.account.dto.QueryReceiveDto;
|
||||
import com.czg.account.dto.ShopCouponDTO;
|
||||
import com.czg.account.entity.ShopActivateCouponRecord;
|
||||
import com.czg.account.entity.ShopCoupon;
|
||||
import com.czg.account.vo.CouponReceiveVo;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
@@ -28,6 +31,8 @@ public interface ShopCouponService extends IService<ShopCoupon> {
|
||||
|
||||
Boolean edit(ShopCouponDTO couponDTO);
|
||||
|
||||
Page<CouponReceiveVo> queryReceive(QueryReceiveDto param);
|
||||
|
||||
|
||||
List<ShopActivateCouponRecord> find(Long shopUserId, Integer status);
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.czg.account.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 券记录ID
|
||||
* @author ww
|
||||
*/
|
||||
@Data
|
||||
public class CouponReceiveVo {
|
||||
/**
|
||||
* 券记录ID
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* shopUserId
|
||||
*/
|
||||
private Integer userId;
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 用户手机号
|
||||
*/
|
||||
private String phone;
|
||||
/**
|
||||
* 券领取时间
|
||||
*/
|
||||
private String receiveTime;
|
||||
/**
|
||||
* 券使用时间
|
||||
*/
|
||||
private String useTime;
|
||||
/**
|
||||
* 券来源
|
||||
*/
|
||||
private String source;
|
||||
/**
|
||||
* 券状态
|
||||
* 未使用 0
|
||||
* 已使用 1
|
||||
* 已过期 2
|
||||
*/
|
||||
private String status;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -111,4 +111,11 @@ public class OrderInfoAddDTO implements Serializable {
|
||||
public String getDineMode() {
|
||||
return StrUtil.isBlank(dineMode) ? "dine-in" : dineMode;
|
||||
}
|
||||
|
||||
public Integer getPlaceNum() {
|
||||
if (placeNum == null || placeNum == 0) {
|
||||
return 1;
|
||||
}
|
||||
return placeNum;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user