会员积分问题修复
This commit is contained in:
@@ -28,7 +28,7 @@ public class MemberPointsLogDTO implements Serializable {
|
||||
*/
|
||||
private Long shopId;
|
||||
/**
|
||||
* 用户id
|
||||
* 用户id(shopUserId)
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
|
||||
@@ -25,19 +25,15 @@ public class MemberPoints implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
* 会员id
|
||||
*/
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
@Column(value = "id")
|
||||
private Long shopUserId;
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
/**
|
||||
* 会员id
|
||||
*/
|
||||
@Column(value = "id")
|
||||
private Long userId;
|
||||
/**
|
||||
* 会员名称
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ public class ConsumeAwardPointsParam implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
* 用户ID(shopUserId)
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
|
||||
@@ -18,7 +18,7 @@ public class PayedDeductPointsParam implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
* 用户ID(shopUserId)
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
|
||||
@@ -28,73 +28,73 @@ public interface MemberPointsService extends IService<MemberPoints> {
|
||||
/**
|
||||
* 初始化会员积分
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param shopUserId 用户id
|
||||
* @return 会员积分等信息
|
||||
*/
|
||||
MemberPoints initMemberPoints(Long userId);
|
||||
MemberPoints initMemberPoints(Long shopUserId);
|
||||
|
||||
/**
|
||||
* 获取会员积分等信息
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param shopUserId 用户id
|
||||
* @return 会员积分等信息
|
||||
*/
|
||||
MemberPoints getMemberPoints(Long userId);
|
||||
MemberPoints getMemberPoints(Long shopUserId);
|
||||
|
||||
/**
|
||||
* 根据用户id及订单金额计算可抵扣积分及可抵扣金额
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param shopUserId 用户id
|
||||
* @param orderAmount 订单金额
|
||||
* @return 积分及金额
|
||||
*/
|
||||
OrderDeductionPointsDTO getMemberUsablePoints(Long userId, BigDecimal orderAmount);
|
||||
OrderDeductionPointsDTO getMemberUsablePoints(Long shopUserId, BigDecimal orderAmount);
|
||||
|
||||
/**
|
||||
* 根据抵扣金额计算抵扣积分
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param shopUserId 用户id
|
||||
* @param orderAmount 订单金额
|
||||
* @param deductionAmount 抵扣金额
|
||||
*/
|
||||
int calcUsedPoints(Long userId, BigDecimal orderAmount, BigDecimal deductionAmount);
|
||||
int calcUsedPoints(Long shopUserId, BigDecimal orderAmount, BigDecimal deductionAmount);
|
||||
|
||||
/**
|
||||
* 根据抵扣积分计算抵扣金额
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param shopUserId 用户id
|
||||
* @param orderAmount 订单金额
|
||||
* @param points 抵扣积分
|
||||
*/
|
||||
BigDecimal calcDeductionAmount(Long userId, BigDecimal orderAmount, int points);
|
||||
BigDecimal calcDeductionAmount(Long shopUserId, BigDecimal orderAmount, int points);
|
||||
|
||||
/**
|
||||
* 扣除积分
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param shopUserId 用户id
|
||||
* @param points 积分
|
||||
* @param content 摘要信息(如:兑换积分商品/积分抵扣账单/消费赠送积分/新会员送积分/储值赠送积分)
|
||||
* @param orderInfo 订单信息,可以为空
|
||||
*/
|
||||
boolean deductPoints(Long userId, int points, String content, OrderInfo orderInfo);
|
||||
boolean deductPoints(Long shopUserId, int points, String content, OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 追加积分
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param shopUserId 用户id
|
||||
* @param points 积分
|
||||
* @param content 摘要信息(如:兑换积分商品/积分抵扣账单/消费赠送积分/新会员送积分/储值赠送积分)
|
||||
* @param orderInfo 订单信息,可以为空
|
||||
* @return 成功/失败
|
||||
*/
|
||||
boolean addPoints(Long userId, int points, String content, OrderInfo orderInfo);
|
||||
boolean addPoints(Long shopUserId, int points, String content, OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 消费赠送积分
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param shopUserId 用户id
|
||||
* @param orderInfo 订单信息,可以为空
|
||||
*/
|
||||
void consumeAwardPoints(Long userId, OrderInfo orderInfo);
|
||||
void consumeAwardPoints(Long shopUserId, OrderInfo orderInfo);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user