package com.czg.market.service;

import com.czg.exception.CzgException;
import com.czg.market.dto.MkConsumeCashbackDTO;
import com.czg.market.vo.MkConsumeCashbackVO;
import com.mybatisflex.core.service.IService;
import com.czg.market.entity.MkConsumeCashback;

import java.math.BigDecimal;

/**
 * 服务层。
 *
 * @author zs
 * @since 2025-10-13
 */
public interface MkConsumeCashbackService extends IService<MkConsumeCashback> {
    MkConsumeCashbackVO detail(Long shopId);

    Boolean edit(Long shopId, MkConsumeCashbackDTO consumeDiscountDTO) throws CzgException;

    /**
     * 消费返现
     *
     * @param shopId  店铺id
     * @param userId  用户id
     * @param amount  金额
     * @param orderId 订单id
     * @param orderNo 订单号
     */
    void cashback(Long shopId, Long userId, BigDecimal amount, Long orderId, String orderNo);

    /**
     * 订单退款 删除返现
     */
    void removeCashback(Long shopId, Long userId, Long orderId, String orderNo);
}
