project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

198 lines
11 KiB

<?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.ruoyi.project.mapper.PaParticipantsMapper">
<resultMap type="PaParticipants" id="PaParticipantsResult">
<result property="id" column="id" />
<result property="category" column="category" />
<result property="objectId" column="object_id" />
<result property="exportId" column="export_id" />
<result property="name" column="name" />
<result property="sex" column="sex" />
<result property="birthday" column="birthday" />
<result property="careid" column="careid" />
<result property="post" column="post" />
<result property="company" column="company" />
<result property="tel" column="tel" />
<result property="phoneNum" column="phone_num" />
<result property="email" column="email" />
<result property="professional" column="professional" />
<result property="address" column="address" />
<result property="postalCode" column="postal_code" />
<result property="contact" column="contact" />
<result property="type" column="type" />
<result property="isAcademician" column="is_academician" />
<result property="departmentId" column="department_id" />
<result property="caeId" column="cae_id" />
<result property="isHead" column="is_head" />
<result property="sort" column="sort" />
<result property="inputs" column="inputs" />
<result property="credentialsT" column="credentials_t" />
<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="delFlag" column="del_flag" />
</resultMap>
<sql id="selectPaParticipantsVo">
select id, category, object_id, export_id, name, sex, birthday, careid, post, company, tel, phone_num, email, professional, address, postal_code, contact, type, is_academician, department_id, cae_id, is_head, sort, inputs, credentials_t, create_by, create_time, update_by, update_time, del_flag from "PUBLIC"."pa_participants"
</sql>
<select id="selectMaxId" resultType="long">
select max(id) from "PUBLIC"."pa_participants"
</select>
<select id="selectPaParticipantsList" parameterType="PaParticipants" resultMap="PaParticipantsResult">
<include refid="selectPaParticipantsVo"/>
<where>
<if test="category != null "> and category = #{category}</if>
<if test="objectId != null "> and object_id = #{objectId}</if>
<if test="exportId != null "> and export_id = #{exportId}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="sex != null "> and sex = #{sex}</if>
<if test="birthday != null "> and birthday = #{birthday}</if>
<if test="careid != null and careid != ''"> and careid = #{careid}</if>
<if test="post != null and post != ''"> and post = #{post}</if>
<if test="company != null and company != ''"> and company = #{company}</if>
<if test="tel != null and tel != ''"> and tel = #{tel}</if>
<if test="phoneNum != null and phoneNum != ''"> and phone_num = #{phoneNum}</if>
<if test="email != null and email != ''"> and email = #{email}</if>
<if test="professional != null and professional != ''"> and professional = #{professional}</if>
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="postalCode != null and postalCode != ''"> and postal_code = #{postalCode}</if>
<if test="contact != null and contact != ''"> and contact = #{contact}</if>
<if test="type != null "> and type = #{type}</if>
<if test="isAcademician != null "> and is_academician = #{isAcademician}</if>
<if test="departmentId != null "> and department_id = #{departmentId}</if>
<if test="caeId != null "> and cae_id = #{caeId}</if>
<if test="isHead != null "> and is_head = #{isHead}</if>
<if test="sort != null "> and sort = #{sort}</if>
<if test="inputs != null "> and inputs = #{inputs}</if>
<if test="credentialsT != null "> and credentials_t = #{credentialsT}</if>
</where>
</select>
<select id="selectPaParticipantsById" parameterType="Long" resultMap="PaParticipantsResult">
<include refid="selectPaParticipantsVo"/>
where id = #{id}
</select>
<insert id="insertPaParticipants" parameterType="PaParticipants" useGeneratedKeys="true" keyProperty="id">
insert into "PUBLIC"."pa_participants"
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="category != null">category,</if>
<if test="objectId != null">object_id,</if>
<if test="exportId != null">export_id,</if>
<if test="name != null">name,</if>
<if test="sex != null">sex,</if>
<if test="birthday != null">birthday,</if>
<if test="careid != null">careid,</if>
<if test="post != null">post,</if>
<if test="company != null">company,</if>
<if test="tel != null">tel,</if>
<if test="phoneNum != null">phone_num,</if>
<if test="email != null">email,</if>
<if test="professional != null">professional,</if>
<if test="address != null">address,</if>
<if test="postalCode != null">postal_code,</if>
<if test="contact != null">contact,</if>
<if test="type != null">type,</if>
<if test="isAcademician != null">is_academician,</if>
<if test="departmentId != null">department_id,</if>
<if test="caeId != null">cae_id,</if>
<if test="isHead != null">is_head,</if>
<if test="sort != null">sort,</if>
<if test="inputs != null">inputs,</if>
<if test="credentialsT != null">credentials_t,</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="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="category != null">#{category},</if>
<if test="objectId != null">#{objectId},</if>
<if test="exportId != null">#{exportId},</if>
<if test="name != null">#{name},</if>
<if test="sex != null">#{sex},</if>
<if test="birthday != null">#{birthday},</if>
<if test="careid != null">#{careid},</if>
<if test="post != null">#{post},</if>
<if test="company != null">#{company},</if>
<if test="tel != null">#{tel},</if>
<if test="phoneNum != null">#{phoneNum},</if>
<if test="email != null">#{email},</if>
<if test="professional != null">#{professional},</if>
<if test="address != null">#{address},</if>
<if test="postalCode != null">#{postalCode},</if>
<if test="contact != null">#{contact},</if>
<if test="type != null">#{type},</if>
<if test="isAcademician != null">#{isAcademician},</if>
<if test="departmentId != null">#{departmentId},</if>
<if test="caeId != null">#{caeId},</if>
<if test="isHead != null">#{isHead},</if>
<if test="sort != null">#{sort},</if>
<if test="inputs != null">#{inputs},</if>
<if test="credentialsT != null">#{credentialsT},</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="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updatePaParticipants" parameterType="PaParticipants">
update "PUBLIC"."pa_participants"
<trim prefix="SET" suffixOverrides=",">
<if test="category != null">category = #{category},</if>
<if test="objectId != null">object_id = #{objectId},</if>
<if test="exportId != null">export_id = #{exportId},</if>
<if test="name != null">name = #{name},</if>
<if test="sex != null">sex = #{sex},</if>
<if test="birthday != null">birthday = #{birthday},</if>
<if test="careid != null">careid = #{careid},</if>
<if test="post != null">post = #{post},</if>
<if test="company != null">company = #{company},</if>
<if test="tel != null">tel = #{tel},</if>
<if test="phoneNum != null">phone_num = #{phoneNum},</if>
<if test="email != null">email = #{email},</if>
<if test="professional != null">professional = #{professional},</if>
<if test="address != null">address = #{address},</if>
<if test="postalCode != null">postal_code = #{postalCode},</if>
<if test="contact != null">contact = #{contact},</if>
<if test="type != null">type = #{type},</if>
<if test="isAcademician != null">is_academician = #{isAcademician},</if>
<if test="departmentId != null">department_id = #{departmentId},</if>
<if test="caeId != null">cae_id = #{caeId},</if>
<if test="isHead != null">is_head = #{isHead},</if>
<if test="sort != null">sort = #{sort},</if>
<if test="inputs != null">inputs = #{inputs},</if>
<if test="credentialsT != null">credentials_t = #{credentialsT},</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="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<delete id="deletePaParticipantsById" parameterType="Long">
delete from "PUBLIC"."pa_participants" where id = #{id}
</delete>
<delete id="deletePaParticipantsByIds" parameterType="String">
delete from "PUBLIC"."pa_participants" where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>