|
@@ -0,0 +1,275 @@
|
|
|
+<?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.fs.his.mapper.FsUserInfoMapper">
|
|
|
+
|
|
|
+ <resultMap type="FsUserInfo" id="FsUserInfoResult">
|
|
|
+ <result property="userId" column="user_id"/>
|
|
|
+ <result property="companyUserId" column="company_user_id"/>
|
|
|
+ <result property="username" column="username"/>
|
|
|
+ <result property="sex" column="sex"/>
|
|
|
+ <result property="birthdate" column="birthdate"/>
|
|
|
+ <result property="phone" column="phone"/>
|
|
|
+ <result property="idCard" column="id_card"/>
|
|
|
+ <result property="previousEmployer" column="previous_employer"/>
|
|
|
+ <result property="disposableIncome" column="disposable_income"/>
|
|
|
+ <result property="actualConsumption" column="actual_consumption"/>
|
|
|
+ <result property="city" column="city"/>
|
|
|
+ <result property="residentialCommunity" column="residential_community"/>
|
|
|
+ <result property="houseNumber" column="house_number"/>
|
|
|
+ <result property="area" column="area"/>
|
|
|
+ <result property="floor" column="floor"/>
|
|
|
+ <result property="partnerName" column="partner_name"/>
|
|
|
+ <result property="partnerAge" column="partner_age"/>
|
|
|
+ <result property="partnerEmployer" column="partner_employer"/>
|
|
|
+ <result property="grandchildrenSchool" column="grandchildren_school"/>
|
|
|
+ <result property="isMember" column="is_member"/>
|
|
|
+ <result property="memberLevel" column="member_level"/>
|
|
|
+ <result property="joinTime" column="join_time"/>
|
|
|
+ <result property="expiryTime" column="expiry_time"/>
|
|
|
+ <result property="managementMonth" column="management_month"/>
|
|
|
+ <result property="position" column="position"/>
|
|
|
+ <result property="hobbies" column="hobbies"/>
|
|
|
+ <result property="specialties" column="specialties"/>
|
|
|
+ <result property="faith" column="faith"/>
|
|
|
+ <result property="concerns" column="concerns"/>
|
|
|
+ <result property="problemsToSolve" column="problems_to_solve"/>
|
|
|
+ <result property="healthSuggestions" column="health_suggestions"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectFsUserInfoVo">
|
|
|
+ select
|
|
|
+ user_id,
|
|
|
+ company_user_id,
|
|
|
+ username,
|
|
|
+ sex,
|
|
|
+ birthdate,
|
|
|
+ phone,
|
|
|
+ id_card,
|
|
|
+ previous_employer,
|
|
|
+ disposable_income,
|
|
|
+ actual_consumption,
|
|
|
+ city,
|
|
|
+ residential_community,
|
|
|
+ house_number,
|
|
|
+ area,
|
|
|
+ floor,
|
|
|
+ partner_name,
|
|
|
+ partner_age,
|
|
|
+ partner_employer,
|
|
|
+ grandchildren_school,
|
|
|
+ is_member,
|
|
|
+ member_level,
|
|
|
+ join_time,
|
|
|
+ expiry_time,
|
|
|
+ management_month,
|
|
|
+ position,
|
|
|
+ hobbies,
|
|
|
+ specialties,
|
|
|
+ faith,
|
|
|
+ concerns,
|
|
|
+ problems_to_solve,
|
|
|
+ health_suggestions,
|
|
|
+ create_time,
|
|
|
+ update_time
|
|
|
+ from fs_user_info
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <!-- 根据企业用户信息查询用户列表信息 -->
|
|
|
+ <select id="selectFsUserInfoList" resultMap="FsUserInfoResult">
|
|
|
+ select info.user_id,
|
|
|
+ info.company_user_id,
|
|
|
+ info.username,
|
|
|
+ info.sex,
|
|
|
+ info.birthdate,
|
|
|
+ info.phone,
|
|
|
+ info.id_card,
|
|
|
+ info.previous_employer,
|
|
|
+ info.disposable_income,
|
|
|
+ info.actual_consumption,
|
|
|
+ info.city,
|
|
|
+ info.residential_community,
|
|
|
+ info.house_number,
|
|
|
+ info.area,
|
|
|
+ info.floor,
|
|
|
+ info.partner_name,
|
|
|
+ info.partner_age,
|
|
|
+ info.partner_employer,
|
|
|
+ info.grandchildren_school,
|
|
|
+ info.is_member,
|
|
|
+ info.member_level,
|
|
|
+ info.join_time,
|
|
|
+ info.expiry_time,
|
|
|
+ info.management_month,
|
|
|
+ info.position,
|
|
|
+ info.hobbies,
|
|
|
+ info.specialties,
|
|
|
+ info.faith,
|
|
|
+ info.concerns,
|
|
|
+ info.problems_to_solve,
|
|
|
+ info.health_suggestions,
|
|
|
+ info.create_time
|
|
|
+ from fs_user_info info
|
|
|
+ left join fs_user fs on info.user_id = fs.user_id
|
|
|
+ where info.company_user_id = #{companyUserId} and fs.is_del=0
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 更具用户id查询详细信息 -->
|
|
|
+ <select id="selectFsUserInfoById" resultMap="FsUserInfoResult">
|
|
|
+ select info.user_id,
|
|
|
+ info.company_user_id,
|
|
|
+ info.username,
|
|
|
+ info.sex,
|
|
|
+ info.birthdate,
|
|
|
+ info.phone,
|
|
|
+ info.id_card,
|
|
|
+ info.previous_employer,
|
|
|
+ info.disposable_income,
|
|
|
+ info.actual_consumption,
|
|
|
+ info.city,
|
|
|
+ info.residential_community,
|
|
|
+ info.house_number,
|
|
|
+ info.area,
|
|
|
+ info.floor,
|
|
|
+ info.partner_name,
|
|
|
+ info.partner_age,
|
|
|
+ info.partner_employer,
|
|
|
+ info.grandchildren_school,
|
|
|
+ info.is_member,
|
|
|
+ info.member_level,
|
|
|
+ info.join_time,
|
|
|
+ info.expiry_time,
|
|
|
+ info.management_month,
|
|
|
+ info.position,
|
|
|
+ info.hobbies,
|
|
|
+ info.specialties,
|
|
|
+ info.faith,
|
|
|
+ info.concerns,
|
|
|
+ info.problems_to_solve,
|
|
|
+ info.health_suggestions,
|
|
|
+ info.create_time
|
|
|
+ from fs_user_info info
|
|
|
+ left join fs_user fs on info.user_id = fs.user_id
|
|
|
+ where info.user_id = #{userId} and fs.is_del=0
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 登记用户信息 -->
|
|
|
+ <insert id="insertFsUserInfo" parameterType="FsUserInfo">
|
|
|
+ insert into fs_user_info
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="userId != null and userId != ''">user_id,</if>
|
|
|
+ <if test="companyUserId != null and companyUserId != ''">company_user_id,</if>
|
|
|
+ <if test="username != null and username != ''">username,</if>
|
|
|
+ <if test="sex != null and sex != ''">sex,</if>
|
|
|
+ <if test="birthdate != null">birthdate,</if>
|
|
|
+ <if test="phone != null">phone,</if>
|
|
|
+ <if test="idCard != null">id_card,</if>
|
|
|
+ <if test="previousEmployer != null">previous_employer,</if>
|
|
|
+ <if test="disposableIncome != null">disposable_income,</if>
|
|
|
+ <if test="actualConsumption != null">actual_consumption,</if>
|
|
|
+ <if test="city != null">city,</if>
|
|
|
+ <if test="residentialCommunity != null">residential_community,</if>
|
|
|
+ <if test="houseNumber != null">house_number,</if>
|
|
|
+ <if test="area != null">area,</if>
|
|
|
+ <if test="floor != null">floor,</if>
|
|
|
+ <if test="partnerName != null">partner_name,</if>
|
|
|
+ <if test="partnerAge != null">partner_age,</if>
|
|
|
+ <if test="partnerEmployer != null">partner_employer,</if>
|
|
|
+ <if test="grandchildrenSchool != null">grandchildren_school,</if>
|
|
|
+ <if test="isMember != null and isMember != ''">is_member,</if>
|
|
|
+ <if test="memberLevel != null">member_level,</if>
|
|
|
+ <if test="joinTime != null">join_time,</if>
|
|
|
+ <if test="expiryTime != null">expiry_time,</if>
|
|
|
+ <if test="managementMonth != null">management_month,</if>
|
|
|
+ <if test="position != null">position,</if>
|
|
|
+ <if test="hobbies != null">hobbies,</if>
|
|
|
+ <if test="specialties != null">specialties,</if>
|
|
|
+ <if test="faith != null">faith,</if>
|
|
|
+ <if test="concerns != null">concerns,</if>
|
|
|
+ <if test="problemsToSolve != null">problems_to_solve,</if>
|
|
|
+ <if test="healthSuggestions != null">health_suggestions,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="userId != null and userId != ''">#{userId},</if>
|
|
|
+ <if test="companyUserId != null and companyUserId != ''">#{companyUserId},</if>
|
|
|
+ <if test="username != null and username != ''">#{username},</if>
|
|
|
+ <if test="sex != null and sex != ''">#{sex},</if>
|
|
|
+ <if test="birthdate != null">#{birthdate},</if>
|
|
|
+ <if test="phone != null">#{phone},</if>
|
|
|
+ <if test="idCard != null">#{idCard},</if>
|
|
|
+ <if test="previousEmployer != null">#{previousEmployer},</if>
|
|
|
+ <if test="disposableIncome != null">#{disposableIncome},</if>
|
|
|
+ <if test="actualConsumption != null">#{actualConsumption},</if>
|
|
|
+ <if test="city != null">#{city},</if>
|
|
|
+ <if test="residentialCommunity != null">#{residentialCommunity},</if>
|
|
|
+ <if test="houseNumber != null">#{houseNumber},</if>
|
|
|
+ <if test="area != null">#{area},</if>
|
|
|
+ <if test="floor != null">#{floor},</if>
|
|
|
+ <if test="partnerName != null">#{partnerName},</if>
|
|
|
+ <if test="partnerAge != null">#{partnerAge},</if>
|
|
|
+ <if test="partnerEmployer != null">#{partnerEmployer},</if>
|
|
|
+ <if test="grandchildrenSchool != null">#{grandchildrenSchool},</if>
|
|
|
+ <if test="isMember != null and isMember != ''">#{isMember},</if>
|
|
|
+ <if test="memberLevel != null">#{memberLevel},</if>
|
|
|
+ <if test="joinTime != null">#{joinTime},</if>
|
|
|
+ <if test="expiryTime != null">#{expiryTime},</if>
|
|
|
+ <if test="managementMonth != null">#{managementMonth},</if>
|
|
|
+ <if test="position != null">#{position},</if>
|
|
|
+ <if test="hobbies != null">#{hobbies},</if>
|
|
|
+ <if test="specialties != null">#{specialties},</if>
|
|
|
+ <if test="faith != null">#{faith},</if>
|
|
|
+ <if test="concerns != null">#{concerns},</if>
|
|
|
+ <if test="problemsToSolve != null">#{problemsToSolve},</if>
|
|
|
+ <if test="healthSuggestions != null">#{healthSuggestions},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <!-- 更新用户信息 -->
|
|
|
+ <update id="updateFsUserInfo" parameterType="FsUserInfo">
|
|
|
+ update fs_user_info
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="userId != null and userId != ''">user_id = #{userId},</if>
|
|
|
+ <if test="companyUserId != null and companyUserId != ''">company_user_id = #{companyUserId},</if>
|
|
|
+ <if test="username != null and username != ''">username = #{username},</if>
|
|
|
+ <if test="sex != null and sex != ''">sex = #{sex},</if>
|
|
|
+ <if test="birthdate != null">birthdate = #{birthdate},</if>
|
|
|
+ <if test="phone != null">phone = #{phone},</if>
|
|
|
+ <if test="idCard != null">id_card = #{idCard},</if>
|
|
|
+ <if test="previousEmployer != null">previous_employer = #{previousEmployer},</if>
|
|
|
+ <if test="disposableIncome != null">disposable_income = #{disposableIncome},</if>
|
|
|
+ <if test="actualConsumption != null">actual_consumption = #{actualConsumption},</if>
|
|
|
+ <if test="city != null">city = #{city},</if>
|
|
|
+ <if test="residentialCommunity != null">residential_community = #{residentialCommunity},</if>
|
|
|
+ <if test="houseNumber != null">house_number = #{houseNumber},</if>
|
|
|
+ <if test="area != null">area = #{area},</if>
|
|
|
+ <if test="floor != null">floor = #{floor},</if>
|
|
|
+ <if test="partnerName != null">partner_name = #{partnerName},</if>
|
|
|
+ <if test="partnerAge != null">partner_age = #{partnerAge},</if>
|
|
|
+ <if test="partnerEmployer != null">partner_employer = #{partnerEmployer},</if>
|
|
|
+ <if test="grandchildrenSchool != null">grandchildren_school = #{grandchildrenSchool},</if>
|
|
|
+ <if test="isMember != null and isMember != ''">is_member = #{isMember},</if>
|
|
|
+ <if test="memberLevel != null">member_level = #{memberLevel},</if>
|
|
|
+ <if test="joinTime != null">join_time = #{joinTime},</if>
|
|
|
+ <if test="expiryTime != null">expiry_time = #{expiryTime},</if>
|
|
|
+ <if test="managementMonth != null">management_month = #{managementMonth},</if>
|
|
|
+ <if test="position != null">position = #{position},</if>
|
|
|
+ <if test="hobbies != null">hobbies = #{hobbies},</if>
|
|
|
+ <if test="specialties != null">specialties = #{specialties},</if>
|
|
|
+ <if test="faith != null">faith = #{faith},</if>
|
|
|
+ <if test="concerns != null">concerns = #{concerns},</if>
|
|
|
+ <if test="problemsToSolve != null">problems_to_solve = #{problemsToSolve},</if>
|
|
|
+ <if test="healthSuggestions != null">health_suggestions = #{healthSuggestions},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ where user_id = #{userId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+</mapper>
|