<?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.newfiber.system.mapper.PlatformJumpUserMapper"> <!-- 通用查询映射结果 --> <resultMap type="com.newfiber.system.domain.PlatformJumpUser" id="PlatformJumpUserResult"> <result property="id" column="id"/> <result property="jumpId" column="jump_id"/> <result property="userAccount" column="user_account"/> <result property="delFlag" column="del_flag"/> <result property="createBy" column="create_by"/> <result property="createTime" column="create_time"/> <result property="updateBy" column="update_by"/> <result property="updateTime" column="update_time"/> </resultMap> <!-- 通用查询结果列 --> <sql id="Base_Column_List"> t.id , t.jump_id , t.user_account , t.del_flag , t.create_by , t.create_time , t.update_by , t.update_time </sql> <sql id="Where_Condition"> <if test="request.jumpId != null and request.jumpId != ''"> and t.jump_id = #{request.jumpId} </if> <if test="request.userAccount != null and request.userAccount != ''"> and t.user_account = #{request.userAccount} </if> </sql> <sql id="Join_Table"> </sql> <select id="selectByCondition" resultMap="PlatformJumpUserResult"> select <include refid="Base_Column_List"/> from sys_platform_jump_user t <include refid="Join_Table"/> where t.del_flag = 0 <include refid="Where_Condition"/> order by t.${request.orderBy} </select> <select id="selectOneById" resultMap="PlatformJumpUserResult"> select <include refid="Base_Column_List"/> from sys_platform_jump_user t <include refid="Join_Table"/> where t.id = #{id} and t.del_flag = 0 </select> <delete id="deleteProjectUserByJumpId" parameterType="Long"> delete from sys_platform_jump_user where jump_id=#{jumpId} </delete> <select id="selectOneByIdAndUser" resultMap="PlatformJumpUserResult"> select <include refid="Base_Column_List"/> from sys_platform_jump_user t <include refid="Join_Table"/> where t.jump_id = #{jumpId} and t.user_account = #{userAccount} and t.del_flag = 0 </select> </mapper>