Files
Arbitrate-Backend/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/DeptIdentifyMapper.xml
T

119 lines
5.4 KiB
XML
Raw Normal View History

2023-10-30 20:06:38 +08:00
<?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" />
2023-11-09 17:34:12 +08:00
<result property="orgId" column="org_id" />
<result property="authFlowId" column="auth_flow_id" />
2023-11-15 18:27:09 +08:00
<result property="identifyName" column="identify_name" />
<result property="operName" column="oper_name" />
<result property="operPhone" column="oper_phone" />
2023-11-16 14:21:43 +08:00
<result property="identifyType" column="identify_type" />
2023-11-17 14:25:03 +08:00
<result property="delFlag" column="del_flag" />
2023-11-22 11:51:51 +08:00
<result property="creditCode" column="credit_code" />
<result property="legalPerName" column="legal_per_name" />
<result property="legalPerPhone" column="legal_per_phone" />
2023-10-30 20:06:38 +08:00
</resultMap>
<select id="selectDeptIdentify" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
2023-11-15 18:27:09 +08:00
SELECT id, identify_name ,identify_status , identify_date,is_use,org_id,auth_flow_id,
2023-11-22 11:51:51 +08:00
oper_name,oper_phone,identify_type,credit_code,legal_per_name,legal_per_phone
2023-11-15 18:27:09 +08:00
FROM dept_identify
2023-10-30 20:06:38 +08:00
<where>
2023-11-15 09:01:20 +08:00
<if test="id != null">
2023-11-15 18:27:09 +08:00
AND id = #{id}
2023-11-15 09:01:20 +08:00
</if>
2023-11-15 18:27:09 +08:00
<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
2023-11-17 14:25:03 +08:00
AND del_flag =0
2023-10-30 20:06:38 +08:00
</where>
</select>
2023-11-15 18:27:09 +08:00
2023-10-30 20:06:38 +08:00
<insert id="insertDeptIdentify" parameterType="DeptIdentify" useGeneratedKeys="true" keyProperty="id">
insert into dept_identify(
2023-11-16 14:21:43 +08:00
<if test="identifyName != null and identifyName != ''">identify_name,</if>
2023-11-15 09:01:20 +08:00
<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>
2023-11-16 14:21:43 +08:00
<if test="operName != null and operName != ''">oper_name,</if>
<if test="operPhone != null and operPhone != ''">oper_phone,</if>
2023-11-17 14:25:03 +08:00
<if test="identifyType != null">identify_type,</if>
<if test="authFlowId != null and authFlowId != ''">auth_flow_id,</if>
2023-11-22 11:51:51 +08:00
<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>
2023-11-17 14:25:03 +08:00
del_flag
2023-10-30 20:06:38 +08:00
)values(
2023-11-16 14:21:43 +08:00
<if test="identifyName != null and identifyName != ''">#{identifyName},</if>
2023-11-15 09:01:20 +08:00
<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>
2023-11-16 14:21:43 +08:00
<if test="operName != null and operName != ''">#{operName},</if>
<if test="operPhone != null and operPhone != ''">#{operPhone},</if>
2023-11-17 14:25:03 +08:00
<if test="identifyType != null ">#{identifyType},</if>
<if test="authFlowId != null and authFlowId != '' ">#{authFlowId},</if>
2023-11-22 11:51:51 +08:00
<if test="creditCode != null and creditCode != '' ">#{creditCode},</if>
<if test="legalPerName != null and legalPerName != '' ">#{legalPerName},</if>
<if test="legalPerPhone != null and legalPerPhone != '' ">#{legalPerPhone},</if>
2023-11-17 14:25:03 +08:00
0
2023-10-30 20:06:38 +08:00
)
</insert>
2023-11-15 18:27:09 +08:00
2023-10-30 20:06:38 +08:00
2023-11-10 18:08:30 +08:00
2023-10-30 20:06:38 +08:00
<update id="updateDeptIdentify" parameterType="DeptIdentify">
update dept_identify
<set>
<if test="identifyDate != null">identify_date = #{identifyDate},</if>
2023-11-17 17:49:53 +08:00
<if test="identifyName != null">identify_name = #{identifyName},</if>
2023-10-30 20:06:38 +08:00
<if test="isUse != null">is_use = #{isUse},</if>
<if test="identifyStatus != null ">identify_status = #{identifyStatus},</if>
2023-11-14 14:42:10 +08:00
<if test="orgId != null and orgId != ''">org_id = #{orgId},</if>
2023-11-17 14:25:03 +08:00
<if test="delFlag != null ">del_flag = #{delFlag},</if>
<if test="operName != null ">oper_name = #{operName},</if>
<if test="operPhone != null ">oper_phone = #{operPhone},</if>
2023-11-22 11:51:51 +08:00
<if test="creditCode != null ">credit_code = #{creditCode},</if>
<if test="legalPerName != null ">legal_per_name = #{legalPerName},</if>
<if test="legalPerPhone != null ">legal_per_phone = #{legalPerPhone},</if>
2023-11-15 18:27:09 +08:00
<if test="authFlowId != null and authFlowId != '' ">auth_flow_id = #{authFlowId}</if>
2023-10-30 20:06:38 +08:00
</set>
2023-11-10 18:08:30 +08:00
<where>
<if test="id != null">
2023-11-14 14:42:10 +08:00
AND id = #{id}
2023-11-10 18:08:30 +08:00
</if>
2023-11-15 09:01:20 +08:00
2023-11-10 18:08:30 +08:00
</where>
2023-10-30 20:06:38 +08:00
</update>
</mapper>