| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- <?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="cn.com.goldenwater.dcproj.dao.BisInspAllRlationPersOrgaDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspAllRlationPersOrga" id="bisInspAllRlationPersOrgaResultMap">
- <result property="userCode" column="USER_CODE"/>
- <result property="deptId" column="DEPT_ID"/>
- <result property="jobs" column="JOBS"/>
- <result property="position" column="POSITION"/>
- <result property="orderId" column="ORDER_ID"/>
- </resultMap>
- <sql id="table_columns">
- USER_CODE,
- DEPT_ID,
- JOBS,
- POSITION,
- ORDER_ID
- </sql>
- <sql id="entity_properties">
- #{userCode},
- #{deptId},
- #{jobs},
- #{position},
- #{orderId}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="deptId != null and deptId != ''">and DEPT_ID = #{deptId}</if>
- <if test="jobs != null and jobs != ''">and JOBS = #{jobs}</if>
- <if test="position != null and position != ''">and POSITION = #{position}</if>
- <if test="orderId != null">and ORDER_ID = #{orderId}</if>
- </trim>
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_update_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="userCode != null and userCode != ''">USER_CODE = #{userCode}</if>
- <if test="deptId != null and deptId != ''">and DEPT_ID = #{deptId}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspAllRlationPersOrgaResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from BIS_INSP_ALL_RLATION_PERS_ORGA where ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspAllRlationPersOrgaResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_ALL_RLATION_PERS_ORGA
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="bisInspAllRlationPersOrgaResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_ALL_RLATION_PERS_ORGA
- </select>
- <select id="findList" resultMap="bisInspAllRlationPersOrgaResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_ALL_RLATION_PERS_ORGA
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(DEPT_ID) from BIS_INSP_ALL_RLATION_PERS_ORGA where DEPT_ID = #{deptId} and USER_CODE = #{userCode}
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllRlationPersOrga">
- insert into BIS_INSP_ALL_RLATION_PERS_ORGA(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update BIS_INSP_ALL_RLATION_PERS_ORGA set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllRlationPersOrga">
- update BIS_INSP_ALL_RLATION_PERS_ORGA set DATA_STAT='9'
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_ALL_RLATION_PERS_ORGA set DATA_STAT = '9' where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllRlationPersOrga">
- update BIS_INSP_ALL_RLATION_PERS_ORGA
- <trim prefix="set" suffixOverrides=",">
- <if test="userCode != null and userCode != ''">USER_CODE = #{userCode},</if>
- <if test="deptId != null and deptId != ''">DEPT_ID = #{deptId},</if>
- <if test="jobs != null and jobs != ''">JOBS = #{jobs},</if>
- <if test="position != null and position != ''">POSITION = #{position},</if>
- <if test="orderId != null">ORDER_ID = #{orderId},</if>
- </trim>
- <include refid="page_update_where"/>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllRlationPersOrga">
- update BIS_INSP_ALL_RLATION_PERS_ORGA
- <trim prefix="set" suffixOverrides=",">
- <if test="deptId != null and deptId != ''">DEPT_ID = #{deptId},</if>
- <if test="jobs != null and jobs != ''">JOBS = #{jobs},</if>
- <if test="position != null and position != ''">POSITION = #{position},</if>
- <if test="orderId != null">ORDER_ID = #{orderId},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|