123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <?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.zkqy.amichi.mapper.TeamInformationMapper">
-
- <resultMap type="com.zkqy.amichi.domain.TeamInformation" id="TeamInformationResult">
- <result property="id" column="id" />
- <result property="teamName" column="team_name" />
- <result property="remark" column="remark" />
- <result property="createById" column="create_by_id" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateById" column="update_by_id" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="delFlag" column="del_flag" />
- <result property="dataApprovalStatus" column="data_approval_status" />
- <result property="processKey" column="process_key" />
- <result property="taskProcessKey" column="task_process_key" />
- <result property="taskNodeKey" column="task_node_key" />
- <result property="teamCode" column="team_code" />
- <result property="teamType" column="team_type" />
- </resultMap>
- <sql id="selectTeamInformationVo">
- select id, team_name, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key,
- team_code,team_type
- from {DBNAME}.team_information
- </sql>
- <select id="selectTeamInformationList" parameterType="com.zkqy.amichi.domain.TeamInformation" resultMap="TeamInformationResult">
- <include refid="selectTeamInformationVo"/>
- <where>
- <if test="teamName != null and teamName != ''"> and team_name = #{teamName}</if>
- <if test="createById != null "> and create_by_id = #{createById}</if>
- <if test="updateById != null "> and update_by_id = #{updateById}</if>
- <if test="dataApprovalStatus != null and dataApprovalStatus != ''"> and data_approval_status = #{dataApprovalStatus}</if>
- <if test="processKey != null and processKey != ''"> and process_key = #{processKey}</if>
- <if test="taskProcessKey != null and taskProcessKey != ''"> and task_process_key = #{taskProcessKey}</if>
- <if test="taskNodeKey != null and taskNodeKey != ''"> and task_node_key = #{taskNodeKey}</if>
- <if test="teamCode != null "> and team_code = #{teamCode}</if>
- <if test="teamType != null "> and team_type = #{teamType}</if>
- and del_flag=0
- </where>
- </select>
-
- <select id="selectTeamInformationById" parameterType="Long" resultMap="TeamInformationResult">
- <include refid="selectTeamInformationVo"/>
- where id = #{id} and del_flag=0
- </select>
-
- <insert id="insertTeamInformation" parameterType="com.zkqy.amichi.domain.TeamInformation" useGeneratedKeys="true" keyProperty="id">
- insert into {DBNAME}.team_information
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="teamName != null">team_name,</if>
- <if test="remark != null">remark,</if>
- <if test="createById != null">create_by_id,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateById != null">update_by_id,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="delFlag != null">del_flag,</if>
- <if test="dataApprovalStatus != null">data_approval_status,</if>
- <if test="processKey != null">process_key,</if>
- <if test="taskProcessKey != null">task_process_key,</if>
- <if test="taskNodeKey != null">task_node_key,</if>
- <if test="teamCode != null">team_code,</if>
- <if test="teamType != null ">team_type</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="teamName != null">#{teamName},</if>
- <if test="remark != null">#{remark},</if>
- <if test="createById != null">#{createById},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateById != null">#{updateById},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="delFlag != null">#{delFlag},</if>
- <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
- <if test="processKey != null">#{processKey},</if>
- <if test="taskProcessKey != null">#{taskProcessKey},</if>
- <if test="taskNodeKey != null">#{taskNodeKey},</if>
- <if test="teamCode != null">#{teamCode},</if>
- <if test="teamType != null ">#{teamType}</if>
- </trim>
- </insert>
- <update id="updateTeamInformation" parameterType="com.zkqy.amichi.domain.TeamInformation">
- update {DBNAME}.team_information
- <trim prefix="SET" suffixOverrides=",">
- <if test="teamName != null">team_Name = #{teamName},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="createById != null">create_by_id = #{createById},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateById != null">update_by_id = #{updateById},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</if>
- <if test="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
- <if test="processKey != null">process_key = #{processKey},</if>
- <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
- <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
- <if test="teamCode != null">team_code = #{teamCode},</if>
- <if test="teamType != null ">team_type=#{teamType}</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteTeamInformationById" parameterType="Long">
- delete from {DBNAME}.team_information where id = #{id}
- </delete>
- <delete id="deleteTeamInformationByIds" parameterType="String">
- delete from {DBNAME}.team_information where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|