实现机构认证功能
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user