<?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.yx.face.dao.AdminTagDao">


    <select id="getlist" resultType="com.yx.face.model.vo.AdminTagVO">
        select
        at.id as id,
        at.name as name,
        at.province_id as provinceId,
        ac.name as provinceName
        from admin_tag at
        left join area_code ac on ac.id = at.province_id
        <where>
            <if test="provinceId != null">
                and at.province_id = #{provinceId}
            </if>
        </where>
        order by id desc
    </select>
</mapper>

