|
@@ -3,7 +3,7 @@
|
|
<mapper namespace="com.caimei.modules.user.dao.CmUserDao">
|
|
<mapper namespace="com.caimei.modules.user.dao.CmUserDao">
|
|
|
|
|
|
<sql id="cmUserColumns">
|
|
<sql id="cmUserColumns">
|
|
- a.userID AS "userID",
|
|
|
|
|
|
+ a.userID AS "userID",
|
|
a.mobile AS "mobile",
|
|
a.mobile AS "mobile",
|
|
a.userOrganizeID AS "userOrganizeID",
|
|
a.userOrganizeID AS "userOrganizeID",
|
|
a.bindMobile AS "bindMobile",
|
|
a.bindMobile AS "bindMobile",
|
|
@@ -76,7 +76,7 @@
|
|
a.isMeiDaoAuthorized AS "isMeiDaoAuthorized",
|
|
a.isMeiDaoAuthorized AS "isMeiDaoAuthorized",
|
|
a.guideFlag AS "guideFlag",
|
|
a.guideFlag AS "guideFlag",
|
|
a.userPermission AS "userPermission"
|
|
a.userPermission AS "userPermission"
|
|
- </sql>
|
|
|
|
|
|
+ </sql>
|
|
|
|
|
|
<sql id="cmUserJoins">
|
|
<sql id="cmUserJoins">
|
|
</sql>
|
|
</sql>
|
|
@@ -104,11 +104,11 @@
|
|
<if test="dbName == 'oracle'">'%'||#{mobile}||'%'</if>
|
|
<if test="dbName == 'oracle'">'%'||#{mobile}||'%'</if>
|
|
<if test="dbName == 'mssql'">'%'+#{mobile}+'%'</if>
|
|
<if test="dbName == 'mssql'">'%'+#{mobile}+'%'</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{mobile},'%')</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{mobile},'%')</if>
|
|
- OR a.bindMobile LIKE
|
|
|
|
- <if test="dbName == 'oracle'">'%'||#{mobile}||'%'</if>
|
|
|
|
- <if test="dbName == 'mssql'">'%'+#{mobile}+'%'</if>
|
|
|
|
- <if test="dbName == 'mysql'">concat('%',#{mobile},'%')</if>
|
|
|
|
- )
|
|
|
|
|
|
+ OR a.bindMobile LIKE
|
|
|
|
+ <if test="dbName == 'oracle'">'%'||#{mobile}||'%'</if>
|
|
|
|
+ <if test="dbName == 'mssql'">'%'+#{mobile}+'%'</if>
|
|
|
|
+ <if test="dbName == 'mysql'">concat('%',#{mobile},'%')</if>
|
|
|
|
+ )
|
|
</if>
|
|
</if>
|
|
<if test="email != null and email != ''">
|
|
<if test="email != null and email != ''">
|
|
AND a.email LIKE
|
|
AND a.email LIKE
|
|
@@ -122,15 +122,15 @@
|
|
<if test="dbName == 'mssql'">'%'+#{userName}+'%'</if>
|
|
<if test="dbName == 'mssql'">'%'+#{userName}+'%'</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{userName},'%')</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{userName},'%')</if>
|
|
</if>
|
|
</if>
|
|
- <if test="startTime != null and startTime != ''">
|
|
|
|
- AND (a.registerTime > #{startTime} OR a.registerTime = #{startTime})
|
|
|
|
- </if>
|
|
|
|
- <if test="endTime != null and endTime != ''">
|
|
|
|
- AND (a.registerTime < #{endTime} OR a.registerTime = #{endTime})
|
|
|
|
- </if>
|
|
|
|
- <if test="userOrganizeID != null and userOrganizeID != ''">
|
|
|
|
- AND a.userOrganizeID = #{userOrganizeID}
|
|
|
|
- </if>
|
|
|
|
|
|
+ <if test="startTime != null and startTime != ''">
|
|
|
|
+ AND (a.registerTime > #{startTime} OR a.registerTime = #{startTime})
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endTime != null and endTime != ''">
|
|
|
|
+ AND (a.registerTime < #{endTime} OR a.registerTime = #{endTime})
|
|
|
|
+ </if>
|
|
|
|
+ <if test="userOrganizeID != null and userOrganizeID != ''">
|
|
|
|
+ AND a.userOrganizeID = #{userOrganizeID}
|
|
|
|
+ </if>
|
|
<choose>
|
|
<choose>
|
|
<when test="registerUserTypeID != null and registerUserTypeID != ''">
|
|
<when test="registerUserTypeID != null and registerUserTypeID != ''">
|
|
AND a.registerUserTypeID = #{registerUserTypeID}
|
|
AND a.registerUserTypeID = #{registerUserTypeID}
|
|
@@ -153,56 +153,56 @@
|
|
</choose>
|
|
</choose>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <!--适用于企业通过手机号码查询用户-->
|
|
|
|
- <select id="findListBuyBindMobile" resultType="CmUser">
|
|
|
|
- SELECT
|
|
|
|
- *
|
|
|
|
- FROM user a
|
|
|
|
- <where>
|
|
|
|
- a.bindMobile = #{bindMobile}
|
|
|
|
- <if test="clubID != null and clubID != ''">
|
|
|
|
- AND a.clubID != #{clubID}
|
|
|
|
- </if>
|
|
|
|
- </where>
|
|
|
|
- </select>
|
|
|
|
-
|
|
|
|
- <!--星范商城查询会所-->
|
|
|
|
- <select id="findListBuyUserInfo" resultType="CmUser">
|
|
|
|
- SELECT
|
|
|
|
- a.*
|
|
|
|
- ,c.linkMan AS "linkMan"
|
|
|
|
- ,t.name as "town"
|
|
|
|
- ,ci.name as "city"
|
|
|
|
- ,p.name as "province"
|
|
|
|
- ,c.address AS "address"
|
|
|
|
- FROM user a
|
|
|
|
- LEFT JOIN club c on c.userID = a.userID
|
|
|
|
- LEFT JOIN town t on t.townID = c.townID
|
|
|
|
- LEFT JOIN city ci ON ci.cityID = c.cityID
|
|
|
|
- LEFT JOIN province p ON p.provinceID = c.provinceID
|
|
|
|
- <where>
|
|
|
|
- a.userOrganizeID = #{userOrganizeID}
|
|
|
|
- <if test="bindMobile != null and bindMobile != ''">
|
|
|
|
- AND a.bindMobile LIKE concat('%',#{bindMobile},'%')
|
|
|
|
- </if>
|
|
|
|
- <if test="name != null and name != ''">
|
|
|
|
- AND a.name LIKE concat('%',#{name},'%')
|
|
|
|
- </if>
|
|
|
|
- <if test="linkMan != null and linkMan != ''">
|
|
|
|
- AND c.linkMan LIKE concat('%',#{linkMan},'%')
|
|
|
|
- </if>
|
|
|
|
- <if test="startTime != null and startTime != ''">
|
|
|
|
- AND a.registerTime <![CDATA[ >= ]]> #{startTime}
|
|
|
|
- </if>
|
|
|
|
- <if test="endTime != null and endTime != ''">
|
|
|
|
- AND a.registerTime <![CDATA[ <= ]]> #{endTime}
|
|
|
|
- </if>
|
|
|
|
- <if test="clubStatus != null and clubStatus != ''">
|
|
|
|
- AND a.clubStatus = #{clubStatus}
|
|
|
|
- </if>
|
|
|
|
- </where>
|
|
|
|
- ORDER BY a.registerTime DESC
|
|
|
|
- </select>
|
|
|
|
|
|
+ <!--适用于企业通过手机号码查询用户-->
|
|
|
|
+ <select id="findListBuyBindMobile" resultType="CmUser">
|
|
|
|
+ SELECT
|
|
|
|
+ *
|
|
|
|
+ FROM user a
|
|
|
|
+ <where>
|
|
|
|
+ a.bindMobile = #{bindMobile}
|
|
|
|
+ <if test="clubID != null and clubID != ''">
|
|
|
|
+ AND a.clubID != #{clubID}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <!--星范商城查询会所-->
|
|
|
|
+ <select id="findListBuyUserInfo" resultType="CmUser">
|
|
|
|
+ SELECT
|
|
|
|
+ a.*
|
|
|
|
+ ,c.linkMan AS "linkMan"
|
|
|
|
+ ,t.name as "town"
|
|
|
|
+ ,ci.name as "city"
|
|
|
|
+ ,p.name as "province"
|
|
|
|
+ ,c.address AS "address"
|
|
|
|
+ FROM user a
|
|
|
|
+ LEFT JOIN club c on c.userID = a.userID
|
|
|
|
+ LEFT JOIN town t on t.townID = c.townID
|
|
|
|
+ LEFT JOIN city ci ON ci.cityID = c.cityID
|
|
|
|
+ LEFT JOIN province p ON p.provinceID = c.provinceID
|
|
|
|
+ <where>
|
|
|
|
+ a.userOrganizeID = #{userOrganizeID}
|
|
|
|
+ <if test="bindMobile != null and bindMobile != ''">
|
|
|
|
+ AND a.bindMobile LIKE concat('%',#{bindMobile},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="name != null and name != ''">
|
|
|
|
+ AND a.name LIKE concat('%',#{name},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="linkMan != null and linkMan != ''">
|
|
|
|
+ AND c.linkMan LIKE concat('%',#{linkMan},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startTime != null and startTime != ''">
|
|
|
|
+ AND a.registerTime <![CDATA[ >= ]]> #{startTime}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endTime != null and endTime != ''">
|
|
|
|
+ AND a.registerTime <![CDATA[ <= ]]> #{endTime}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="clubStatus != null and clubStatus != ''">
|
|
|
|
+ AND a.clubStatus = #{clubStatus}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ ORDER BY a.registerTime DESC
|
|
|
|
+ </select>
|
|
|
|
|
|
<select id="findAllList" resultType="CmUser">
|
|
<select id="findAllList" resultType="CmUser">
|
|
SELECT
|
|
SELECT
|
|
@@ -223,374 +223,375 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<insert id="insert" parameterType="CmUser" keyProperty="userID" useGeneratedKeys="true">
|
|
<insert id="insert" parameterType="CmUser" keyProperty="userID" useGeneratedKeys="true">
|
|
- INSERT INTO user(
|
|
|
|
- userOrganizeID,
|
|
|
|
- account,
|
|
|
|
- realName,
|
|
|
|
- userIdentity,
|
|
|
|
- companyUserID,
|
|
|
|
- openID,
|
|
|
|
- mobile,
|
|
|
|
- bindMobile,
|
|
|
|
- userPermission,
|
|
|
|
- email,
|
|
|
|
- userName,
|
|
|
|
- source,
|
|
|
|
- image,
|
|
|
|
- password,
|
|
|
|
- userLevelID,
|
|
|
|
- name,
|
|
|
|
- nick,
|
|
|
|
- sex,
|
|
|
|
- registerUserTypeID,
|
|
|
|
- manufacturerFlag,
|
|
|
|
- manufacturerStatus,
|
|
|
|
- shopID,
|
|
|
|
- serviceProviderFlag,
|
|
|
|
- clubFlag,
|
|
|
|
- masterFlag,
|
|
|
|
- normalFlag,
|
|
|
|
- auditStatus,
|
|
|
|
- auditTime,
|
|
|
|
- auditNote,
|
|
|
|
- registerTime,
|
|
|
|
- registerIP,
|
|
|
|
- loginTime,
|
|
|
|
- loginFailTime,
|
|
|
|
- loginIP,
|
|
|
|
- validFlag,
|
|
|
|
- emailCheckFlag,
|
|
|
|
- mobileCheckFlag,
|
|
|
|
- clubStatus,
|
|
|
|
- <if test="clubID != null and clubID != ''">
|
|
|
|
- clubID,
|
|
|
|
- </if>
|
|
|
|
- agreeFlag,
|
|
|
|
- activationCode,
|
|
|
|
- activationDate,
|
|
|
|
- serviceProviderStatus,
|
|
|
|
- serviceProviderID,
|
|
|
|
- masterStatus,
|
|
|
|
- masterID,
|
|
|
|
- userMoney,
|
|
|
|
- ableUserMoney,
|
|
|
|
- point,
|
|
|
|
- shopERPFlag,
|
|
|
|
- fromUserID,
|
|
|
|
- fromUserName,
|
|
|
|
- logoffTime,
|
|
|
|
- appKey,
|
|
|
|
- appSecret,
|
|
|
|
- sampleFlag,
|
|
|
|
- scanFlag,
|
|
|
|
- sysroleid,
|
|
|
|
- gender,
|
|
|
|
- age,
|
|
|
|
- salerbuyer,
|
|
|
|
- position,
|
|
|
|
- skill,
|
|
|
|
- workage,
|
|
|
|
- wechat,
|
|
|
|
- qq,
|
|
|
|
- smsFlag,
|
|
|
|
- userBeans,
|
|
|
|
- privateShopFlag,
|
|
|
|
- privateClubFlag,
|
|
|
|
- isMeiDaoAuthorized
|
|
|
|
- ) VALUES (
|
|
|
|
- #{userOrganizeID},
|
|
|
|
- #{account},
|
|
|
|
- #{realName},
|
|
|
|
- #{userIdentity},
|
|
|
|
- #{companyUserID},
|
|
|
|
- #{openID},
|
|
|
|
- #{mobile},
|
|
|
|
- #{bindMobile},
|
|
|
|
- #{userPermission},
|
|
|
|
- #{email},
|
|
|
|
- #{userName},
|
|
|
|
- #{source},
|
|
|
|
- #{image},
|
|
|
|
- #{password},
|
|
|
|
- #{userLevelID},
|
|
|
|
- #{name},
|
|
|
|
- #{nick},
|
|
|
|
- #{sex},
|
|
|
|
- #{registerUserTypeID},
|
|
|
|
- #{manufacturerFlag},
|
|
|
|
- #{manufacturerStatus},
|
|
|
|
- #{shopID},
|
|
|
|
- #{serviceProviderFlag},
|
|
|
|
- #{clubFlag},
|
|
|
|
- #{masterFlag},
|
|
|
|
- #{normalFlag},
|
|
|
|
- #{auditStatus},
|
|
|
|
- #{auditTime},
|
|
|
|
- #{auditNote},
|
|
|
|
- #{registerTime},
|
|
|
|
- #{registerIP},
|
|
|
|
- #{loginTime},
|
|
|
|
- #{loginFailTime},
|
|
|
|
- #{loginIP},
|
|
|
|
- #{validFlag},
|
|
|
|
- #{emailCheckFlag},
|
|
|
|
- #{mobileCheckFlag},
|
|
|
|
- #{clubStatus},
|
|
|
|
- <if test="clubID != null and clubID != ''">
|
|
|
|
- #{clubID},
|
|
|
|
- </if>
|
|
|
|
- #{agreeFlag},
|
|
|
|
- #{activationCode},
|
|
|
|
- #{activationDate},
|
|
|
|
- #{serviceProviderStatus},
|
|
|
|
- #{serviceProviderID},
|
|
|
|
- #{masterStatus},
|
|
|
|
- #{masterID},
|
|
|
|
- #{userMoney},
|
|
|
|
- #{ableUserMoney},
|
|
|
|
- #{point},
|
|
|
|
- #{shopERPFlag},
|
|
|
|
- #{fromUserID},
|
|
|
|
- #{fromUserName},
|
|
|
|
- #{logoffTime},
|
|
|
|
- #{appKey},
|
|
|
|
- #{appSecret},
|
|
|
|
- #{sampleFlag},
|
|
|
|
- #{scanFlag},
|
|
|
|
- #{sysroleid},
|
|
|
|
- #{gender},
|
|
|
|
- #{age},
|
|
|
|
- #{salerbuyer},
|
|
|
|
- #{position},
|
|
|
|
- #{skill},
|
|
|
|
- #{workage},
|
|
|
|
- #{wechat},
|
|
|
|
- #{qq},
|
|
|
|
- #{smsFlag},
|
|
|
|
- #{userBeans},
|
|
|
|
- #{privateShopFlag},
|
|
|
|
- #{privateClubFlag},
|
|
|
|
- #{isMeiDaoAuthorized}
|
|
|
|
- )
|
|
|
|
- </insert>
|
|
|
|
|
|
+ INSERT INTO user(
|
|
|
|
+ userOrganizeID,
|
|
|
|
+ account,
|
|
|
|
+ realName,
|
|
|
|
+ userIdentity,
|
|
|
|
+ companyUserID,
|
|
|
|
+ openID,
|
|
|
|
+ mobile,
|
|
|
|
+ bindMobile,
|
|
|
|
+ userPermission,
|
|
|
|
+ email,
|
|
|
|
+ userName,
|
|
|
|
+ source,
|
|
|
|
+ image,
|
|
|
|
+ password,
|
|
|
|
+ userLevelID,
|
|
|
|
+ name,
|
|
|
|
+ nick,
|
|
|
|
+ sex,
|
|
|
|
+ registerUserTypeID,
|
|
|
|
+ manufacturerFlag,
|
|
|
|
+ manufacturerStatus,
|
|
|
|
+ shopID,
|
|
|
|
+ serviceProviderFlag,
|
|
|
|
+ clubFlag,
|
|
|
|
+ masterFlag,
|
|
|
|
+ normalFlag,
|
|
|
|
+ auditStatus,
|
|
|
|
+ auditTime,
|
|
|
|
+ auditNote,
|
|
|
|
+ registerTime,
|
|
|
|
+ registerIP,
|
|
|
|
+ loginTime,
|
|
|
|
+ loginFailTime,
|
|
|
|
+ loginIP,
|
|
|
|
+ validFlag,
|
|
|
|
+ emailCheckFlag,
|
|
|
|
+ mobileCheckFlag,
|
|
|
|
+ clubStatus,
|
|
|
|
+ <if test="clubID != null and clubID != ''">
|
|
|
|
+ clubID,
|
|
|
|
+ </if>
|
|
|
|
+ agreeFlag,
|
|
|
|
+ activationCode,
|
|
|
|
+ activationDate,
|
|
|
|
+ serviceProviderStatus,
|
|
|
|
+ serviceProviderID,
|
|
|
|
+ masterStatus,
|
|
|
|
+ masterID,
|
|
|
|
+ userMoney,
|
|
|
|
+ ableUserMoney,
|
|
|
|
+ point,
|
|
|
|
+ shopERPFlag,
|
|
|
|
+ fromUserID,
|
|
|
|
+ fromUserName,
|
|
|
|
+ logoffTime,
|
|
|
|
+ appKey,
|
|
|
|
+ appSecret,
|
|
|
|
+ sampleFlag,
|
|
|
|
+ scanFlag,
|
|
|
|
+ sysroleid,
|
|
|
|
+ gender,
|
|
|
|
+ age,
|
|
|
|
+ salerbuyer,
|
|
|
|
+ position,
|
|
|
|
+ skill,
|
|
|
|
+ workage,
|
|
|
|
+ wechat,
|
|
|
|
+ qq,
|
|
|
|
+ smsFlag,
|
|
|
|
+ userBeans,
|
|
|
|
+ privateShopFlag,
|
|
|
|
+ privateClubFlag,
|
|
|
|
+ isMeiDaoAuthorized
|
|
|
|
+ ) VALUES (
|
|
|
|
+ #{userOrganizeID},
|
|
|
|
+ #{account},
|
|
|
|
+ #{realName},
|
|
|
|
+ #{userIdentity},
|
|
|
|
+ #{companyUserID},
|
|
|
|
+ #{openID},
|
|
|
|
+ #{mobile},
|
|
|
|
+ #{bindMobile},
|
|
|
|
+ #{userPermission},
|
|
|
|
+ #{email},
|
|
|
|
+ #{userName},
|
|
|
|
+ #{source},
|
|
|
|
+ #{image},
|
|
|
|
+ #{password},
|
|
|
|
+ #{userLevelID},
|
|
|
|
+ #{name},
|
|
|
|
+ #{nick},
|
|
|
|
+ #{sex},
|
|
|
|
+ #{registerUserTypeID},
|
|
|
|
+ #{manufacturerFlag},
|
|
|
|
+ #{manufacturerStatus},
|
|
|
|
+ #{shopID},
|
|
|
|
+ #{serviceProviderFlag},
|
|
|
|
+ #{clubFlag},
|
|
|
|
+ #{masterFlag},
|
|
|
|
+ #{normalFlag},
|
|
|
|
+ #{auditStatus},
|
|
|
|
+ #{auditTime},
|
|
|
|
+ #{auditNote},
|
|
|
|
+ #{registerTime},
|
|
|
|
+ #{registerIP},
|
|
|
|
+ #{loginTime},
|
|
|
|
+ #{loginFailTime},
|
|
|
|
+ #{loginIP},
|
|
|
|
+ #{validFlag},
|
|
|
|
+ #{emailCheckFlag},
|
|
|
|
+ #{mobileCheckFlag},
|
|
|
|
+ #{clubStatus},
|
|
|
|
+ <if test="clubID != null and clubID != ''">
|
|
|
|
+ #{clubID},
|
|
|
|
+ </if>
|
|
|
|
+ #{agreeFlag},
|
|
|
|
+ #{activationCode},
|
|
|
|
+ #{activationDate},
|
|
|
|
+ #{serviceProviderStatus},
|
|
|
|
+ #{serviceProviderID},
|
|
|
|
+ #{masterStatus},
|
|
|
|
+ #{masterID},
|
|
|
|
+ #{userMoney},
|
|
|
|
+ #{ableUserMoney},
|
|
|
|
+ #{point},
|
|
|
|
+ #{shopERPFlag},
|
|
|
|
+ #{fromUserID},
|
|
|
|
+ #{fromUserName},
|
|
|
|
+ #{logoffTime},
|
|
|
|
+ #{appKey},
|
|
|
|
+ #{appSecret},
|
|
|
|
+ #{sampleFlag},
|
|
|
|
+ #{scanFlag},
|
|
|
|
+ #{sysroleid},
|
|
|
|
+ #{gender},
|
|
|
|
+ #{age},
|
|
|
|
+ #{salerbuyer},
|
|
|
|
+ #{position},
|
|
|
|
+ #{skill},
|
|
|
|
+ #{workage},
|
|
|
|
+ #{wechat},
|
|
|
|
+ #{qq},
|
|
|
|
+ #{smsFlag},
|
|
|
|
+ #{userBeans},
|
|
|
|
+ #{privateShopFlag},
|
|
|
|
+ #{privateClubFlag},
|
|
|
|
+ #{isMeiDaoAuthorized}
|
|
|
|
+ )
|
|
|
|
+ </insert>
|
|
|
|
|
|
<update id="update">
|
|
<update id="update">
|
|
- UPDATE user SET
|
|
|
|
- <if test="account != null and account != ''">
|
|
|
|
- account = #{account},
|
|
|
|
- </if>
|
|
|
|
- <if test="bindMobile != null and bindMobile != ''">
|
|
|
|
- bindMobile = #{bindMobile},
|
|
|
|
- </if>
|
|
|
|
- <if test="realName != null">
|
|
|
|
- realName = #{realName},
|
|
|
|
- </if>
|
|
|
|
- <if test="userIdentity != null and userIdentity != ''">
|
|
|
|
- userIdentity = #{userIdentity},
|
|
|
|
- </if>
|
|
|
|
- <if test="companyUserID != null and companyUserID != ''">
|
|
|
|
- companyUserID = #{companyUserID},
|
|
|
|
- </if>
|
|
|
|
- <if test="openID != null and openID != ''">
|
|
|
|
- openID = #{openID},
|
|
|
|
- </if>
|
|
|
|
- <if test="mobile != null and mobile != ''">
|
|
|
|
- mobile = #{mobile},
|
|
|
|
- </if>
|
|
|
|
- <if test="userPermission != null and userPermission != ''">
|
|
|
|
- userPermission = #{userPermission},
|
|
|
|
- </if>
|
|
|
|
- <if test="email != null and email != ''">
|
|
|
|
- email = #{email},
|
|
|
|
- </if>
|
|
|
|
- <if test="userName != null and userName != ''">
|
|
|
|
- userName = #{userName},
|
|
|
|
- </if>
|
|
|
|
- <if test="image != null and image != ''">
|
|
|
|
- image = #{image},
|
|
|
|
- </if>
|
|
|
|
- <if test="password != null and password != ''">
|
|
|
|
- password = #{password},
|
|
|
|
- </if>
|
|
|
|
- <if test="userLevelID != null and userLevelID != ''">
|
|
|
|
- userLevelID = #{userLevelID},
|
|
|
|
- </if>
|
|
|
|
- <if test="name != null and name != ''">
|
|
|
|
- name = #{name},
|
|
|
|
- </if>
|
|
|
|
- <if test="nick != null and nick != ''">
|
|
|
|
- nick = #{nick},
|
|
|
|
- </if>
|
|
|
|
- <if test="sex != null and sex != ''">
|
|
|
|
- sex = #{sex},
|
|
|
|
- </if>
|
|
|
|
- <if test="registerUserTypeID != null and registerUserTypeID != ''">
|
|
|
|
- registerUserTypeID = #{registerUserTypeID},
|
|
|
|
- </if>
|
|
|
|
- <if test="manufacturerFlag != null and manufacturerFlag != ''">
|
|
|
|
- manufacturerFlag = #{manufacturerFlag},
|
|
|
|
- </if>
|
|
|
|
- <if test="manufacturerStatus != null and manufacturerStatus != ''">
|
|
|
|
- manufacturerStatus = #{manufacturerStatus},
|
|
|
|
- </if>
|
|
|
|
- <if test="shopID != null and shopID != ''">
|
|
|
|
- shopID = #{shopID},
|
|
|
|
- </if>
|
|
|
|
- <if test="serviceProviderFlag != null and serviceProviderFlag != ''">
|
|
|
|
- serviceProviderFlag = #{serviceProviderFlag},
|
|
|
|
- </if>
|
|
|
|
- <if test="clubFlag != null and clubFlag != ''">
|
|
|
|
- clubFlag = #{clubFlag},
|
|
|
|
- </if>
|
|
|
|
- <if test="masterFlag != null and masterFlag != ''">
|
|
|
|
- masterFlag = #{masterFlag},
|
|
|
|
- </if>
|
|
|
|
- <if test="normalFlag != null and normalFlag != ''">
|
|
|
|
- normalFlag = #{normalFlag},
|
|
|
|
- </if>
|
|
|
|
- <if test="auditStatus != null and auditStatus != ''">
|
|
|
|
- auditStatus = #{auditStatus},
|
|
|
|
- </if>
|
|
|
|
- <if test="auditTime != null">
|
|
|
|
- auditTime = #{auditTime},
|
|
|
|
- </if>
|
|
|
|
- <if test="auditNote != null and auditNote != ''">
|
|
|
|
- auditNote = #{auditNote},
|
|
|
|
- </if>
|
|
|
|
- <if test="registerTime != null ">
|
|
|
|
- registerTime = #{registerTime},
|
|
|
|
- </if>
|
|
|
|
- <if test="registerIP != null and registerIP != ''">
|
|
|
|
- registerIP = #{registerIP},
|
|
|
|
- </if>
|
|
|
|
- <if test="loginTime != null and loginTime != ''">
|
|
|
|
- loginTime = #{loginTime},
|
|
|
|
- </if>
|
|
|
|
- <if test="loginFailTime != null and loginFailTime != ''">
|
|
|
|
- loginFailTime = #{loginFailTime},
|
|
|
|
- </if>
|
|
|
|
- <if test="loginIP != null and loginIP != ''">
|
|
|
|
- loginIP = #{loginIP},
|
|
|
|
- </if>
|
|
|
|
- <if test="validFlag != null and validFlag != ''">
|
|
|
|
- validFlag = #{validFlag},
|
|
|
|
- </if>
|
|
|
|
- <if test="emailCheckFlag != null and emailCheckFlag != ''">
|
|
|
|
- emailCheckFlag = #{emailCheckFlag},
|
|
|
|
- </if>
|
|
|
|
- <if test="mobileCheckFlag != null and mobileCheckFlag != ''">
|
|
|
|
- mobileCheckFlag = #{mobileCheckFlag},
|
|
|
|
- </if>
|
|
|
|
- <if test="clubStatus != null and clubStatus != ''">
|
|
|
|
- clubStatus = #{clubStatus},
|
|
|
|
- </if>
|
|
|
|
- <if test="clubID != null and clubID != ''">
|
|
|
|
- clubID = #{clubID},
|
|
|
|
- </if>
|
|
|
|
- <if test="agreeFlag != null and agreeFlag != ''">
|
|
|
|
- agreeFlag = #{agreeFlag},
|
|
|
|
- </if>
|
|
|
|
- <if test="activationCode != null and activationCode != ''">
|
|
|
|
- activationCode = #{activationCode},
|
|
|
|
- </if>
|
|
|
|
- <if test="activationDate != null ">
|
|
|
|
- activationDate = #{activationDate},
|
|
|
|
- </if>
|
|
|
|
- <if test="serviceProviderStatus != null and serviceProviderStatus != ''">
|
|
|
|
- serviceProviderStatus = #{serviceProviderStatus},
|
|
|
|
- </if>
|
|
|
|
- <if test="serviceProviderID != null and serviceProviderID != ''">
|
|
|
|
- serviceProviderID = #{serviceProviderID},
|
|
|
|
- </if>
|
|
|
|
- <if test="masterStatus != null and masterStatus != ''">
|
|
|
|
- masterStatus = #{masterStatus},
|
|
|
|
- </if>
|
|
|
|
- <if test="masterID != null and masterID != ''">
|
|
|
|
- masterID = #{masterID},
|
|
|
|
- </if>
|
|
|
|
- <if test="userMoney != null and userMoney != ''">
|
|
|
|
- userMoney = #{userMoney},
|
|
|
|
- </if>
|
|
|
|
- <if test="point != null and point != ''">
|
|
|
|
- point = #{point},
|
|
|
|
- </if>
|
|
|
|
- <if test="shopERPFlag != null and shopERPFlag != ''">
|
|
|
|
- shopERPFlag = #{shopERPFlag},
|
|
|
|
- </if>
|
|
|
|
- <if test="fromUserID != null and fromUserID != ''">
|
|
|
|
- fromUserID = #{fromUserID},
|
|
|
|
- </if>
|
|
|
|
- <if test="fromUserName != null and fromUserName != ''">
|
|
|
|
- fromUserName = #{fromUserName},
|
|
|
|
- </if>
|
|
|
|
- <if test="logoffTime != null and logoffTime != ''">
|
|
|
|
- logoffTime = #{logoffTime},
|
|
|
|
- </if>
|
|
|
|
- <if test="appKey != null and appKey != ''">
|
|
|
|
- appKey = #{appKey},
|
|
|
|
- </if>
|
|
|
|
- <if test="appSecret != null and appSecret != ''">
|
|
|
|
- appSecret = #{appSecret},
|
|
|
|
- </if>
|
|
|
|
- <if test="sampleFlag != null and sampleFlag != ''">
|
|
|
|
- sampleFlag = #{sampleFlag},
|
|
|
|
- </if>
|
|
|
|
- <if test="scanFlag != null and scanFlag != ''">
|
|
|
|
- scanFlag = #{scanFlag},
|
|
|
|
- </if>
|
|
|
|
- <if test="sysroleid != null and sysroleid != ''">
|
|
|
|
- sysroleid = #{sysroleid},
|
|
|
|
- </if>
|
|
|
|
- <if test="gender != null and gender != ''">
|
|
|
|
- gender = #{gender},
|
|
|
|
- </if>
|
|
|
|
- <if test="age != null and age != ''">
|
|
|
|
- age = #{age},
|
|
|
|
- </if>
|
|
|
|
- <if test="salerbuyer != null and salerbuyer != ''">
|
|
|
|
- salerbuyer = #{salerbuyer},
|
|
|
|
- </if>
|
|
|
|
- <if test="position != null and position != ''">
|
|
|
|
- position = #{position},
|
|
|
|
- </if>
|
|
|
|
- <if test="skill != null and skill != ''">
|
|
|
|
- skill = #{skill},
|
|
|
|
- </if>
|
|
|
|
- <if test="workage != null and workage != ''">
|
|
|
|
- workage = #{workage},
|
|
|
|
- </if>
|
|
|
|
- <if test="wechat != null and wechat != ''">
|
|
|
|
- wechat = #{wechat},
|
|
|
|
- </if>
|
|
|
|
- <if test="qq != null and qq != ''">
|
|
|
|
- qq = #{qq},
|
|
|
|
- </if>
|
|
|
|
- <if test="smsFlag != null and smsFlag != ''">
|
|
|
|
- smsFlag = #{smsFlag},
|
|
|
|
- </if>
|
|
|
|
- <if test="userBeans != null and userBeans != ''">
|
|
|
|
- userBeans = #{userBeans},
|
|
|
|
- </if>
|
|
|
|
- <if test="privateShopFlag != null and privateShopFlag != ''">
|
|
|
|
- privateShopFlag = #{privateShopFlag},
|
|
|
|
- </if>
|
|
|
|
- <if test="privateClubFlag != null and privateClubFlag != ''">
|
|
|
|
- privateClubFlag = #{privateClubFlag},
|
|
|
|
- </if>
|
|
|
|
- <if test="isMeiDaoAuthorized != null and isMeiDaoAuthorized != ''">
|
|
|
|
- isMeiDaoAuthorized = #{isMeiDaoAuthorized},
|
|
|
|
- </if>
|
|
|
|
- <if test="guideFlag != null and guideFlag != ''">
|
|
|
|
- guideFlag = #{guideFlag},
|
|
|
|
- </if>
|
|
|
|
- userID = #{userID}
|
|
|
|
- WHERE userID = #{userID}
|
|
|
|
- </update>
|
|
|
|
|
|
+ UPDATE user SET
|
|
|
|
+ <if test="account != null and account != ''">
|
|
|
|
+ account = #{account},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="bindMobile != null and bindMobile != ''">
|
|
|
|
+ bindMobile = #{bindMobile},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="realName != null">
|
|
|
|
+ realName = #{realName},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="userIdentity != null and userIdentity != ''">
|
|
|
|
+ userIdentity = #{userIdentity},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="companyUserID != null and companyUserID != ''">
|
|
|
|
+ companyUserID = #{companyUserID},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="openID != null and openID != ''">
|
|
|
|
+ openID = #{openID},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="mobile != null and mobile != ''">
|
|
|
|
+ mobile = #{mobile},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="userPermission != null and userPermission != ''">
|
|
|
|
+ userPermission = #{userPermission},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="email != null and email != ''">
|
|
|
|
+ email = #{email},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="userName != null and userName != ''">
|
|
|
|
+ userName = #{userName},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="image != null and image != ''">
|
|
|
|
+ image = #{image},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="password != null and password != ''">
|
|
|
|
+ password = #{password},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="userLevelID != null and userLevelID != ''">
|
|
|
|
+ userLevelID = #{userLevelID},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="name != null and name != ''">
|
|
|
|
+ name = #{name},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="nick != null and nick != ''">
|
|
|
|
+ nick = #{nick},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="sex != null and sex != ''">
|
|
|
|
+ sex = #{sex},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="registerUserTypeID != null and registerUserTypeID != ''">
|
|
|
|
+ registerUserTypeID = #{registerUserTypeID},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="manufacturerFlag != null and manufacturerFlag != ''">
|
|
|
|
+ manufacturerFlag = #{manufacturerFlag},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="manufacturerStatus != null and manufacturerStatus != ''">
|
|
|
|
+ manufacturerStatus = #{manufacturerStatus},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="shopID != null and shopID != ''">
|
|
|
|
+ shopID = #{shopID},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="serviceProviderFlag != null and serviceProviderFlag != ''">
|
|
|
|
+ serviceProviderFlag = #{serviceProviderFlag},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="clubFlag != null and clubFlag != ''">
|
|
|
|
+ clubFlag = #{clubFlag},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="masterFlag != null and masterFlag != ''">
|
|
|
|
+ masterFlag = #{masterFlag},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="normalFlag != null and normalFlag != ''">
|
|
|
|
+ normalFlag = #{normalFlag},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="auditStatus != null and auditStatus != ''">
|
|
|
|
+ auditStatus = #{auditStatus},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="auditTime != null">
|
|
|
|
+ auditTime = #{auditTime},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="auditNote != null and auditNote != ''">
|
|
|
|
+ auditNote = #{auditNote},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="registerTime != null ">
|
|
|
|
+ registerTime = #{registerTime},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="registerIP != null and registerIP != ''">
|
|
|
|
+ registerIP = #{registerIP},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="loginTime != null and loginTime != ''">
|
|
|
|
+ loginTime = #{loginTime},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="loginFailTime != null and loginFailTime != ''">
|
|
|
|
+ loginFailTime = #{loginFailTime},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="loginIP != null and loginIP != ''">
|
|
|
|
+ loginIP = #{loginIP},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="validFlag != null and validFlag != ''">
|
|
|
|
+ validFlag = #{validFlag},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="emailCheckFlag != null and emailCheckFlag != ''">
|
|
|
|
+ emailCheckFlag = #{emailCheckFlag},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="mobileCheckFlag != null and mobileCheckFlag != ''">
|
|
|
|
+ mobileCheckFlag = #{mobileCheckFlag},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="clubStatus != null and clubStatus != ''">
|
|
|
|
+ clubStatus = #{clubStatus},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="clubID != null and clubID != ''">
|
|
|
|
+ clubID = #{clubID},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="agreeFlag != null and agreeFlag != ''">
|
|
|
|
+ agreeFlag = #{agreeFlag},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="activationCode != null and activationCode != ''">
|
|
|
|
+ activationCode = #{activationCode},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="activationDate != null ">
|
|
|
|
+ activationDate = #{activationDate},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="serviceProviderStatus != null and serviceProviderStatus != ''">
|
|
|
|
+ serviceProviderStatus = #{serviceProviderStatus},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="serviceProviderID != null and serviceProviderID != ''">
|
|
|
|
+ serviceProviderID = #{serviceProviderID},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="masterStatus != null and masterStatus != ''">
|
|
|
|
+ masterStatus = #{masterStatus},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="masterID != null and masterID != ''">
|
|
|
|
+ masterID = #{masterID},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="userMoney != null and userMoney != ''">
|
|
|
|
+ userMoney = #{userMoney},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="point != null and point != ''">
|
|
|
|
+ point = #{point},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="shopERPFlag != null and shopERPFlag != ''">
|
|
|
|
+ shopERPFlag = #{shopERPFlag},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="fromUserID != null and fromUserID != ''">
|
|
|
|
+ fromUserID = #{fromUserID},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="fromUserName != null and fromUserName != ''">
|
|
|
|
+ fromUserName = #{fromUserName},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="logoffTime != null and logoffTime != ''">
|
|
|
|
+ logoffTime = #{logoffTime},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="appKey != null and appKey != ''">
|
|
|
|
+ appKey = #{appKey},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="appSecret != null and appSecret != ''">
|
|
|
|
+ appSecret = #{appSecret},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="sampleFlag != null and sampleFlag != ''">
|
|
|
|
+ sampleFlag = #{sampleFlag},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="scanFlag != null and scanFlag != ''">
|
|
|
|
+ scanFlag = #{scanFlag},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="sysroleid != null and sysroleid != ''">
|
|
|
|
+ sysroleid = #{sysroleid},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="gender != null and gender != ''">
|
|
|
|
+ gender = #{gender},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="age != null and age != ''">
|
|
|
|
+ age = #{age},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="salerbuyer != null and salerbuyer != ''">
|
|
|
|
+ salerbuyer = #{salerbuyer},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="position != null and position != ''">
|
|
|
|
+ position = #{position},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="skill != null and skill != ''">
|
|
|
|
+ skill = #{skill},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="workage != null and workage != ''">
|
|
|
|
+ workage = #{workage},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="wechat != null and wechat != ''">
|
|
|
|
+ wechat = #{wechat},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="qq != null and qq != ''">
|
|
|
|
+ qq = #{qq},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="smsFlag != null and smsFlag != ''">
|
|
|
|
+ smsFlag = #{smsFlag},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="userBeans != null and userBeans != ''">
|
|
|
|
+ userBeans = #{userBeans},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="privateShopFlag != null and privateShopFlag != ''">
|
|
|
|
+ privateShopFlag = #{privateShopFlag},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="privateClubFlag != null and privateClubFlag != ''">
|
|
|
|
+ privateClubFlag = #{privateClubFlag},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isMeiDaoAuthorized != null and isMeiDaoAuthorized != ''">
|
|
|
|
+ isMeiDaoAuthorized = #{isMeiDaoAuthorized},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="guideFlag != null and guideFlag != ''">
|
|
|
|
+ guideFlag = #{guideFlag},
|
|
|
|
+ </if>
|
|
|
|
+ userID = #{userID}
|
|
|
|
+ WHERE userID = #{userID}
|
|
|
|
+ </update>
|
|
|
|
|
|
<delete id="delete">
|
|
<delete id="delete">
|
|
- DELETE FROM user
|
|
|
|
- WHERE userID = #{userID}
|
|
|
|
- </delete>
|
|
|
|
|
|
+ DELETE
|
|
|
|
+ FROM user
|
|
|
|
+ WHERE userID = #{userID}
|
|
|
|
+ </delete>
|
|
|
|
|
|
<select id="findUserByRegisterType" resultType="CmUser">
|
|
<select id="findUserByRegisterType" resultType="CmUser">
|
|
SELECT
|
|
SELECT
|
|
@@ -625,18 +626,18 @@
|
|
<update id="updateEmployeeStatus">
|
|
<update id="updateEmployeeStatus">
|
|
UPDATE user
|
|
UPDATE user
|
|
<set>
|
|
<set>
|
|
- <if test="userPermission != null and userPermission != ''">
|
|
|
|
- userPermission = #{userPermission},
|
|
|
|
- </if>
|
|
|
|
|
|
+ <if test="userPermission != null and userPermission != ''">
|
|
|
|
+ userPermission = #{userPermission},
|
|
|
|
+ </if>
|
|
<if test="clubStatus != null and clubStatus != ''">
|
|
<if test="clubStatus != null and clubStatus != ''">
|
|
clubStatus = #{clubStatus},
|
|
clubStatus = #{clubStatus},
|
|
</if>
|
|
</if>
|
|
<if test="manufacturerStatus != null and manufacturerStatus != ''">
|
|
<if test="manufacturerStatus != null and manufacturerStatus != ''">
|
|
manufacturerStatus = #{manufacturerStatus},
|
|
manufacturerStatus = #{manufacturerStatus},
|
|
</if>
|
|
</if>
|
|
- <if test="tipStatus != null and tipStatus != ''">
|
|
|
|
- tipStatus = #{tipStatus},
|
|
|
|
- </if>
|
|
|
|
|
|
+ <if test="tipStatus != null and tipStatus != ''">
|
|
|
|
+ tipStatus = #{tipStatus},
|
|
|
|
+ </if>
|
|
</set>
|
|
</set>
|
|
WHERE companyUserID=#{companyUserID} AND userID != #{companyUserID}
|
|
WHERE companyUserID=#{companyUserID} AND userID != #{companyUserID}
|
|
</update>
|
|
</update>
|
|
@@ -647,41 +648,41 @@
|
|
<if test="manufacturerStatus != null and manufacturerStatus != ''">
|
|
<if test="manufacturerStatus != null and manufacturerStatus != ''">
|
|
manufacturerStatus = #{manufacturerStatus},
|
|
manufacturerStatus = #{manufacturerStatus},
|
|
</if>
|
|
</if>
|
|
- <if test="validFlag != null and validFlag != ''">
|
|
|
|
- validFlag = #{validFlag},
|
|
|
|
- </if>
|
|
|
|
|
|
+ <if test="validFlag != null and validFlag != ''">
|
|
|
|
+ validFlag = #{validFlag},
|
|
|
|
+ </if>
|
|
</set>
|
|
</set>
|
|
WHERE userID = #{userID}
|
|
WHERE userID = #{userID}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<update id="updateShopStatus">
|
|
<update id="updateShopStatus">
|
|
- UPDATE shop
|
|
|
|
|
|
+ UPDATE shop
|
|
<set>
|
|
<set>
|
|
<if test="status != null and status != ''">
|
|
<if test="status != null and status != ''">
|
|
status = #{status},
|
|
status = #{status},
|
|
</if>
|
|
</if>
|
|
</set>
|
|
</set>
|
|
WHERE userID = #{userID}
|
|
WHERE userID = #{userID}
|
|
- </update>
|
|
|
|
|
|
+ </update>
|
|
|
|
|
|
<update id="updateUserAudit">
|
|
<update id="updateUserAudit">
|
|
UPDATE user
|
|
UPDATE user
|
|
<set>
|
|
<set>
|
|
- <if test="auditStatus != null and auditStatus != ''">
|
|
|
|
- auditStatus = #{auditStatus},
|
|
|
|
- </if>
|
|
|
|
|
|
+ <if test="auditStatus != null and auditStatus != ''">
|
|
|
|
+ auditStatus = #{auditStatus},
|
|
|
|
+ </if>
|
|
<if test="auditNote != null and auditNote != ''">
|
|
<if test="auditNote != null and auditNote != ''">
|
|
auditNote = #{auditNote},
|
|
auditNote = #{auditNote},
|
|
</if>
|
|
</if>
|
|
<if test="manufacturerStatus != null and manufacturerStatus != ''">
|
|
<if test="manufacturerStatus != null and manufacturerStatus != ''">
|
|
manufacturerStatus = #{manufacturerStatus},
|
|
manufacturerStatus = #{manufacturerStatus},
|
|
</if>
|
|
</if>
|
|
- <if test="auditTime != null and auditTime != ''">
|
|
|
|
- auditTime = #{auditTime},
|
|
|
|
- </if>
|
|
|
|
- <if test="validFlag != null and validFlag != ''">
|
|
|
|
- validFlag = #{validFlag},
|
|
|
|
- </if>
|
|
|
|
|
|
+ <if test="auditTime != null and auditTime != ''">
|
|
|
|
+ auditTime = #{auditTime},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="validFlag != null and validFlag != ''">
|
|
|
|
+ validFlag = #{validFlag},
|
|
|
|
+ </if>
|
|
</set>
|
|
</set>
|
|
WHERE userID = #{userId}
|
|
WHERE userID = #{userId}
|
|
</update>
|
|
</update>
|
|
@@ -689,130 +690,140 @@
|
|
<update id="updateShopAudit">
|
|
<update id="updateShopAudit">
|
|
UPDATE shop
|
|
UPDATE shop
|
|
<set>
|
|
<set>
|
|
- <if test="auditStatus != null and auditStatus != ''">
|
|
|
|
- auditStatus = #{auditStatus},
|
|
|
|
- </if>
|
|
|
|
|
|
+ <if test="auditStatus != null and auditStatus != ''">
|
|
|
|
+ auditStatus = #{auditStatus},
|
|
|
|
+ </if>
|
|
<if test="auditNote != null and auditNote != ''">
|
|
<if test="auditNote != null and auditNote != ''">
|
|
auditNote = #{auditNote},
|
|
auditNote = #{auditNote},
|
|
</if>
|
|
</if>
|
|
<if test="manufacturerStatus != null and manufacturerStatus != ''">
|
|
<if test="manufacturerStatus != null and manufacturerStatus != ''">
|
|
status = #{manufacturerStatus},
|
|
status = #{manufacturerStatus},
|
|
</if>
|
|
</if>
|
|
- <if test="auditTime != null and auditTime != ''">
|
|
|
|
- auditTime = #{auditTime},
|
|
|
|
- </if>
|
|
|
|
|
|
+ <if test="auditTime != null and auditTime != ''">
|
|
|
|
+ auditTime = #{auditTime},
|
|
|
|
+ </if>
|
|
</set>
|
|
</set>
|
|
WHERE shopID = #{shopId}
|
|
WHERE shopID = #{shopId}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
|
|
- <update id="updateEmployeePermission">
|
|
|
|
- UPDATE user SET userPermission = #{userPermission}
|
|
|
|
- WHERE companyUserID=#{companyUserID} AND userID != #{companyUserID} AND auditStatus = '1'
|
|
|
|
- </update>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- <update id="updateUserInfo">
|
|
|
|
- UPDATE user SET
|
|
|
|
- realName = #{realName},
|
|
|
|
- name = #{name},
|
|
|
|
- userName = #{userName},
|
|
|
|
- bindMobile = #{bindMobile},
|
|
|
|
- email = #{email}
|
|
|
|
- WHERE userID = #{userID}
|
|
|
|
- </update>
|
|
|
|
-
|
|
|
|
- <update id="initEmployeeInfo">
|
|
|
|
- UPDATE user SET
|
|
|
|
- companyUserID = NULL,
|
|
|
|
- userIdentity = '0',
|
|
|
|
- userPermission = '1',
|
|
|
|
- registerUserTypeID = '10' ,
|
|
|
|
- auditStatus = NULL ,
|
|
|
|
- auditTime = NULL ,
|
|
|
|
- userName = realName,
|
|
|
|
- name = NULL ,
|
|
|
|
- clubID = NULL ,
|
|
|
|
- clubStatus = NULL ,
|
|
|
|
- shopID = NULL ,
|
|
|
|
- manufacturerStatus = NULL ,
|
|
|
|
- tipStatus = '1'
|
|
|
|
- WHERE companyUserID=#{companyUserID} AND userID != #{companyUserID}
|
|
|
|
- </update>
|
|
|
|
-
|
|
|
|
- <update id="updateAbleUserMoney">
|
|
|
|
- UPDATE user SET
|
|
|
|
- ableUserMoney = #{ableUserMoney}
|
|
|
|
- WHERE userID = #{userId}
|
|
|
|
- </update>
|
|
|
|
-
|
|
|
|
- <update id="updateMoney">
|
|
|
|
- UPDATE user SET
|
|
|
|
- userMoney = #{userMoney},
|
|
|
|
- ableUserMoney = #{ableUserMoney}
|
|
|
|
- WHERE userID = #{userID}
|
|
|
|
- </update>
|
|
|
|
-
|
|
|
|
- <select id="findUserByMobile" resultType="CmUser">
|
|
|
|
- SELECT
|
|
|
|
- <include refid="cmUserColumns"/>
|
|
|
|
- FROM user a
|
|
|
|
- WHERE a.mobile=#{mobile}
|
|
|
|
- </select>
|
|
|
|
-
|
|
|
|
- <select id="getUserPayOrder" resultType="com.caimei.modules.order.entity.NewShopOrder">
|
|
|
|
|
|
+ <update id="updateEmployeePermission">
|
|
|
|
+ UPDATE user
|
|
|
|
+ SET userPermission = #{userPermission}
|
|
|
|
+ WHERE companyUserID = #{companyUserID}
|
|
|
|
+ AND userID != #{companyUserID}
|
|
|
|
+ AND auditStatus = '1'
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <update id="updateUserInfo">
|
|
|
|
+ UPDATE user
|
|
|
|
+ SET realName = #{realName},
|
|
|
|
+ name = #{name},
|
|
|
|
+ userName = #{userName},
|
|
|
|
+ bindMobile = #{bindMobile},
|
|
|
|
+ email = #{email}
|
|
|
|
+ WHERE userID = #{userID}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <update id="initEmployeeInfo">
|
|
|
|
+ UPDATE user
|
|
|
|
+ SET companyUserID = NULL,
|
|
|
|
+ userIdentity = '0',
|
|
|
|
+ userPermission = '1',
|
|
|
|
+ registerUserTypeID = '10',
|
|
|
|
+ auditStatus = NULL,
|
|
|
|
+ auditTime = NULL,
|
|
|
|
+ userName = realName,
|
|
|
|
+ name = NULL,
|
|
|
|
+ clubID = NULL,
|
|
|
|
+ clubStatus = NULL,
|
|
|
|
+ shopID = NULL,
|
|
|
|
+ manufacturerStatus = NULL,
|
|
|
|
+ tipStatus = '1'
|
|
|
|
+ WHERE companyUserID = #{companyUserID}
|
|
|
|
+ AND userID != #{companyUserID}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <update id="updateAbleUserMoney">
|
|
|
|
+ UPDATE user
|
|
|
|
+ SET ableUserMoney = #{ableUserMoney}
|
|
|
|
+ WHERE userID = #{userId}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <update id="updateMoney">
|
|
|
|
+ UPDATE user
|
|
|
|
+ SET userMoney = #{userMoney},
|
|
|
|
+ ableUserMoney = #{ableUserMoney}
|
|
|
|
+ WHERE userID = #{userID}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <select id="findUserByMobile" resultType="CmUser">
|
|
|
|
+ SELECT
|
|
|
|
+ <include refid="cmUserColumns"/>
|
|
|
|
+ FROM user a
|
|
|
|
+ WHERE a.mobile=#{mobile}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getUserPayOrder" resultType="com.caimei.modules.order.entity.NewShopOrder">
|
|
select *
|
|
select *
|
|
from cm_shop_order
|
|
from cm_shop_order
|
|
- where
|
|
|
|
- (`status` = 2 || `status` = 3 || `status` = 4 || `status` = 5)
|
|
|
|
- AND userID=#{userId}
|
|
|
|
|
|
+ where (`status` = 2 || `status` = 3 || `status` = 4 || `status` = 5)
|
|
|
|
+ AND userID = #{userId}
|
|
</select>
|
|
</select>
|
|
<select id="selectByMobileOrEmail" resultType="com.caimei.modules.user.entity.CmUser">
|
|
<select id="selectByMobileOrEmail" resultType="com.caimei.modules.user.entity.CmUser">
|
|
- select u.*,cu.mobile as operatorMobile from user u
|
|
|
|
- left join cm_mall_operation_user cu on cu.userID = u.userID
|
|
|
|
- where (u.bindMobile = #{mobileOrEmail}
|
|
|
|
- or u.email = #{mobileOrEmail}
|
|
|
|
- or (cu.mobile = #{mobileOrEmail} and cu.delFlag != 1))
|
|
|
|
- AND u.userIdentity IN (1,2,3,4)
|
|
|
|
- AND u.userOrganizeID = 0
|
|
|
|
- <if test="source == 'www'">
|
|
|
|
- AND u.registerUserTypeID IN (1,3,4)
|
|
|
|
- </if>
|
|
|
|
- <if test="source == 'crm'">
|
|
|
|
- AND u.registerUserTypeID IN (1,2,3,32,4)
|
|
|
|
- </if>
|
|
|
|
- </select>
|
|
|
|
-
|
|
|
|
- <update id="updateUserBeans">
|
|
|
|
- UPDATE USER SET userBeans = #{userBeans} WHERE userID = #{userID}
|
|
|
|
- </update>
|
|
|
|
-
|
|
|
|
- <select id="findUserByOrganizeId" resultType="com.caimei.modules.user.entity.CmUser">
|
|
|
|
- SELECT
|
|
|
|
- <include refid="cmUserColumns"/>
|
|
|
|
- FROM user a
|
|
|
|
- WHERE a.userOrganizeID=#{organizeId}
|
|
|
|
- limit 1
|
|
|
|
- </select>
|
|
|
|
-
|
|
|
|
- <select id="getOrganizeStoreName" resultType="java.lang.String">
|
|
|
|
- select name from cm_organize_store where id = #{organizeStoreId}
|
|
|
|
- </select>
|
|
|
|
-
|
|
|
|
- <update id="updateByClubStatus">
|
|
|
|
- UPDATE user SET clubStatus = #{clubStatus} WHERE userID = #{confirmUserId}
|
|
|
|
- </update>
|
|
|
|
-
|
|
|
|
- <select id="findByConfirmTime" resultType="date">
|
|
|
|
- SELECT
|
|
|
|
- confirmTime
|
|
|
|
- FROM
|
|
|
|
- club_confirm_record
|
|
|
|
- WHERE
|
|
|
|
- userId = #{userId}
|
|
|
|
- ORDER BY
|
|
|
|
- confirmTime DESC
|
|
|
|
- LIMIT
|
|
|
|
- 1
|
|
|
|
- </select>
|
|
|
|
|
|
+ select u.*,cu.mobile as operatorMobile from user u
|
|
|
|
+ left join cm_mall_operation_user cu on cu.userID = u.userID
|
|
|
|
+ where (u.bindMobile = #{mobileOrEmail}
|
|
|
|
+ or u.email = #{mobileOrEmail}
|
|
|
|
+ or (cu.mobile = #{mobileOrEmail} and cu.delFlag != 1))
|
|
|
|
+ AND u.userIdentity IN (1,2,3,4)
|
|
|
|
+ AND u.userOrganizeID = 0
|
|
|
|
+ <if test="source == 'www'">
|
|
|
|
+ AND u.registerUserTypeID IN (1,3,4)
|
|
|
|
+ </if>
|
|
|
|
+ <if test="source == 'crm'">
|
|
|
|
+ AND u.registerUserTypeID IN (1,2,3,32,4)
|
|
|
|
+ </if>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <update id="updateUserBeans">
|
|
|
|
+ UPDATE USER
|
|
|
|
+ SET userBeans = #{userBeans}
|
|
|
|
+ WHERE userID = #{userID}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <select id="findUserByOrganizeId" resultType="com.caimei.modules.user.entity.CmUser">
|
|
|
|
+ SELECT
|
|
|
|
+ <include refid="cmUserColumns"/>
|
|
|
|
+ FROM user a
|
|
|
|
+ WHERE a.userOrganizeID=#{organizeId}
|
|
|
|
+ limit 1
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getOrganizeStoreName" resultType="java.lang.String">
|
|
|
|
+ select name
|
|
|
|
+ from cm_organize_store
|
|
|
|
+ where id = #{organizeStoreId}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <update id="updateByClubStatus">
|
|
|
|
+ UPDATE user
|
|
|
|
+ SET clubStatus = #{clubStatus}
|
|
|
|
+ WHERE userID = #{confirmUserId}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <select id="findByConfirmTime" resultType="date">
|
|
|
|
+ SELECT confirmTime
|
|
|
|
+ FROM club_confirm_record
|
|
|
|
+ WHERE userId = #{userId}
|
|
|
|
+ ORDER BY confirmTime DESC
|
|
|
|
+ LIMIT 1
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="findUserBeans" resultType="java.lang.Integer">
|
|
|
|
+ select userBeans
|
|
|
|
+ from user
|
|
|
|
+ where userID = #{userId}
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|