Files
Arbitrate-Backend/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/DeptIdentifyMapper.xml
T
2023-11-23 18:41:59 +08:00

131 lines
6.3 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" />
<result property="delFlag" column="del_flag" />
<result property="creditCode" column="credit_code" />
<result property="legalPerName" column="legal_per_name" />
<result property="legalPerPhone" column="legal_per_phone" />
<result property="identifyEmail" column="identify_email" />
<result property="deptId" column="dept_id" />
<result property="userId" column="user_id" />
</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,credit_code,legal_per_name,legal_per_phone
,identify_email,dept_id ,user_id
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
AND del_flag =0
</where>
ORDER BY id DESC
</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="identifyType != null">identify_type,</if>
<if test="authFlowId != null and authFlowId != ''">auth_flow_id,</if>
<if test="creditCode != null and creditCode != ''">credit_code,</if>
<if test="legalPerName != null and legalPerName != ''">legal_per_name,</if>
<if test="legalPerPhone != null and legalPerPhone != ''">legal_per_phone,</if>
<if test="identifyEmail != null and identifyEmail != ''">identify_email,</if>
<if test="deptId != null ">dept_id,</if>
<if test="userId != null ">user_id,</if>
del_flag
)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="identifyType != null ">#{identifyType},</if>
<if test="authFlowId != null and authFlowId != '' ">#{authFlowId},</if>
<if test="creditCode != null and creditCode != '' ">#{creditCode},</if>
<if test="legalPerName != null and legalPerName != '' ">#{legalPerName},</if>
<if test="legalPerPhone != null and legalPerPhone != '' ">#{legalPerPhone},</if>
<if test="identifyEmail != null and identifyEmail != '' ">#{identifyEmail},</if>
<if test="deptId != null ">#{deptId},</if>
<if test="userId != null ">#{userId},</if>
0
)
</insert>
<update id="updateDeptIdentify" parameterType="DeptIdentify">
update dept_identify
<set>
<if test="identifyDate != null">identify_date = #{identifyDate},</if>
<if test="identifyName != null">identify_name = #{identifyName},</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="delFlag != null ">del_flag = #{delFlag},</if>
<if test="operName != null and operName != ''">oper_name = #{operName},</if>
<if test="operPhone != null and operPhone != ''">oper_phone = #{operPhone},</if>
<if test="creditCode != null and creditCode != ''">credit_code = #{creditCode},</if>
<if test="legalPerName != null and legalPerName != ''">legal_per_name = #{legalPerName},</if>
<if test="legalPerPhone != null and legalPerPhone != ''">legal_per_phone = #{legalPerPhone},</if>
<if test="identifyEmail != null and identifyEmail != ''">identify_email = #{identifyEmail},</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>