You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
104 lines
4.0 KiB
XML
104 lines
4.0 KiB
XML
4 years ago
|
<?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.glxp.sale.admin.dao.auth.UserRegisterDao">
|
||
|
|
||
|
<select id="filterUserRegisters" parameterType="com.glxp.sale.admin.req.auth.UserResisterFilterRequest"
|
||
|
resultType="com.glxp.sale.admin.entity.auth.UserRegisterEntity">
|
||
|
SELECT *
|
||
|
FROM user_register
|
||
|
<where>
|
||
|
<if test="companyName != null and '' !=companyName">
|
||
|
AND companyName like concat(#{companyName},'%')
|
||
|
</if>
|
||
|
</where>
|
||
|
|
||
|
<where>
|
||
|
<if test="checkType != null and ''!=checkType">
|
||
|
AND checkType = #{checkType}
|
||
|
</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
|
||
|
<insert id="insertUserRegister" keyProperty="id" parameterType="com.glxp.sale.admin.entity.auth.UserRegisterEntity">
|
||
|
INSERT INTO user_register
|
||
|
(
|
||
|
nickName, password, realName,
|
||
|
tel, mobile, userId,
|
||
|
email, companyName, creditNum,
|
||
|
area, detailAddr, bussinessStatus,
|
||
|
checkType, registerTime, checkTime,comments,areaCode,userName,licenseUrl
|
||
|
)
|
||
|
values
|
||
|
(
|
||
|
#{nickName},#{password},#{realName},
|
||
|
#{tel},#{mobile},#{userId},
|
||
|
#{email},#{companyName},#{creditNum},
|
||
|
#{area},#{detailAddr},#{bussinessStatus},
|
||
|
#{checkType},#{registerTime},#{checkTime},
|
||
|
#{comments},#{areaCode},#{userName},#{licenseUrl}
|
||
|
)
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateUserRegister" parameterType="com.glxp.sale.admin.entity.auth.UserRegisterEntity">
|
||
|
UPDATE user_register
|
||
|
<set>
|
||
|
<if test="nickName != null">`nickName`=#{nickName},</if>
|
||
|
<if test="password != null">password=#{password},</if>
|
||
|
<if test="realName != null">`realName`=#{realName},</if>
|
||
|
<if test="tel != null">tel=#{tel},</if>
|
||
|
<if test="mobile != null">`mobile`=#{mobile},</if>
|
||
|
<if test="userId != null">userId=#{userId},</if>
|
||
|
<if test="email != null">email=#{email},</if>
|
||
|
<if test="companyName != null">companyName=#{companyName},</if>
|
||
|
<if test="creditNum != null">creditNum=#{creditNum},</if>
|
||
|
<if test="area != null">area=#{area},</if>
|
||
|
<if test="detailAddr != null">detailAddr=#{detailAddr},</if>
|
||
|
<if test="bussinessStatus != null">bussinessStatus=#{bussinessStatus},</if>
|
||
|
<if test="checkType != null">checkType=#{checkType},</if>
|
||
|
<if test="registerTime != null">registerTime=#{registerTime},</if>
|
||
|
<if test="checkTime != null">checkTime=#{checkTime},</if>
|
||
|
<if test="areaCode != null">areaCode=#{areaCode},</if>
|
||
|
<if test="userName != null">userName=#{userName},</if>
|
||
|
<if test="licenseUrl != null">licenseUrl=#{licenseUrl},</if>
|
||
|
|
||
|
</set>
|
||
|
WHERE id=#{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteById" parameterType="java.lang.Long">
|
||
|
delete from user_register where id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteByCustomerId" parameterType="java.lang.Long">
|
||
|
delete from user_register where userId = #{userId}
|
||
|
</delete>
|
||
|
<select id="selectById" parameterType="java.lang.Integer"
|
||
|
resultType="com.glxp.sale.admin.entity.auth.UserRegisterEntity">
|
||
|
SELECT *
|
||
|
FROM user_register
|
||
|
WHERE id=#{id}
|
||
|
</select>
|
||
|
|
||
|
<select id="selectByMobile" parameterType="java.lang.String"
|
||
|
resultType="com.glxp.sale.admin.entity.auth.UserRegisterEntity">
|
||
|
SELECT *
|
||
|
FROM user_register
|
||
|
WHERE mobile=#{phone}
|
||
|
</select>
|
||
|
|
||
|
<select id="selectByCustomerId" parameterType="java.lang.Long"
|
||
|
resultType="com.glxp.sale.admin.entity.auth.UserRegisterEntity">
|
||
|
SELECT *
|
||
|
FROM user_register
|
||
|
WHERE userId=#{userId}
|
||
|
</select>
|
||
|
|
||
|
<select id="isExit" parameterType="java.lang.String" resultType="java.lang.String">
|
||
|
SELECT 1
|
||
|
FROM user_register WHERE (
|
||
|
mobile = #{phoneNum} ) limit 1
|
||
|
|
||
|
</select>
|
||
|
</mapper>
|