123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?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.travel.mapper.SupplierMapper">
- <!-- 修改供应商信息 -->
- <update id="upddateSupplier" parameterType="Supplier">
- update sys_supplier
- <set>
- <trim suffixOverrides=",">
- <if test="natureSupplier != null and natureSupplier != ''">
- nature_supplier = #{natureSupplier},
- </if>
- <if test="contact != null and contact != ''">
- contact = #{contact},
- </if>
- <if test="name != null and name != ''">
- name = #{name},
- </if>
- <if test="phone != null and phone != ''">
- phone = #{phone},
- </if>
- <if test="language != null and language != ''">
- language = #{language},
- </if>
- <if test="certificateType != null and certificateType != ''">
- certificate_type = #{certificateType},
- </if>
- <if test="headpir != null and headpir != ''">
- headpir = #{headpir},
- </if>
- <if test="flag != null and flag != ''">
- flag = #{flag},
- </if>
- <if test="certificate != null and certificate != ''">
- certificate = #{certificate},
- </if>
- <if test="pass != null and pass != ''">
- pass = #{pass},
- </if>
- </trim>
- </set>
- where phone=#{phone}
- </update>
- <!-- 验证手机号 -->
- <select id="checkTele" resultType="int">
- select count(*) as count from sys_supplier where phone=#{phone}
- </select>
- <!-- 根据手机号删除用户 -->
- <delete id="delUser">
- delete from sys_supplier where phone=#{phone}
- </delete>
- <!-- 新增供应商 -->
- <insert id="insetUser" parameterType="Supplier">
- INSERT INTO sys_supplier (code,nature_supplier,contact,phone,language,certificate_type,certificate,headpir,jdrq,flag,captcha,invoice,name,offer_num,balance_of)
- VALUES(#{code},#{natureSupplier},#{contact},#{phone},#{language},#{certificateType},#{certificate},#{headpir},GETDATE(),0,#{captcha},#{invoice},#{name},0,0)
- </insert>
- <!-- 修改验证码 -->
- <update id="updateCaptcha">
- update sys_supplier set captcha=#{captcha} where phone=#{phone}
- </update>
- <!-- 根据code修改手机号验证码 -->
- <update id="updateCaptchaCode">
- update sys_supplier set captcha=#{captcha} where code=#{code}
- </update>
- <!-- 校验验证码 -->
- <select id="checkCaptcha" resultType="int">
- select count(*) from sys_supplier where phone=#{phone} and captcha=#{captcha}
- </select>
- <!-- 手机号登录验证是否第一次登录 -->
- <select id="checkUser" resultType="Supplier">
- select id,code,nature_supplier as natureSupplier,contact,phone,language,certificate_type as certificateType,certificate,headpir,jdrq,flag,captcha,invoice,name
- from sys_supplier
- where phone=#{phone} and captcha=#{captcha}
- </select>
- </mapper>
|