package com.hzs.activity.policy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzs.common.domain.policy.AcPolicyConfig;
import org.apache.ibatis.annotations.Param;

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

/**
 * 海外政策币配置 Mapper 接口
 *
 * @author hzs
 * @since 2023-12-26
 */
public interface AcPolicyConfigMapper extends BaseMapper<AcPolicyConfig> {

    /**
     * 根据国家删除全部规则
     * @param pkCountry
     */
    void deleteByPkCountryAll(@Param("pkCountry") Integer pkCountry,@Param("notIdlList") List<Long> notIdlList,@Param("pkBaseId") Long pkBaseId);

    /**
     * 查询赠送政策币最新配置
     *
     * @param orderAchieve 订单业务
     * @param payDate      订单支付时间
     * @param pkCountry    所属国家
     * @return
     */
    AcPolicyConfig queryLastConfig(@Param("orderAchieve") BigDecimal orderAchieve,
                                   @Param("payDate") Date payDate,
                                   @Param("pkCountry") Integer pkCountry);

}
