|
|
@@ -46,6 +46,43 @@
|
|
|
<result column="PU_BIRTHDAY" property="puBirthday"/><!--用户生日 -->
|
|
|
<result column="PU_CARD" property="puCard"/><!-- 用户身份证号码 -->
|
|
|
</resultMap>
|
|
|
+ <!-- 将实体属性与表字段对接开始 -->
|
|
|
+ <resultMap id="resultMap2" type="net.mingsoft.people.bean.PeopleBeanExtension">
|
|
|
+ <id column="id" property="id"/><!-- 将实体的ID属性与表的ID字段对接 -->
|
|
|
+ <result column="PEOPLE_PHONE" property="peoplePhone"/><!-- 将实体的peoplePhone属性与表的peoplePhone字段对接 -->
|
|
|
+ <result column="PEOPLE_NAME" property="peopleName"/><!-- 将实体的peopleName属性与表的peopleName字段对接 -->
|
|
|
+ <result column="PEOPLE_PASSWORD" property="peoplePassword"/><!--
|
|
|
+ 将实体的PEOPLE_PASSWORD属性与表的peoplePwd字段对接 -->
|
|
|
+ <result column="PEOPLE_DATETIME" property="peopleDateTime"/><!--
|
|
|
+ 将实体的peopleDateTime属性与表的peopleDateTime字段对接 -->
|
|
|
+ <result column="PEOPLE_MAIL" property="peopleMail"/><!-- 用户邮箱 -->
|
|
|
+ <result column="PEOPLE_IP" property="peopleIp"/><!-- 用户ip -->
|
|
|
+ <result column="PEOPLE_STATE" property="peopleState"/><!-- 用户状态 -->
|
|
|
+ <result column="PEOPLE_CODE" property="peopleCode"/><!-- 用户随机码 -->
|
|
|
+ <result column="PEOPLE_CODESENDDATE" property="peopleCodeSendDate"/><!--
|
|
|
+ 用户随机码发送时间 -->
|
|
|
+ <result column="PEOPLE_MAILLCHECK" property="peopleMailCheck"/><!--
|
|
|
+ 用户是否通过邮箱验证 -->
|
|
|
+ <result column="PEOPLE_PHONECHECK" property="peoplePhoneCheck"/><!--
|
|
|
+ 用户是否通过电话验证 -->
|
|
|
+ <result column="PU_REAL_NAME" property="puRealName"/><!--用户的真实名称 -->
|
|
|
+ <result column="PU_ADDRESS" property="puAddress"/><!--用户地址 -->
|
|
|
+ <result column="PU_ICON" property="puIcon"/><!-- 用户头像 -->
|
|
|
+ <result column="PU_LEVEL" property="puLevel"/><!-- 用户等级 -->
|
|
|
+ <result column="PU_LEVEL_NAME" property="puLevelName"/><!-- 等级名称 -->
|
|
|
+ <result column="PU_ICON" property="puIcon"/><!-- 用户头像 -->
|
|
|
+ <result column="PU_NICKNAME" property="puNickname"/><!--用户昵称 -->
|
|
|
+ <result column="PU_SEX" property="puSex"/><!-- 用户性别0.未知;1.男;2.女 -->
|
|
|
+ <result column="PU_BIRTHDAY" property="puBirthday"/><!--用户生日 -->
|
|
|
+ <result column="PU_CARD" property="puCard"/><!-- 用户身份证号码 -->
|
|
|
+
|
|
|
+ <result column="COMPANY_NAME" property="companyName" /><!--公司名称 -->
|
|
|
+ <result column="POSITION" property="position" /><!--职位 -->
|
|
|
+ <result column="INVITATION_CODE" property="invitationCode" /><!--展商邀请码 -->
|
|
|
+ <result column="INVITATION_USER_ID" property="invitationUserId" /><!--邀请用户ID -->
|
|
|
+ <result column="CHANNEL" property="channel" /><!--了解渠道 -->
|
|
|
+ <result column="PURPOSE" property="purpose" /><!--参观目的 -->
|
|
|
+ </resultMap>
|
|
|
|
|
|
<!-- 将实体属性与表字段对接结束 -->
|
|
|
<sql id="insertColumns">
|
|
|
@@ -256,6 +293,85 @@
|
|
|
</select>
|
|
|
<!-- 查询用户列表结束 -->
|
|
|
|
|
|
+ <!-- 查询用户列表开始 -->
|
|
|
+ <select id="query2" resultMap="resultMap2">
|
|
|
+ select
|
|
|
+ <include refid="column_list" />
|
|
|
+ ,p.id,<include refid="user_column_list" />
|
|
|
+ ,e.INVITATION_CODE,
|
|
|
+ e.CHANNEL,
|
|
|
+ e.INVITATION_USER_ID,
|
|
|
+ e.POSITION,
|
|
|
+ e.COMPANY_NAME,
|
|
|
+ e.PURPOSE
|
|
|
+ from people p left join people_user on p.id=PEOPLE_ID
|
|
|
+ left join mdiy_model_people_info e on e.LINK_ID=p.id
|
|
|
+ <where>
|
|
|
+ <if test="where!=null">
|
|
|
+ <if test="where.peopleName != null and where.peopleName!=''">
|
|
|
+ and PEOPLE_NAME like CONCAT(CONCAT('%',#{where.peopleName}),'%')
|
|
|
+ </if>
|
|
|
+ <!-- 用户审核状态 -->
|
|
|
+ <if test="where.peopleState!=null and where.peopleState > -1">
|
|
|
+ and PEOPLE_STATE=#{where.peopleState}
|
|
|
+ </if>
|
|
|
+ <!-- 根据用户注册时间 <if test="people.peopleDateStartTime !=null "> </if> -->
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 根据用户昵称 -->
|
|
|
+ <if test="where.puNickname !=null and where.puNickname!=''">
|
|
|
+ and PU_NICKNAME like CONCAT(CONCAT('%',#{where.puNickname}),'%')
|
|
|
+ </if>
|
|
|
+ <!-- 根据用户性别 -->
|
|
|
+ <if
|
|
|
+ test="where.puSex != null and where.puSex > -1 ">
|
|
|
+ and PU_SEX=#{where.puSex}
|
|
|
+ </if>
|
|
|
+ <!-- 根据用户真实姓名 -->
|
|
|
+ <if
|
|
|
+ test="where.puRealName != null and where.puRealName !=''">
|
|
|
+ and PU_REAL_NAME like CONCAT(CONCAT('%',#{where.puRealName}),'%')
|
|
|
+ </if>
|
|
|
+ <if test="where.peopleDateStartTime != null and where.peopleDateEndTime !=null ">
|
|
|
+ <if test="_databaseId == 'mysql'">
|
|
|
+ and (PEOPLE_DATETIME between
|
|
|
+ #{where.peopleDateStartTime} and #{where.peopleDateEndTime})
|
|
|
+ </if>
|
|
|
+ <if test="_databaseId == 'oracle'">
|
|
|
+ and PEOPLE_DATETIME > to_date(#{where.peopleDateStartTime}, 'yyyy-mm-dd hh24:mi:ss')
|
|
|
+ and PEOPLE_DATETIME < to_date(#{where.peopleDateEndTime}, 'yyyy-mm-dd hh24:mi:ss')
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="where.peopleId != null and where.peopleId !=''">
|
|
|
+ and p.id=#{where.peopleId}
|
|
|
+ </if>
|
|
|
+ <if test="where.peopleMail != null and where.peopleMail !=''">
|
|
|
+ and p.PEOPLE_MAIL=#{where.peopleMail}
|
|
|
+ </if>
|
|
|
+ <if test="where.peoplePhone != null and where.peoplePhone !=''">
|
|
|
+ and p.PEOPLE_PHONE=#{where.peoplePhone}
|
|
|
+ </if>
|
|
|
+--
|
|
|
+ <if test="where.companyName != null and where.companyName !=''">
|
|
|
+ and e.COMPANY_NAME like CONCAT(CONCAT('%',#{where.companyName}),'%')
|
|
|
+ </if>
|
|
|
+ <if test="where.position != null and where.position !=''">
|
|
|
+ and e.POSITION like CONCAT(CONCAT('%',#{where.position}),'%')
|
|
|
+ </if>
|
|
|
+ <if test="where.channel != null and where.channel !=''">
|
|
|
+ and e.CHANNEL=#{where.channel}
|
|
|
+ </if>
|
|
|
+ <if test="where.purpose != null and where.purpose !=''">
|
|
|
+ and e.PURPOSE=#{where.purpose}
|
|
|
+ </if>
|
|
|
+
|
|
|
+
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by p.PEOPLE_DATETIME desc
|
|
|
+ </select>
|
|
|
+ <!-- 查询用户列表结束 -->
|
|
|
+
|
|
|
<!-- 根据应用ID查询用户总数结束 -->
|
|
|
|
|
|
<!-- 根据用户名(帐号,手机,邮箱)和验证码查询用户信息开始 -->
|