<?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.xueyi.system.digitalmans.mapper.DmModelIconMapper">

    <resultMap type="DmModelIconPo" id="DmModelIconResult">
        <result property="modelId"      column="model_id"       />
        <result property="iconId"      column="icon_id"       />
        <result property="pos"      column="pos"       />
    </resultMap>



    <select id="selectModelIconListByModelId" resultMap="DmModelIconResult">
        select s.model_id, s.icon_id,s.pos from dm_model_icon_merge  as s
        where model_id = #{modelId}
    </select>

    <insert id="insertMerge" parameterType="DmModelIconPo" >
        insert into dm_model_icon_merge(model_id,icon_id,pos) values(#{modelId},#{iconId},#{pos})
    </insert>

    <delete id="deleteMerge" parameterType="DmModelIconPo" >
        delete from dm_model_icon_merge where model_id = #{modelId}
    </delete>
</mapper>