积分 发放
This commit is contained in:
@@ -101,6 +101,9 @@ public class MemberLevelConfig implements Serializable {
|
||||
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 是否启用消费送积分
|
||||
*/
|
||||
private Integer isCostRewardPoints;
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.czg.market.service;
|
||||
|
||||
import com.czg.account.entity.ShopUser;
|
||||
import com.czg.order.entity.OrderInfo;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.market.entity.MkPointsConfig;
|
||||
@@ -15,5 +16,5 @@ public interface MkPointsConfigService extends IService<MkPointsConfig> {
|
||||
* 订单支付成功,通过计算 给用户赠送积分
|
||||
*
|
||||
*/
|
||||
void consumeAwardPoints(Long shopUserId, OrderInfo orderInfo);
|
||||
void consumeAwardPoints(ShopUser shopUser, OrderInfo orderInfo);
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@ package com.czg.market.service;
|
||||
|
||||
import com.czg.account.vo.PointsShopListVO;
|
||||
import com.czg.market.dto.MkPointsUserDTO;
|
||||
import com.czg.market.entity.MkPointsUser;
|
||||
import com.czg.market.enums.PointsConstant;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.market.entity.MkPointsUser;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.util.List;
|
||||
public interface TbMemberConfigService extends IService<TbMemberConfig> {
|
||||
|
||||
MemberConfigVO detail(Long shopId);
|
||||
|
||||
UMemberConfigVO detail(Long shopId, Long userId);
|
||||
|
||||
Boolean edit(Long shopId, MemberConfigDTO memberDTO);
|
||||
@@ -34,16 +35,19 @@ public interface TbMemberConfigService extends IService<TbMemberConfig> {
|
||||
|
||||
/**
|
||||
* 根据传入的用户Id,校验是否符合条件,符合加入会员
|
||||
*
|
||||
* @param shopId 店铺id
|
||||
* @param userId 用户id
|
||||
* @return 是否加入成功
|
||||
*/
|
||||
boolean joinMember(Long shopId, Long userId, Long memberOrderId);
|
||||
boolean joinMemberByCondition(Long shopId, Long userId);
|
||||
|
||||
boolean joinMemberByCondition(Long shopId, Long userId, ShopUser shopUser);
|
||||
|
||||
/**
|
||||
* 发放会员奖励
|
||||
* @param money 实际消费金额
|
||||
*
|
||||
* @param money 实际消费金额
|
||||
* @param expVal 经验值,只有当type为pay的时候才生效
|
||||
* @return 是否成功
|
||||
*/
|
||||
|
||||
@@ -23,13 +23,14 @@ public interface TableValueConstant {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface MemberExpFlow {
|
||||
@Getter
|
||||
enum Type {
|
||||
RECHARGE("RECHARGE", "充值增积分"),
|
||||
PAY("PAY", "购买会员增积分"),
|
||||
RECHARGE("RECHARGE", "充值成长值 积分发放在扣减余额的地方"),
|
||||
PAY("PAY", "购买会员"),
|
||||
MEMBER_TASK("MEMBER_TASK", "会员周奖励"),
|
||||
COST("COST", "消费增积分");
|
||||
COST("COST", "消费成长值");
|
||||
private final String code;
|
||||
private final String msg;
|
||||
|
||||
@@ -115,6 +116,7 @@ public interface TableValueConstant {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface EnableConfig {
|
||||
@Getter
|
||||
enum Type {
|
||||
|
||||
Reference in New Issue
Block a user