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.
119 lines
4.9 KiB
XML
119 lines
4.9 KiB
XML
<?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.api.dao.auth.UserRegisterDao">
|
|
|
|
<select id="filterUserRegisters" parameterType="com.glxp.api.req.auth.UserResisterFilterRequest"
|
|
resultType="com.glxp.api.entity.auth.UserRegisterEntity">
|
|
SELECT *
|
|
FROM user_register
|
|
<where>
|
|
<if test="companyName != null and '' !=companyName">
|
|
AND companyName like concat('%',#{companyName},'%')
|
|
</if>
|
|
<if test="checkSatus != null and ''!=checkSatus">
|
|
AND checkSatus = #{checkSatus}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectByCompanyName" parameterType="java.lang.String"
|
|
resultType="com.glxp.api.entity.auth.UserRegisterEntity">
|
|
SELECT *
|
|
FROM user_register
|
|
where companyName=#{companyName}
|
|
</select>
|
|
|
|
<select id="selectByUserName" parameterType="java.lang.String"
|
|
resultType="com.glxp.api.entity.auth.UserRegisterEntity">
|
|
SELECT *
|
|
FROM user_register
|
|
where userName=#{userName}
|
|
</select>
|
|
|
|
|
|
|
|
<insert id="insertUserRegister" keyProperty="id" parameterType="com.glxp.api.entity.auth.UserRegisterEntity">
|
|
INSERT INTO user_register
|
|
(id,companyId,mobile,email,userId,realName,contactWay,companyName,creditNum,
|
|
registerAddress,bussinessStatus,legalPerson,legalIdCard,checkStatus,registerTime,
|
|
checkTime,comments)
|
|
values (#{id,jdbcType=VARCHAR},#{companyId,jdbcType=VARCHAR},#{mobile,jdbcType=VARCHAR},
|
|
#{email,jdbcType=VARCHAR},#{userId,jdbcType=VARCHAR},#{realName,jdbcType=VARCHAR},
|
|
#{contactWay,jdbcType=VARCHAR},#{companyName,jdbcType=VARCHAR},#{creditNum,jdbcType=VARCHAR},
|
|
#{registerAddress,jdbcType=VARCHAR},#{bussinessStatus,jdbcType=VARCHAR},#{legalPerson,jdbcType=VARCHAR},
|
|
#{legalIdCard,jdbcType=VARCHAR},#{checkStatus,jdbcType=VARCHAR},#{registerTime,jdbcType=TIMESTAMP},
|
|
#{checkTime,jdbcType=TIMESTAMP},#{comments,jdbcType=VARCHAR})
|
|
</insert>
|
|
|
|
<update id="updateUserRegister" parameterType="com.glxp.api.entity.auth.UserRegisterEntity">
|
|
UPDATE user_register
|
|
<trim prefix="set" suffixOverrides=",">
|
|
<if test="companyId != null">`companyId`=#{companyId},</if>
|
|
<if test="mobile != null">mobile=#{mobile},</if>
|
|
<if test="email != null">`email`=#{email},</if>
|
|
<if test="userId != null">userId=#{userId},</if>
|
|
<if test="realName != null">realName=#{realName},</if>
|
|
<if test="companyName != null">companyName=#{companyName},</if>
|
|
<if test="contactWay != null">contactWay=#{contactWay},</if>
|
|
<if test="creditNum != null">creditNum=#{creditNum},</if>
|
|
<if test="registerAddress != null">registerAddress=#{registerAddress},</if>
|
|
<if test="bussinessStatus != null">bussinessStatus=#{bussinessStatus},</if>
|
|
<if test="checkStatus != null">checkStatus=#{checkStatus},</if>
|
|
<if test="legalPerson != null">legalPerson=#{legalPerson},</if>
|
|
<if test="legalIdCard != null">legalIdCard=#{legalIdCard},</if>
|
|
<if test="checkStatus != null">checkStatus=#{checkStatus},</if>
|
|
<if test="registerTime != null">registerTime=#{registerTime},</if>
|
|
<if test="checkTime != null">checkTime=#{checkTime},</if>
|
|
<if test="comments != null">comments=#{comments},</if>
|
|
</trim>
|
|
WHERE id=#{id}
|
|
</update>
|
|
|
|
<delete id="deleteById" parameterType="java.lang.Long">
|
|
delete
|
|
from user_register
|
|
where id = #{id}
|
|
</delete>
|
|
<delete id="deleteByMobile" parameterType="map">
|
|
delete
|
|
from user_register
|
|
where mobile = #{mobile} and checkStatus=#{checkStatus}
|
|
</delete>
|
|
|
|
<delete id="deleteByCustomerId" parameterType="java.lang.String">
|
|
delete
|
|
from user_register
|
|
where userId = #{userId}
|
|
</delete>
|
|
<select id="selectById" parameterType="java.lang.Integer"
|
|
resultType="com.glxp.api.entity.auth.UserRegisterEntity">
|
|
SELECT *
|
|
FROM user_register
|
|
WHERE id = #{id}
|
|
</select>
|
|
|
|
<select id="selectByMobile" parameterType="java.lang.String"
|
|
resultType="com.glxp.api.entity.auth.UserRegisterEntity">
|
|
SELECT *
|
|
FROM user_register
|
|
WHERE mobile = #{mobile}
|
|
limit 1
|
|
</select>
|
|
|
|
<select id="selectByCustomerId" parameterType="java.lang.String"
|
|
resultType="com.glxp.api.entity.auth.UserRegisterEntity">
|
|
SELECT *
|
|
FROM user_register
|
|
WHERE companyId = #{id}
|
|
</select>
|
|
|
|
<select id="isExit" parameterType="java.lang.String" resultType="java.lang.String">
|
|
SELECT 1
|
|
FROM user_register
|
|
WHERE (
|
|
mobile = #{mobile} and checkStatus !='2' ) limit 1
|
|
|
|
</select>
|
|
</mapper>
|