Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package com.czg.account.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
@@ -74,6 +74,8 @@ public class ShopActivateCouponRecord implements Serializable {
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
@Column(ignore = true)
|
||||
private String shopName;
|
||||
|
||||
/**
|
||||
* 来源活动id
|
||||
|
||||
@@ -6,10 +6,10 @@ import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Time;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalTime;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
@@ -108,12 +108,12 @@ public class ShopCoupon implements Serializable {
|
||||
/**
|
||||
* 可用开始时间
|
||||
*/
|
||||
private Time useStartTime;
|
||||
private LocalTime useStartTime;
|
||||
|
||||
/**
|
||||
* 可用结束时间
|
||||
*/
|
||||
private Time useEndTime;
|
||||
private LocalTime useEndTime;
|
||||
|
||||
/**
|
||||
* 满多少金额
|
||||
|
||||
@@ -2,10 +2,13 @@ package com.czg.account.service;
|
||||
|
||||
import com.czg.account.dto.QueryReceiveDto;
|
||||
import com.czg.account.vo.CouponReceiveVo;
|
||||
import com.czg.account.vo.UserCouponVo;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.account.entity.ShopActivateCouponRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 活动商品赠送记录表 服务层。
|
||||
*
|
||||
@@ -15,5 +18,9 @@ import com.czg.account.entity.ShopActivateCouponRecord;
|
||||
public interface ShopActivateCouponRecordService extends IService<ShopActivateCouponRecord> {
|
||||
|
||||
|
||||
Page<CouponReceiveVo> queryReceive(Page<CouponReceiveVo> page, QueryReceiveDto param);
|
||||
Page<CouponReceiveVo> queryReceive(Page<CouponReceiveVo> page, QueryReceiveDto param);
|
||||
|
||||
Page<ShopActivateCouponRecord> findByUser(Page<ShopActivateCouponRecord> page, List<Long> shopUserIds, Integer status);
|
||||
|
||||
List<UserCouponVo> queryByVipIdAndShopId(Long shopId, Long shopUserId);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ 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.czg.account.vo.UserCouponVo;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
|
||||
@@ -34,7 +35,9 @@ public interface ShopCouponService extends IService<ShopCoupon> {
|
||||
Page<CouponReceiveVo> queryReceive(QueryReceiveDto param);
|
||||
|
||||
|
||||
List<ShopActivateCouponRecord> find(Long shopUserId, Integer status);
|
||||
Page<ShopActivateCouponRecord> find(Long userId, Long orderId, Integer status);
|
||||
|
||||
List<UserCouponVo> findCoupon(Long shopId, Long shopUserId);
|
||||
|
||||
Boolean use(List<Long> ids, Long shopUserId, Long orderId);
|
||||
|
||||
|
||||
@@ -5,9 +5,14 @@ import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author ww
|
||||
*/
|
||||
@Data
|
||||
public class UserCouponVo {
|
||||
private Long id;
|
||||
private Long shopId;
|
||||
private String shopName;
|
||||
private BigDecimal fullAmount;
|
||||
private BigDecimal discountAmount;
|
||||
private Long couponId;
|
||||
@@ -24,20 +29,8 @@ public class UserCouponVo {
|
||||
private Integer num;
|
||||
//到期时间
|
||||
private Date endTime;
|
||||
private Long expireTime;
|
||||
private String useRestrictions;
|
||||
private boolean isUse = false;
|
||||
//当前使用数量
|
||||
private BigDecimal currentUseNum;
|
||||
private Integer finalUseNum;
|
||||
private BigDecimal finalDiscountAmount = new BigDecimal(0);
|
||||
|
||||
|
||||
public void setEndTime(Date endTime) {
|
||||
this.endTime = endTime;
|
||||
if(endTime!=null){
|
||||
expireTime=endTime.getTime();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user