123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- <?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.jjt.biz.mapper.BizObjPpMapper">
- <resultMap type="BizObjPp" id="BizObjPpResult">
- <result property="objPpId" column="OBJ_PP_ID"/>
- <result property="objId" column="OBJ_ID"/>
- <result property="ppName" column="PP_NAME"/>
- <result property="ppKey" column="PP_KEY"/>
- <result property="ppType" column="PP_TYPE"/>
- <result property="ppAddr" column="PP_ADDR"/>
- <result property="createBy" column="CREATE_BY"/>
- <result property="createTime" column="CREATE_TIME"/>
- <result property="updateBy" column="UPDATE_BY"/>
- <result property="updateTime" column="UPDATE_TIME"/>
- <result property="remark" column="REMARK"/>
- </resultMap>
- <sql id="selectBizObjPpVo">
- select OBJ_PP_ID,
- OBJ_ID,
- PP_NAME,
- PP_KEY,
- PP_TYPE,
- PP_ADDR,
- CREATE_BY,
- CREATE_TIME,
- UPDATE_BY,
- UPDATE_TIME,
- REMARK
- from biz_obj_pp
- </sql>
- <select id="selectBizObjPpList" parameterType="BizObjPp" resultMap="BizObjPpResult">
- <include refid="selectBizObjPpVo"/>
- <where>
- <if test="objId != null ">
- and OBJ_ID = #{objId}
- </if>
- <if test="ppName != null and ppName != ''">
- and PP_NAME like concat('%', #{ppName}, '%')
- </if>
- <if test="ppKey != null and ppKey != ''">
- and PP_KEY = #{ppKey}
- </if>
- <if test="ppType != null and ppType != ''">
- and PP_TYPE = #{ppType}
- </if>
- <if test="ppAddr != null and ppAddr != ''">
- and PP_ADDR = #{ppAddr}
- </if>
- <if test="createBy != null and createBy != ''">
- and CREATE_BY = #{createBy}
- </if>
- <if test="createTime != null ">
- and CREATE_TIME = #{createTime}
- </if>
- <if test="updateBy != null and updateBy != ''">
- and UPDATE_BY = #{updateBy}
- </if>
- <if test="updateTime != null ">
- and UPDATE_TIME = #{updateTime}
- </if>
- <if test="remark != null and remark != ''">
- and REMARK = #{remark}
- </if>
- </where>
- </select>
- <select id="selectBizObjPpByObjPpId" parameterType="Long"
- resultMap="BizObjPpResult">
- <include refid="selectBizObjPpVo"/>
- where OBJ_PP_ID = #{objPpId}
- </select>
- <insert id="insertBizObjPp" parameterType="BizObjPp" useGeneratedKeys="true"
- keyProperty="objPpId">
- insert into biz_obj_pp
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="objId != null">OBJ_ID,
- </if>
- <if test="ppName != null">PP_NAME,
- </if>
- <if test="ppKey != null">PP_KEY,
- </if>
- <if test="ppType != null">PP_TYPE,
- </if>
- <if test="ppAddr != null">PP_ADDR,
- </if>
- <if test="createBy != null">CREATE_BY,
- </if>
- <if test="createTime != null">CREATE_TIME,
- </if>
- <if test="updateBy != null">UPDATE_BY,
- </if>
- <if test="updateTime != null">UPDATE_TIME,
- </if>
- <if test="remark != null">REMARK,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="objId != null">#{objId},
- </if>
- <if test="ppName != null">#{ppName},
- </if>
- <if test="ppKey != null">#{ppKey},
- </if>
- <if test="ppType != null">#{ppType},
- </if>
- <if test="ppAddr != null">#{ppAddr},
- </if>
- <if test="createBy != null">#{createBy},
- </if>
- <if test="createTime != null">#{createTime},
- </if>
- <if test="updateBy != null">#{updateBy},
- </if>
- <if test="updateTime != null">#{updateTime},
- </if>
- <if test="remark != null">#{remark},
- </if>
- </trim>
- </insert>
- <update id="updateBizObjPp" parameterType="BizObjPp">
- update biz_obj_pp
- <trim prefix="SET" suffixOverrides=",">
- <if test="objId != null">OBJ_ID =
- #{objId},
- </if>
- <if test="ppName != null">PP_NAME =
- #{ppName},
- </if>
- <if test="ppKey != null">PP_KEY =
- #{ppKey},
- </if>
- <if test="ppType != null">PP_TYPE =
- #{ppType},
- </if>
- <if test="ppAddr != null">PP_ADDR =
- #{ppAddr},
- </if>
- <if test="createBy != null">CREATE_BY =
- #{createBy},
- </if>
- <if test="createTime != null">CREATE_TIME =
- #{createTime},
- </if>
- <if test="updateBy != null">UPDATE_BY =
- #{updateBy},
- </if>
- <if test="updateTime != null">UPDATE_TIME =
- #{updateTime},
- </if>
- <if test="remark != null">REMARK =
- #{remark},
- </if>
- </trim>
- where OBJ_PP_ID = #{objPpId}
- </update>
- <delete id="deleteBizObjPpByObjPpId" parameterType="Long">
- delete
- from biz_obj_pp
- where OBJ_PP_ID = #{objPpId}
- </delete>
- <delete id="deleteBizObjPpByObjPpIds" parameterType="String">
- delete from biz_obj_pp where OBJ_PP_ID in
- <foreach item="objPpId" collection="array" open="(" separator="," close=")">
- #{objPpId}
- </foreach>
- </delete>
- </mapper>
|