| <?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.matrix.system.hive.dao.SysVipLabelDao"> | 
|     <insert id="insert" parameterType="com.matrix.system.hive.bean.SysVipLabel" useGeneratedKeys="true" | 
|             keyProperty="id"> | 
|         insert sys_vip_label ( | 
|             create_time, | 
|             create_by, | 
|             id, | 
|             vip_id, | 
|             label | 
|         ) values ( | 
|             #{createTime}, | 
|             #{createBy}, | 
|             #{id}, | 
|             #{vipId}, | 
|             #{label} | 
|         ) | 
|     </insert> | 
|   | 
|     <delete id="deleteById"> | 
|         delete from sys_vip_label | 
|         where id=#{id} | 
|     </delete> | 
|   | 
|   | 
|     <select id="selectByVipId" resultType="com.matrix.system.hive.bean.SysVipLabel"> | 
|         select * | 
|         from sys_vip_label | 
|         where vip_id=#{vipId} | 
|     </select> | 
|   | 
|     <select id="selectByModel" resultType="com.matrix.system.hive.bean.SysVipLabel"> | 
|         select * from sys_vip_label | 
|         where 1=1 | 
|         <if test="record!=null"> | 
|             <if test="record.label!=null  and record.label!=''"> | 
|                 and label=#{record.label} | 
|             </if> | 
|             <if test="record.vipId!=null"> | 
|                 and vip_id=#{record.vipId} | 
|             </if> | 
|         </if> | 
|     </select> | 
|   | 
|     <delete id="deleteByVipId"> | 
|         delete from sys_vip_label | 
|         where vip_id=#{vipId} | 
|     </delete> | 
| </mapper> |