123 lines
4.9 KiB
XML
123 lines
4.9 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="deptId" column="dept_id" />
|
|
<result property="userId" column="user_id" />
|
|
<result property="identifyStatus" column="identify_status" />
|
|
<result property="identifyDate" column="identify_date" />
|
|
<result property="isUse" column="is_use" />
|
|
<result property="nickName" column="nick_name" />
|
|
<result property="phonenumber" column="phonenumber" />
|
|
<result property="deptName" column="dept_name" />
|
|
<result property="sealName" column="seal_name" />
|
|
<result property="orgId" column="org_id" />
|
|
<result property="authFlowId" column="auth_flow_id" />
|
|
<result property="sealId" column="seal_id" />
|
|
<result property="sealStatus" column="seal_status" />
|
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="selectDeptIdentify" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
|
|
SELECT ud.user_id , ud.nick_name ,ud.phonenumber ,ud.dept_id ,d.dept_name
|
|
FROM (SELECT u.user_id , u.nick_name ,u.phonenumber ,u.dept_id
|
|
FROM sys_user_post up left join sys_user u on u.user_id = up.user_id
|
|
left join sys_post sp on up.post_id = sp.post_id
|
|
where sp.post_code = 'jbr') ud left join sys_dept d on ud.dept_id = d.dept_id
|
|
WHERE d.dept_type = 1
|
|
</select>
|
|
|
|
<select id="selectDeptIdentifyBydeptid" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
|
|
SELECT d.id ,d.dept_id ,d.user_id ,d.org_id ,d.auth_flow_id
|
|
from dept_identify d
|
|
<where>
|
|
<if test="deptId != null">
|
|
AND d.dept_id = #{deptId}
|
|
</if>
|
|
<if test="userId != null">
|
|
AND d.user_id = #{userId}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<insert id="insertDeptIdentify" parameterType="DeptIdentify" useGeneratedKeys="true" keyProperty="id">
|
|
insert into dept_identify(
|
|
<if test="deptId != null">dept_id,</if>
|
|
<if test="userId != null">user_id,</if>
|
|
<if test="identifyStatus != null">identify_status</if>
|
|
)values(
|
|
<if test="deptId != null">#{deptId},</if>
|
|
<if test="userId != null">#{userId},</if>
|
|
<if test="identifyStatus != null">#{identifyStatus}</if>
|
|
)
|
|
</insert>
|
|
|
|
<select id="selectDeptIdentifylist" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
|
|
SELECT d.id ,d.dept_id ,d.user_id, d.identify_status ,d.identify_date ,d.is_use , d.seal_name,
|
|
d.org_id , d.seal_id ,sd.dept_name , u.nick_name ,u.phonenumber
|
|
from dept_identify d left join sys_dept sd on d.dept_id = sd.dept_id
|
|
left join sys_user u on u.user_id = d.user_id
|
|
<where>
|
|
<if test="identifyStatus != null">
|
|
AND d.identify_status = #{identifyStatus}
|
|
</if>
|
|
<if test="isUse != null">
|
|
AND d.is_use = #{isUse}
|
|
</if>
|
|
<if test="id != null">
|
|
AND d.id = #{id}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectDeptIdentifylistother" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
|
|
SELECT d.id ,d.dept_id ,d.user_id,d.identify_status ,d.is_use ,d.sealName ,d.sealId ,d.annexId
|
|
from dept_identify d
|
|
<where>
|
|
<if test="identifyStatus != null">
|
|
AND d.identify_status = #{identifyStatus}
|
|
</if>
|
|
<if test="id != null">
|
|
AND d.id = #{id}
|
|
</if>
|
|
<if test="sealStatus != null">
|
|
AND d.seal_status = #{sealStatus}
|
|
</if>
|
|
<if test="deptId != null">
|
|
AND d.dept_id = #{deptId}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
|
|
<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="sealName != null and sealName != ''">seal_name = #{sealName},</if>
|
|
<if test="sealId != null and sealId != ''">seal_id = #{sealId},</if>
|
|
<if test="sealStatus != null ">seal_status = #{sealStatus},</if>
|
|
</set>
|
|
<where>
|
|
<if test="id != null">
|
|
AND d.id = #{id}
|
|
</if>
|
|
<if test="sealId != null">
|
|
AND seal_id = #{sealId}
|
|
</if>
|
|
</where>
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper> |