|
- <?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.iformall.mapper.MouldPatchSignMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.sm.MouldPatchSign">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="type" jdbcType="INTEGER" property="type" />
- <result column="title" jdbcType="VARCHAR" property="title" />
- </resultMap>
-
- <sql id="allColumns">
- `id`,`type` ,`title`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where `is_del` = 0
-
- <if test=" null != id ">
- and `id` = #{id}
-
- </if>
- <if test=" null != type ">
- and `type` = #{type}
-
- </if>
-
- <if test=" null != title ">
- and `title` like concat('%', #{title},'%')
-
- </if>
- <if test=" null != ids ">
- and id in
- <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
- #{idItem}
- </foreach>
- </if>
- <if test=" null != sortColumns"> order by ${sortColumns} </if>
- </sql>
-
- <select id="findList" parameterType="com.iformall.domain.po.sm.MouldPatchSign" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from mould_patch_sign
- <include refid="dynamicWhereConditions" />
- </select>
-
- <delete id="deleteById" parameterType="java.util.HashMap">
- update mould_patch_sign set is_del = 1,update_date = now() where id = #{id}
- </delete>
-
- </mapper>
|