<?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="org.springblade.modules.social.mapper.SocialMapper">
|
|
<!-- 通用查询映射结果 -->
|
<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"/>
|
<result column="nation" property="nation"/>
|
<result column="birthday" property="birthday"/>
|
<result column="telephone" property="telephone"/>
|
<result column="cardid" property="cardid"/>
|
<result column="residence" property="residence"/>
|
<result column="address" property="address"/>
|
<result column="nature" property="nature"/>
|
<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
|
s.*,
|
u.real_name as realname
|
FROM
|
sys_socil s
|
LEFT JOIN blade_user u ON s.namb = u.id where 1=1
|
<if test="social.realname!=null and social.realname!=''">
|
and u.real_name like concat(concat('%', #{social.realname}),'%')
|
</if>
|
<if test="social.namb!=null and social.namb!=''">
|
and s.namb=#{social.namb}
|
</if>
|
<if test="social.deptid!=null and social.deptid!=''">
|
and s.deptid=#{social.deptid}
|
</if>
|
<if test="social.jurisdiction!=null and social.jurisdiction!=''">
|
and s.jurisdiction=#{social.jurisdiction}
|
</if>
|
</select>
|
|
<update id="upSoil">
|
update blade_user set soil=0 where cardid=#{cardid}
|
</update>
|
|
</mapper>
|