123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <?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.caimei365.user.mapper.BaseMapper">
- <update id="updatePasswordByUserId">
- update user set password = #{password}
- where userID = #{userId}
- </update>
- <update id="updateMobileByUserId">
- update user set bindMobile = #{mobile}
- where userID = #{userId}
- </update>
- <update id="updateShopMobileByShopId">
- update shop set contractMobile = #{mobile}
- where shopID = #{shopId}
- </update>
- <update id="updateClubMobileByClubId">
- update club set contractMobile = #{mobile}
- where clubID = #{clubId}
- </update>
- <select id="getUserIdByEmail" resultType="java.lang.Integer">
- select userID from user
- where email = #{email} and userIdentity in (1,2,3,4)
- limit 1
- </select>
- <select id="getUserIdByUserId" resultType="java.lang.Integer">
- select userID from user
- where userID = #{userId} and userIdentity in (1,2,3,4)
- limit 1
- </select>
- <select id="getUserIdByMobile" resultType="java.lang.Integer">
- SELECT u.userID FROM USER u
- LEFT JOIN cm_mall_operation_user cu ON cu.userID = u.userID
- WHERE u.bindMobile = #{mobile} and u.userIdentity in (1,2,3,4)
- UNION
- SELECT u.userID FROM USER u
- LEFT JOIN cm_mall_operation_user cu ON cu.userID = u.userID
- WHERE cu.mobile = #{mobile} AND cu.delFlag != 1
- AND u.userIdentity IN (1,2,3,4)
- LIMIT 1
- </select>
- <select id="getOperationUserIdByMobile" resultType="java.lang.Integer">
- select userID from cm_mall_operation_user
- where mobile = #{mobile} and delFlag = '0'
- limit 1
- </select>
- <select id="getClubStatusByUserId" resultType="java.lang.Integer">
- select clubStatus
- from user
- where userID = #{userId}
- </select>
- <select id="getShopStatusByUserId" resultType="java.lang.Integer">
- select manufacturerStatus
- from user
- where userID = #{userId}
- </select>
- <select id="getOperationIdByMobile" resultType="java.lang.Integer">
- select id from cm_mall_operation_user
- where mobile = #{mobile} and delFlag = '0'
- limit 1
- </select>
- <select id="getProvince" resultType="com.caimei365.user.model.vo.ProvinceVo">
- select provinceID as provinceId, name, validFlag, deliveryFee, freeMinTotalPrice
- from province where provinceID = #{provinceId}
- </select>
- <select id="getCity" resultType="com.caimei365.user.model.vo.CityVo">
- select cityID as cityId, provinceID as provinceId, name, validFlag
- from city where cityID = #{cityId}
- </select>
- <select id="getTown" resultType="com.caimei365.user.model.vo.TownVo">
- select townID as townId, cityID as cityId, name, zip, telZip, validFlag
- from town where townID = #{townID}
- </select>
- <select id="getUserByUserId" resultType="com.caimei365.user.model.vo.UserVo">
- select userID as userId,
- registerUserTypeID as registerUserTypeId,
- source,
- clubID as clubId,
- shopID as shopId,
- serviceProviderID as serviceProviderId,
- name,
- userName,
- email,
- mobile,
- bindMobile,
- password,
- userIdentity,
- userPermission,
- clubStatus,
- manufacturerStatus,
- serviceProviderStatus,
- auditNote,
- auditStatus,
- agreeFlag,
- registerTime,
- registerIP as registerIp,
- guideFlag,
- validFlag,
- userBeans,
- ableUserMoney,
- image
- from user
- where userID = #{userId}
- </select>
- <select id="getUserNameByUserId" resultType="java.lang.String">
- select userName from user where userID = #{userId}
- </select>
- <select id="getAfterSalesPhone" resultType="java.lang.String">
- select contactNumber from cm_mall_organize where id = 0 and delFlag = '0'
- </select>
- <select id="getSensitiveWords" resultType="java.lang.String">
- select words
- from cm_sensitive_words
- where id = 1 and status = 1
- <if test="checkPoint != null">
- and checkPoints like concat('%',#{checkPoint},'%')
- </if>
- </select>
- </mapper>
|