<?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.gkhy.assess.system.mapper.SysAttachMapper">
|
|
<delete id="deleteAttachsByUserId">
|
delete from sys_attach
|
<where>
|
and user_id=#{userId}
|
<if test="type!=null and type!=''">
|
and type=#{type}
|
</if>
|
<if test="type==null">
|
and type in (1,2,3)
|
</if>
|
</where>
|
</delete>
|
|
<delete id="deleteAttachsByIds">
|
delete from sys_attach where id in
|
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
<select id="getAttachsByUserId" resultType="com.gkhy.assess.system.domain.SysAttach">
|
select * from sys_attach where user_id=#{userId}
|
<if test="type!=null and type!=''">
|
and type=#{type}
|
</if>
|
</select>
|
</mapper>
|