<?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.panzhihua.service_community.dao.SysUserDao">
|
|
<resultMap type="com.panzhihua.service_community.entity.SysUser" id="SysUserMap">
|
<result property="userId" column="user_id"/>
|
<result property="account" column="account"/>
|
<result property="password" column="password"/>
|
<result property="openid" column="openid"/>
|
<result property="sessionKey" column="session_key"/>
|
<result property="unionid" column="unionid"/>
|
<result property="phone" column="phone"/>
|
<result property="nickName" column="nick_name"/>
|
<result property="name" column="name"/>
|
<result property="communityId" column="community_id"/>
|
<result property="sex" column="sex"/>
|
<result property="idCard" column="id_card"/>
|
<result property="birthday" column="birthday"/>
|
<result property="imageUrl" column="image_url"/>
|
<result property="type" column="type"/>
|
<result property="job" column="job"/>
|
<result property="isVolunteer" column="is_volunteer"/>
|
<result property="isPartymember" column="is_partymember"/>
|
<result property="status" column="status"/>
|
<result property="createAt" column="create_at"/>
|
<result property="lastLoginTime" column="last_login_time"/>
|
<result property="tags" column="tags"/>
|
<result property="familyId" column="family_id"/>
|
<result property="faceUrl" column="face_url"/>
|
<result property="faceState" column="face_state"/>
|
<result property="rejectReson" column="reject_reson"/>
|
<result property="areaId" column="area_id"/>
|
<result property="cardPhotoFront" column="card_photo_front"/>
|
<result property="cardPhotoBack" column="card_photo_back"/>
|
<result property="familyBook" column="family_book"/>
|
<result property="continuousLandingDays" column="continuous_landing_days"/>
|
<result property="isTips" column="is_tips"/>
|
<result property="workStatus" column="work_status"/>
|
<result property="workStartTime" column="work_start_time"/>
|
<result property="workEndTime" column="work_end_time"/>
|
<result property="bigAgeTips" column="big_age_tips"/>
|
<result property="plaintextPassword" column="plaintext_password"/>
|
<result property="streetId" column="street_id"/>
|
<result property="relationName" column="relation_name"/>
|
<result property="loveIntegral" column="love_integral"/>
|
<result property="playPwd" column="play_pwd"/>
|
</resultMap>
|
|
<!--查询单个-->
|
<select id="queryById" resultMap="SysUserMap">
|
select
|
user_id, account, password, openid, session_key, unionid, phone, nick_name, name,play_pwd,
|
community_id, sex, id_card, birthday, image_url, type, job, is_volunteer, is_partymember,
|
status, create_at, last_login_time, tags, family_id, face_url, face_state, reject_reson,
|
area_id, card_photo_front, card_photo_back, family_book, continuous_landing_days, is_tips,
|
work_status, work_start_time, work_end_time, big_age_tips, plaintext_password,love_integral
|
from sys_user
|
where user_id = #{userId}
|
</select>
|
|
<!--查询指定行数据-->
|
<select id="queryAllByLimit" resultMap="SysUserMap">
|
select
|
user_id, account, password, openid, session_key, unionid, phone, nick_name, name, community_id, sex, id_card,
|
birthday, image_url, type, job, is_volunteer, is_partymember, status, create_at, last_login_time, tags,play_pwd,
|
family_id, face_url, face_state, reject_reson, area_id, card_photo_front, card_photo_back, family_book,love_integral,
|
continuous_landing_days, is_tips, work_status, work_start_time, work_end_time, big_age_tips, plaintext_password
|
from sys_user
|
<where>
|
<if test="dto.userId != null">
|
and user_id = #{dto.userId}
|
</if>
|
<if test="dto.account != null and dto.account != ''">
|
and account = #{dto.account}
|
</if>
|
<if test="dto.password != null and dto.password != ''">
|
and password = #{dto.password}
|
</if>
|
<if test="dto.openid != null and dto.openid != ''">
|
and openid = #{dto.openid}
|
</if>
|
<if test="dto.sessionKey != null and dto.sessionKey != ''">
|
and session_key = #{dto.sessionKey}
|
</if>
|
<if test="dto.unionid != null and dto.unionid != ''">
|
and unionid = #{dto.unionid}
|
</if>
|
<if test="dto.phone != null and dto.phone != ''">
|
and phone = #{dto.phone}
|
</if>
|
<if test="dto.nickName != null and dto.nickName != ''">
|
and nick_name = #{dto.nickName}
|
</if>
|
<if test="dto.name != null and dto.name != ''">
|
and name = #{dto.name}
|
</if>
|
<if test="dto.communityId != null">
|
and community_id = #{dto.communityId}
|
</if>
|
<if test="dto.sex != null">
|
and sex = #{dto.sex}
|
</if>
|
<if test="dto.idCard != null and dto.idCard != ''">
|
and id_card = #{dto.idCard}
|
</if>
|
<if test="dto.birthday != null">
|
and birthday = #{dto.birthday}
|
</if>
|
<if test="dto.imageUrl != null and dto.imageUrl != ''">
|
and image_url = #{dto.imageUrl}
|
</if>
|
<if test="dto.type != null">
|
and type = #{dto.type}
|
</if>
|
<if test="dto.job != null and dto.job != ''">
|
and job = #{dto.job}
|
</if>
|
<if test="dto.isVolunteer != null">
|
and is_volunteer = #{dto.isVolunteer}
|
</if>
|
<if test="dto.isPartymember != null">
|
and is_partymember = #{dto.isPartymember}
|
</if>
|
<if test="dto.status != null">
|
and status = #{dto.status}
|
</if>
|
<if test="dto.createAt != null">
|
and create_at = #{dto.createAt}
|
</if>
|
<if test="dto.lastLoginTime != null">
|
and last_login_time = #{dto.lastLoginTime}
|
</if>
|
<if test="dto.tags != null and dto.tags != ''">
|
and tags = #{dto.tags}
|
</if>
|
<if test="dto.familyId != null">
|
and family_id = #{dto.familyId}
|
</if>
|
<if test="dto.faceUrl != null and dto.faceUrl != ''">
|
and face_url = #{dto.faceUrl}
|
</if>
|
<if test="dto.faceState != null">
|
and face_state = #{dto.faceState}
|
</if>
|
<if test="dto.rejectReson != null and dto.rejectReson != ''">
|
and reject_reson = #{dto.rejectReson}
|
</if>
|
<if test="dto.areaId != null">
|
and area_id = #{dto.areaId}
|
</if>
|
<if test="dto.cardPhotoFront != null and dto.cardPhotoFront != ''">
|
and card_photo_front = #{dto.cardPhotoFront}
|
</if>
|
<if test="dto.cardPhotoBack != null and dto.cardPhotoBack != ''">
|
and card_photo_back = #{dto.cardPhotoBack}
|
</if>
|
<if test="dto.familyBook != null and dto.familyBook != ''">
|
and family_book = #{dto.familyBook}
|
</if>
|
<if test="dto.continuousLandingDays != null">
|
and continuous_landing_days = #{dto.continuousLandingDays}
|
</if>
|
<if test="dto.isTips != null">
|
and is_tips = #{dto.isTips}
|
</if>
|
<if test="dto.workStatus != null">
|
and work_status = #{dto.workStatus}
|
</if>
|
<if test="dto.workStartTime != null">
|
and work_start_time = #{dto.workStartTime}
|
</if>
|
<if test="dto.workEndTime != null">
|
and work_end_time = #{dto.workEndTime}
|
</if>
|
<if test="dto.bigAgeTips != null">
|
and big_age_tips = #{dto.bigAgeTips}
|
</if>
|
<if test="dto.plaintextPassword != null and dto.plaintextPassword != ''">
|
and plaintext_password = #{dto.plaintextPassword}
|
</if>
|
</where>
|
order by create_at desc
|
</select>
|
|
<!--查询所有数据-->
|
<select id="queryAllByList" resultMap="SysUserMap">
|
select
|
user_id, account, password, openid, session_key, unionid, phone, nick_name, name, community_id, sex, id_card,
|
birthday, image_url, type, job, is_volunteer, is_partymember, status, create_at, last_login_time, tags,play_pwd,
|
family_id, face_url, face_state, reject_reson, area_id, card_photo_front, card_photo_back, family_book,love_integral,
|
continuous_landing_days, is_tips, work_status, work_start_time, work_end_time, big_age_tips, plaintext_password
|
from sys_user
|
<where>
|
<if test="dto.userId != null">
|
and user_id = #{dto.userId}
|
</if>
|
<if test="dto.account != null and dto.account != ''">
|
and account = #{dto.account}
|
</if>
|
<if test="dto.password != null and dto.password != ''">
|
and password = #{dto.password}
|
</if>
|
<if test="dto.openid != null and dto.openid != ''">
|
and openid = #{dto.openid}
|
</if>
|
<if test="dto.sessionKey != null and dto.sessionKey != ''">
|
and session_key = #{dto.sessionKey}
|
</if>
|
<if test="dto.unionid != null and dto.unionid != ''">
|
and unionid = #{dto.unionid}
|
</if>
|
<if test="dto.phone != null and dto.phone != ''">
|
and phone = #{dto.phone}
|
</if>
|
<if test="dto.nickName != null and dto.nickName != ''">
|
and nick_name = #{dto.nickName}
|
</if>
|
<if test="dto.name != null and dto.name != ''">
|
and name = #{dto.name}
|
</if>
|
<if test="dto.communityId != null">
|
and community_id = #{dto.communityId}
|
</if>
|
<if test="dto.sex != null">
|
and sex = #{dto.sex}
|
</if>
|
<if test="dto.idCard != null and dto.idCard != ''">
|
and id_card = #{dto.idCard}
|
</if>
|
<if test="dto.birthday != null">
|
and birthday = #{dto.birthday}
|
</if>
|
<if test="dto.imageUrl != null and dto.imageUrl != ''">
|
and image_url = #{dto.imageUrl}
|
</if>
|
<if test="dto.type != null">
|
and type = #{dto.type}
|
</if>
|
<if test="dto.job != null and dto.job != ''">
|
and job = #{dto.job}
|
</if>
|
<if test="dto.isVolunteer != null">
|
and is_volunteer = #{dto.isVolunteer}
|
</if>
|
<if test="dto.isPartymember != null">
|
and is_partymember = #{dto.isPartymember}
|
</if>
|
<if test="dto.status != null">
|
and status = #{dto.status}
|
</if>
|
<if test="dto.createAt != null">
|
and create_at = #{dto.createAt}
|
</if>
|
<if test="dto.lastLoginTime != null">
|
and last_login_time = #{dto.lastLoginTime}
|
</if>
|
<if test="dto.tags != null and dto.tags != ''">
|
and tags = #{dto.tags}
|
</if>
|
<if test="dto.familyId != null">
|
and family_id = #{dto.familyId}
|
</if>
|
<if test="dto.faceUrl != null and dto.faceUrl != ''">
|
and face_url = #{dto.faceUrl}
|
</if>
|
<if test="dto.faceState != null">
|
and face_state = #{dto.faceState}
|
</if>
|
<if test="dto.rejectReson != null and dto.rejectReson != ''">
|
and reject_reson = #{dto.rejectReson}
|
</if>
|
<if test="dto.areaId != null">
|
and area_id = #{dto.areaId}
|
</if>
|
<if test="dto.cardPhotoFront != null and dto.cardPhotoFront != ''">
|
and card_photo_front = #{dto.cardPhotoFront}
|
</if>
|
<if test="dto.cardPhotoBack != null and dto.cardPhotoBack != ''">
|
and card_photo_back = #{dto.cardPhotoBack}
|
</if>
|
<if test="dto.familyBook != null and dto.familyBook != ''">
|
and family_book = #{dto.familyBook}
|
</if>
|
<if test="dto.continuousLandingDays != null">
|
and continuous_landing_days = #{dto.continuousLandingDays}
|
</if>
|
<if test="dto.isTips != null">
|
and is_tips = #{dto.isTips}
|
</if>
|
<if test="dto.workStatus != null">
|
and work_status = #{dto.workStatus}
|
</if>
|
<if test="dto.workStartTime != null">
|
and work_start_time = #{dto.workStartTime}
|
</if>
|
<if test="dto.workEndTime != null">
|
and work_end_time = #{dto.workEndTime}
|
</if>
|
<if test="dto.bigAgeTips != null">
|
and big_age_tips = #{dto.bigAgeTips}
|
</if>
|
<if test="dto.plaintextPassword != null and dto.plaintextPassword != ''">
|
and plaintext_password = #{dto.plaintextPassword}
|
</if>
|
</where>
|
order by create_at desc
|
</select>
|
|
<update id="updatePassWord">
|
update sys_user set plaintext_password = #{passWord},password = #{pwd} where community_id = #{storeId} and `type` = 20
|
</update>
|
<select id="selectOpenId" resultType="String">
|
select openid from sys_user where type = 1 and app_id ='wx118de8a734d269f0' and is_accept = 1
|
</select>
|
</mapper>
|