package com.sonic.lion.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sonic.lion.domain.entity.FreeWithdrawConfig;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface FreeWithdrawConfigDao extends BaseMapper<FreeWithdrawConfig> {

    /**
     * 查询根据 结果排序
     *
     * @param uid
     * @return
     */
    @Select("SELECT  * FROM t_free_withdraw_config WHERE uid=#{uid} AND is_delete= 0 ORDER BY FIELD(reason,\"ANGEL_USER\",\"OPERATION\",\"SHOP_LEVEL\")")
    List<FreeWithdrawConfig> listOrderByEndTime(@Param("uid") Long uid);
}
