From 8b375fe00a241b3a769b82fe3dac8d1c9dce8a02 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 16 Jun 2022 14:36:07 +0800
Subject: [PATCH] 模拟考试修改
---
src/main/java/org/springblade/modules/social/mapper/SocialMapper.xml | 40 ++++++++++++++++++++++++++++++++++++----
1 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/springblade/modules/social/mapper/SocialMapper.xml b/src/main/java/org/springblade/modules/social/mapper/SocialMapper.xml
index 5e8cb30..7fbfc19 100644
--- a/src/main/java/org/springblade/modules/social/mapper/SocialMapper.xml
+++ b/src/main/java/org/springblade/modules/social/mapper/SocialMapper.xml
@@ -3,7 +3,7 @@
<mapper namespace="org.springblade.modules.social.mapper.SocialMapper">
<!-- 通用查询映射结果 -->
- <resultMap id="socialResultMap" type="org.springblade.modules.social.entity.Social">
+ <resultMap id="socialResultMap" type="org.springblade.modules.social.vo.SocialVO">
<id column="id" property="id"/>
<result column="namb" property="namb"/>
<result column="sex" property="sex"/>
@@ -17,15 +17,47 @@
<result column="amount" property="amount"/>
<result column="insuredtime" property="insuredtime"/>
<result column="deptid" property="deptid"/>
+ <result column="jurisdiction" property="jurisdiction"/>
</resultMap>
- <select id="selectSocialPage" resultMap="socialResultMap">
- select * from sys_social
+ <select id="selectSocialPage" resultType="org.springblade.modules.social.vo.SocialVO">
+ SELECT
+ s.*,
+ u.real_name as realname
+ FROM
+ sys_socil s
+ LEFT JOIN
+ blade_user u
+ ON
+ s.cardid = u.cardid
+ left join
+ sys_jurisdiction sj
+ on
+ sj.id = s.jurisdiction
+ where 1=1
+ and u.is_deleted = 0
+ AND u.status = 1
+ AND u.role_id = '1412226235153731586'
+ <if test="social.jurisdiction!=null and social.jurisdiction!='' and social.jurisdiction!='1372091709474910209'">
+ and (sj.id=#{social.jurisdiction} or sj.parent_id = #{social.jurisdiction})
+ </if>
+ <if test="social.realname!=null and social.realname!=''">
+ and u.real_name like concat(concat('%', #{social.realname}),'%')
+ </if>
+ <if test="social.cardid!=null and social.cardid!=''">
+ and s.cardid like concat(concat('%', #{social.cardid}),'%')
+ </if>
+ <if test="social.namb!=null and social.namb!=''">
+ and s.namb like concat('%',#{social.namb},'%')
+ </if>
+ <if test="social.deptid!=null and social.deptid!=''">
+ and s.deptid=#{social.deptid}
+ </if>
</select>
<update id="upSoil">
- update blade_user set soil=0 where cardid=#{cardid}
+ update blade_user set soil=0 where id=#{cardid}
</update>
</mapper>
--
Gitblit v1.9.3