PointsOperationService.java 1.03 KB
package com.topdraw.business.process.service;

import com.topdraw.business.basicdata.points.domain.Points;
import com.topdraw.business.basicdata.task.domain.Task;
import com.topdraw.business.process.domian.TempPoints;

import java.util.List;
import java.util.Map;

/**
 * @description 积分操作接口
 * @author XiangHan
 * @date 2021.10.22
 */
public interface PointsOperationService {

    /**
     * 手动发放积分
     * @param memberId 会员id
     * @param tempPoints 积分详情
     */
    void grantPointsByManual(Long memberId , TempPoints tempPoints);


    /**
     * 积分扣减
     * @param tempPoints 积分对象
     */
    boolean customPoints(TempPoints tempPoints);


    /**
     * 积分发放,基于已获得的权益
     * @param tempPointsList 已获得的权益
     */
    void grantPointsThroughTempRightsList(List<TempPoints> tempPointsList);


    /**
     * 清理过期并计算可用总积分
     * @param memberId
     * @return
     */
    Long cleanInvalidPointsAndCalculateCurrentPoints(Long memberId);
}