| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?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.BisInspPersOrgDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspPersOrg" id="bisInspPersOrgResultMap">
- <result property="persId" column="PERS_ID"/>
- <result property="orgId" column="ORG_ID"/>
- <result property="userType" column="USER_TYPE"/>
- </resultMap>
-
- <sql id="table_columns">
- PERS_ID,
- ORG_ID,
- USER_TYPE
- </sql>
- <sql id="entity_properties">
- #{persId},
- #{orgId},
- #{userType}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="orgId != null and orgId != ''">and ORG_ID = #{orgId}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="userType != null and userType != ''">and USER_TYPE = #{userType}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspPersOrgResultMap" parameterType="String" >
- select <include refid="table_columns" /> from BIS_INSP_PERS_ORG where ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspPersOrgResultMap">
- select <include refid="table_columns" /> from BIS_INSP_PERS_ORG <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="bisInspPersOrgResultMap">
- select <include refid="table_columns" /> from BIS_INSP_PERS_ORG
- </select>
- <select id="findList" resultMap="bisInspPersOrgResultMap">
- select <include refid="table_columns" /> from BIS_INSP_PERS_ORG <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from BIS_INSP_PERS_ORG <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspPersOrg">
- insert into BIS_INSP_PERS_ORG( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from BIS_INSP_PERS_ORG where PERS_ID = #{persId}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspPersOrg">
- delete from BIS_INSP_PERS_ORG <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_PERS_ORG set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspPersOrg">
- update BIS_INSP_PERS_ORG
- <trim prefix="set" suffixOverrides=",">
- <if test="userType != null and userType != ''">USER_TYPE = #{userType},</if>
- </trim>
- <where>ORG_ID = #{orgId} and PERS_ID=#{persId}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspPersOrg">
- update BIS_INSP_PERS_ORG
- <trim prefix="set" suffixOverrides=",">
- <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|