package com.ruoyi.frequency.illegaldeductionrecord.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.controller.req.IllegalDeductionPageReq;
import com.ruoyi.controller.req.MonthReq;
import com.ruoyi.controller.resp.IllegalDeductionPageResp;
import com.ruoyi.frequency.illegaldeductionrecord.entity.IllegalDeductionRecord;
import com.ruoyi.response.ResponseData;
import com.ruoyi.vo.BodyIdReq;
import com.ruoyi.vo.UserVo;

import java.math.BigDecimal;
import java.util.List;

/**
 * 扣款记录Service接口
 * 
 * @author liwenlong
 * @date 2023-11-08
 */
public interface IllegalDeductionRecordService extends IService<IllegalDeductionRecord>
{
    /**
     * 查询扣款记录
     * 
     * @param id 扣款记录主键
     * @return 扣款记录
     */
    public IllegalDeductionRecord selectIllegalDeductionRecordById(Long id);

    /**
     * 查询扣款记录列表
     * 
     * @param illegalDeductionRecord 扣款记录
     * @return 扣款记录集合
     */
    public List<IllegalDeductionRecord> selectIllegalDeductionRecordList(IllegalDeductionRecord illegalDeductionRecord);

    /**
     * 新增扣款记录
     * 
     * @param illegalDeductionRecord 扣款记录
     * @return 结果
     */
    public int insertIllegalDeductionRecord(IllegalDeductionRecord illegalDeductionRecord);

    /**
     * 修改扣款记录
     * 
     * @param illegalDeductionRecord 扣款记录
     * @return 结果
     */
    public int updateIllegalDeductionRecord(IllegalDeductionRecord illegalDeductionRecord);

    /**
     * 批量删除扣款记录
     * 
     * @param ids 需要删除的扣款记录主键集合
     * @return 结果
     */
    public int deleteIllegalDeductionRecordByIds(Long[] ids,Integer delFlag);

    /**
     * 违规扣除明细
     * @param req
     * @param userVo
     * @return
     */
    ResponseData<IllegalDeductionPageResp> illegalDeductionPage(IllegalDeductionPageReq req, UserVo userVo);

    /**
     * 修改扣款
     * @param storeId
     * @param withId
     * @param price
     * @param type 类型 1平台手动添加 2 平台手动扣除 3提现抵消 4提现失败返还 5订单申诉
     */
    void updateViolationDeduction(Long storeId,Long withId, BigDecimal price, int type,Long orderId,String deductionType,String remark);

    Object getPage(MonthReq req, UserVo userVo);

    Object detail(BodyIdReq req, UserVo userVo);
}
