huayang/backend/ruoyi-system/target/classes/mapper/system/HuayangJoinApplyMapper.xml
2026-05-07 18:24:22 +08:00

111 lines
5.4 KiB
XML

<?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.system.mapper.HuayangJoinApplyMapper">
<resultMap type="com.ruoyi.system.domain.HuayangJoinApply" id="HuayangJoinApplyResult">
<result property="applyId" column="apply_id"/>
<result property="applyName" column="apply_name"/>
<result property="applyPhone" column="apply_phone"/>
<result property="applyCompany" column="apply_company"/>
<result property="applyIntent" column="apply_intent"/>
<result property="applyArea" column="apply_area"/>
<result property="applyStatus" column="apply_status"/>
<result property="handleRemark" column="handle_remark"/>
<result property="handleTime" column="handle_time"/>
<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="remark" column="remark"/>
</resultMap>
<sql id="selectHuayangJoinApplyVo">
SELECT apply_id, apply_name, apply_phone, apply_company, apply_intent, apply_area,
apply_status, handle_remark, handle_time, create_by, create_time, update_by, update_time, remark
FROM huayang_join_apply
</sql>
<select id="selectHuayangJoinApplyList" parameterType="com.ruoyi.system.domain.HuayangJoinApply" resultMap="HuayangJoinApplyResult">
<include refid="selectHuayangJoinApplyVo"/>
<where>
<if test="applyName != null and applyName != ''">
AND apply_name LIKE CONCAT('%', #{applyName}, '%')
</if>
<if test="applyPhone != null and applyPhone != ''">
AND apply_phone = #{applyPhone}
</if>
<if test="applyStatus != null and applyStatus != ''">
AND apply_status = #{applyStatus}
</if>
</where>
ORDER BY create_time DESC
</select>
<select id="selectHuayangJoinApplyById" parameterType="Long" resultMap="HuayangJoinApplyResult">
<include refid="selectHuayangJoinApplyVo"/>
WHERE apply_id = #{applyId}
</select>
<insert id="insertHuayangJoinApply" parameterType="com.ruoyi.system.domain.HuayangJoinApply" useGeneratedKeys="true" keyProperty="applyId">
INSERT INTO huayang_join_apply
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="applyName != null and applyName != ''">apply_name,</if>
<if test="applyPhone != null and applyPhone != ''">apply_phone,</if>
<if test="applyCompany != null">apply_company,</if>
<if test="applyIntent != null">apply_intent,</if>
<if test="applyArea != null">apply_area,</if>
<if test="applyStatus != null">apply_status,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="applyName != null and applyName != ''">#{applyName},</if>
<if test="applyPhone != null and applyPhone != ''">#{applyPhone},</if>
<if test="applyCompany != null">#{applyCompany},</if>
<if test="applyIntent != null">#{applyIntent},</if>
<if test="applyArea != null">#{applyArea},</if>
<if test="applyStatus != null">#{applyStatus},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateHuayangJoinApply" parameterType="com.ruoyi.system.domain.HuayangJoinApply">
UPDATE huayang_join_apply
<trim prefix="SET" suffixOverrides=",">
<if test="applyName != null and applyName != ''">apply_name = #{applyName},</if>
<if test="applyPhone != null and applyPhone != ''">apply_phone = #{applyPhone},</if>
<if test="applyCompany != null">apply_company = #{applyCompany},</if>
<if test="applyIntent != null">apply_intent = #{applyIntent},</if>
<if test="applyArea != null">apply_area = #{applyArea},</if>
<if test="applyStatus != null">apply_status = #{applyStatus},</if>
<if test="handleRemark != null">handle_remark = #{handleRemark},</if>
<if test="handleTime != null">handle_time = #{handleTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
</trim>
WHERE apply_id = #{applyId}
</update>
<update id="updateHandle" parameterType="com.ruoyi.system.domain.HuayangJoinApply">
UPDATE huayang_join_apply
SET apply_status = #{applyStatus},
handle_remark = #{handleRemark},
handle_time = NOW(),
update_by = #{updateBy}
WHERE apply_id = #{applyId}
</update>
<delete id="deleteHuayangJoinApplyById" parameterType="Long">
DELETE FROM huayang_join_apply WHERE apply_id = #{applyId}
</delete>
<delete id="deleteHuayangJoinApplyByIds" parameterType="Long">
DELETE FROM huayang_join_apply WHERE apply_id IN
<foreach item="applyId" collection="array" open="(" separator="," close=")">
#{applyId}
</foreach>
</delete>
</mapper>