Files
Arbitrate-Backend/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/DeptIdentifyMapper.xml
T
2023-11-16 14:21:43 +08:00

99 lines
4.0 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.wisdomarbitrate.mapper.DeptIdentifyMapper">
<resultMap type="DeptIdentify" id="DeptIdentifyResult">
<id property="id" column="id" />
<result property="identifyStatus" column="identify_status" />
<result property="identifyDate" column="identify_date" />
<result property="isUse" column="is_use" />
<result property="orgId" column="org_id" />
<result property="authFlowId" column="auth_flow_id" />
<result property="identifyName" column="identify_name" />
<result property="operName" column="oper_name" />
<result property="operPhone" column="oper_phone" />
<result property="identifyType" column="identify_type" />
</resultMap>
<select id="selectDeptIdentify" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
SELECT id, identify_name ,identify_status , identify_date,is_use,org_id,auth_flow_id,
oper_name,oper_phone,identify_type
FROM dept_identify
<where>
<if test="id != null">
AND id = #{id}
</if>
<if test="identifyStatus != null">
AND identify_status = #{identifyStatus}
</if>
<if test="isUse != null">
AND is_use = #{isUse}
</if>
<if test="identifyName != null and identifyName != ''">
AND identify_name = #{identifyName}
</if>
<if test="operName != null and operName != ''">
AND oper_name = #{operName}
</if>
<if test="operPhone != null and operPhone != ''">
AND oper_phone = #{operPhone}
</if>
AND identify_type = 1
</where>
</select>
<insert id="insertDeptIdentify" parameterType="DeptIdentify" useGeneratedKeys="true" keyProperty="id">
insert into dept_identify(
<if test="identifyName != null and identifyName != ''">identify_name,</if>
<if test="identifyStatus != null">identify_status,</if>
<if test="identifyDate != null">identify_date,</if>
<if test="isUse != null">is_use,</if>
<if test="orgId != null and orgId != ''">org_id,</if>
<if test="operName != null and operName != ''">oper_name,</if>
<if test="operPhone != null and operPhone != ''">oper_phone,</if>
<if test="authFlowId != null and authFlowId != ''">auth_flow_id,</if>
<if test="identifyType != null">identify_type</if>
)values(
<if test="identifyName != null and identifyName != ''">#{identifyName},</if>
<if test="identifyStatus != null">#{identifyStatus},</if>
<if test="identifyDate != null">#{identifyDate},</if>
<if test="isUse != null">#{isUse},</if>
<if test="orgId != null and orgId != ''">#{orgId},</if>
<if test="operName != null and operName != ''">#{operName},</if>
<if test="operPhone != null and operPhone != ''">#{operPhone},</if>
<if test="authFlowId != null and authFlowId != '' ">#{authFlowId},</if>
<if test="identifyType != null ">#{identifyType}</if>
)
</insert>
<update id="updateDeptIdentify" parameterType="DeptIdentify">
update dept_identify
<set>
<if test="identifyDate != null">identify_date = #{identifyDate},</if>
<if test="isUse != null">is_use = #{isUse},</if>
<if test="identifyStatus != null ">identify_status = #{identifyStatus},</if>
<if test="orgId != null and orgId != ''">org_id = #{orgId},</if>
<if test="authFlowId != null and authFlowId != '' ">auth_flow_id = #{authFlowId}</if>
</set>
<where>
<if test="id != null">
AND id = #{id}
</if>
</where>
</update>
</mapper>