优惠券 券使用记录
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
package com.czg.account.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author ww
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class ShopActivateCouponDTO {
|
||||
private Long id;
|
||||
private Integer num;
|
||||
private String name;
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
package com.czg.account.dto;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.czg.account.entity.ShopCoupon;
|
||||
import com.czg.validator.group.InsertGroup;
|
||||
import com.czg.validator.group.UpdateGroup;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
@@ -59,11 +60,7 @@ public class ShopActivateDTO implements Serializable {
|
||||
*/
|
||||
private Integer isGiftCoupon;
|
||||
|
||||
private List<ShopActivateCouponDTO> couponList;
|
||||
|
||||
/**
|
||||
* 优惠卷信息{卷id:数量}
|
||||
*/
|
||||
private List<ShopCoupon> couponList;
|
||||
private String coupons;
|
||||
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
|
||||
@@ -36,9 +36,9 @@ public class ShopActivateCouponRecord implements Serializable {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会员id
|
||||
* 用户id shopUserId
|
||||
*/
|
||||
private Long vipUserId;
|
||||
private Long shopUserId;
|
||||
|
||||
/**
|
||||
* 卷Id (校验是否可用)
|
||||
@@ -100,13 +100,18 @@ public class ShopActivateCouponRecord implements Serializable {
|
||||
|
||||
private String couponJson;
|
||||
|
||||
/**
|
||||
* invited 邀请
|
||||
* activate 活动
|
||||
*/
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* 已使用 used
|
||||
* 未使用 not_used
|
||||
* 已过期 expired
|
||||
* 未使用 0
|
||||
* 已使用 1
|
||||
* 已过期 2
|
||||
*/
|
||||
private String status;
|
||||
private Integer status;
|
||||
private Long targetId;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.czg.account.service;
|
||||
|
||||
import com.czg.account.dto.ShopActivateDTO;
|
||||
import com.czg.account.entity.ShopActivate;
|
||||
import com.czg.account.entity.ShopUser;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -28,6 +29,6 @@ public interface ShopActivateService extends IService<ShopActivate> {
|
||||
* 充值奖励 的关联id 是tb_shop_user_flow的充值 记录id
|
||||
* 支付/退款 tb_order_payment.id
|
||||
*/
|
||||
void giveActivate(Long shopId, Long vipId, BigDecimal memAmount, Long relationId);
|
||||
void giveActivate(ShopUser shopUser, BigDecimal memAmount, Long relationId);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.czg.account.service;
|
||||
|
||||
import com.czg.account.dto.ShopCouponDTO;
|
||||
import com.czg.account.entity.ShopActivateCouponRecord;
|
||||
import com.czg.account.entity.ShopCoupon;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
|
||||
@@ -18,21 +19,21 @@ public interface ShopCouponService extends IService<ShopCoupon> {
|
||||
* 优惠券列表
|
||||
*
|
||||
* @param shopId 店铺id
|
||||
* @param type 1-满减 2-商品
|
||||
* @param status 状态 0 未使用 1已使用 -1已过期
|
||||
*/
|
||||
List<ShopCoupon> getList(Long shopId, Integer status);
|
||||
ShopCouponDTO getCouponById(ShopCouponDTO couponDTO);
|
||||
List<ShopCouponDTO> getList(Long shopId, Integer type, Integer status);
|
||||
|
||||
Boolean add(ShopCouponDTO couponDTO);
|
||||
|
||||
Boolean edit(ShopCouponDTO couponDTO);
|
||||
|
||||
Boolean delete(Long id);
|
||||
Boolean find(Long id);
|
||||
Boolean use(Integer shopId, Integer orderId, Integer vipUserId);
|
||||
|
||||
Boolean refund();
|
||||
List<ShopActivateCouponRecord> find(Long shopUserId, Integer status);
|
||||
|
||||
Boolean use(List<Long> ids, Long shopUserId, Long orderId);
|
||||
|
||||
Boolean refund(Long orderId, Long shopUserId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user