<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.platform.yijia.dao.SysDictDataMapper">

    <!--获取支付类型列表-->
    <select id="selectPayTypeList" resultType="com.platform.yijia.pojo.PayType">
        SELECT
            dict_value      AS payType,
            dict_label      AS payTypeName
        FROM
            sys_dict_data
        WHERE
            dict_type ="pay_type"
    </select>


    <!--获取油品类型列表-->
    <select id="selectOilType" resultType="com.platform.yijia.pojo.Oil" parameterType="com.platform.yijia.pojo.Oil">
        SELECT
            dict_value      AS oilsType,
            dict_label      AS oilName
        FROM
            sys_dict_data
        <where>
            dict_type ="oil_name"
            <if test="oilName !=null and oilName !=''">
                AND dict_label = #{oilName}
            </if>
        </where>

    </select>

</mapper>
