实现机构认证功能

This commit is contained in:
qitz
2023-10-30 20:06:38 +08:00
parent 9e16fc1b1a
commit 0cda870fbd
13 changed files with 595 additions and 17 deletions
@@ -96,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deptId != null and deptId != 0">dept_id,</if>
<if test="parentId != null and parentId != 0">parent_id,</if>
<if test="deptName != null and deptName != ''">dept_name,</if>
<if test="deptType != null">dept_type,</if>
<if test="ancestors != null and ancestors != ''">ancestors,</if>
<if test="orderNum != null">order_num,</if>
<if test="leader != null and leader != ''">leader,</if>
@@ -108,6 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deptId != null and deptId != 0">#{deptId},</if>
<if test="parentId != null and parentId != 0">#{parentId},</if>
<if test="deptName != null and deptName != ''">#{deptName},</if>
<if test="deptType != null">#{deptType},</if>
<if test="ancestors != null and ancestors != ''">#{ancestors},</if>
<if test="orderNum != null">#{orderNum},</if>
<if test="leader != null and leader != ''">#{leader},</if>
@@ -124,6 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<set>
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
<if test="deptType != null">dept_type = #{deptType},</if>
<if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
<if test="orderNum != null">order_num = #{orderNum},</if>
<if test="leader != null">leader = #{leader},</if>
@@ -0,0 +1,100 @@
<?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" />
</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
from dept_identify d
<where>
<if test="deptId != null">
AND d.dept_id = #{deptId}
</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, 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
from dept_identify d
<where>
<if test="identifyStatus != null">
AND d.identify_status = #{identifyStatus}
</if>
<if test="id != null">
AND d.id != #{id}
</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>
</set>
where id = #{id}
</update>
</mapper>