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