package com.crm.manager.dao.mapper;


import com.crm.rely.backend.core.entity.sales.SalesCommissionRuleSearchEntity;
import com.crm.rely.backend.core.pojo.table.SalesCommissionRuleTable;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface SalesCommissionRuleMapper {

    void save(SalesCommissionRuleTable table);

    void update(SalesCommissionRuleTable table);

    void deleteById(Long id);

    SalesCommissionRuleTable findOne(Long id);

    List<SalesCommissionRuleTable> findAll();

    Integer countByRuleName(@Param("ruleName") String ruleName);

    Integer countSearch(SalesCommissionRuleSearchEntity searchEntity);

    List<SalesCommissionRuleTable> listSearch(SalesCommissionRuleSearchEntity searchEntity);

    List<SalesCommissionRuleTable> findAllDropdownInfo();

}
