12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?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.RegisterMapper">
- <insert id="insertClubUser" parameterType="com.caimei365.user.model.po.UserPo" keyProperty="userId" useGeneratedKeys="true">
- insert into user(`registerTime`, `registerIP`, `source`, `registerUserTypeID`, `name`, `userName`, `bindMobile`,`userIdentity`, `userPermission`, `clubStatus`, `password`, `agreeFlag`, `validFlag`, `serviceProviderID`, `serviceProviderStatus`)
- values(#{registerTime},#{registerIp},#{source},#{registerUserTypeId},#{name},#{userName},#{bindMobile},#{userIdentity},#{userPermission},#{clubStatus},#{password},#{agreeFlag},#{validFlag},#{serviceProviderId},#{serviceProviderStatus})
- </insert>
- <insert id="insertClub" parameterType="com.caimei365.user.model.po.ClubPo" keyProperty="clubId" useGeneratedKeys="true">
- insert into club(`name`, `sName`, `contractMobile`, `linkMan`, `userID`, `addTime`, `status`, `spID`)
- values(#{name},#{sName},#{contractMobile},#{linkMan},#{userId},#{addTime},#{status},#{serviceProviderId})
- </insert>
- <insert id="insertOperation" parameterType="com.caimei365.user.model.po.OperationPo" keyProperty="clubId" useGeneratedKeys="true">
- insert into cm_mall_operation_user(`userID`, `clubID`, `nickName`, `headimgurl`, `userType`, `mobile`, `linkName`, `status`, `unionId`, `openid`, `addTime`, `updateTime`, `bindTime`, `delFlag`)
- values(#{userId},#{clubId},#{nickName},#{avatarUrl},#{UserType},#{mobile},#{linkName},#{status},#{unionId},#{openid},#{addTime},#{updateTime},#{bindTime},#{delFlag})
- </insert>
- <insert id="insertShopUser" parameterType="com.caimei365.user.model.po.UserPo" keyProperty="userId" useGeneratedKeys="true">
- insert into user(`registerTime`, `registerIP`, `source`, `registerUserTypeID`, `name`, `userName`, `bindMobile`, `email`, `userIdentity`, `userPermission`, `manufacturerStatus` , `password`, `agreeFlag`, `validFlag`)
- values(#{registerTime},#{registerIp},#{source},#{registerUserTypeId},#{name},#{userName},#{bindMobile},#{email},#{userIdentity},#{userPermission},#{manufacturerStatus},#{password},#{agreeFlag},#{validFlag})
- </insert>
- <insert id="insertShop" parameterType="com.caimei365.user.model.po.ShopPo" keyProperty="shopId" useGeneratedKeys="true">
- insert into shop(`userID`, `name`, `sname`, `linkMan`, `contractMobile`, `contractEmail1`, `provinceID`, `cityID`, `townID`, `address`, `socialCreditCode`, `businessLicenseImage`, `firstShopType`, `secondShopType`, `mainpro`, `addTime`, `validFlag`, `status`)
- values(#{userId},#{name},#{sName},#{linkMan},#{contractMobile},#{contractEmail1},#{provinceId},#{cityId},#{townId},#{address},#{socialCreditCode},#{businessLicense},#{firstShopType},#{secondShopType},#{mainProduct},#{addTime},#{validFlag},#{status})
- </insert>
- <update id="updateUserClubId">
- update user set clubID = #{clubId} where userID = #{userId}
- </update>
- <update id="updateUserShopId">
- update user set shopID = #{shopId} where userID = #{userId}
- </update>
- <update id="updateClubUserByUpgrade">
- update user set registerIP = #{registerIp},
- email = #{contractEmail},
- name = #{name},
- clubStatus = #{clubStatus}
- where userID = #{userId}
- </update>
- <update id="updateClubByUpgrade">
- update club set userID = #{userId}, name = #{name}, sname = #{sName}, contractEmail1 = #{contractEmail},
- <if test="contractPhone != null">
- contractPhone = #{contractPhone},
- </if>
- <if test="linkMan != null">
- linkMan = #{linkMan},
- </if>
- provinceID = #{provinceId}, cityID = #{cityId}, townID = #{townId}, address = #{address},
- <if test="shopPhoto != null and shopPhoto != 'null' and shopPhoto != ''">
- headpic = #{shopPhoto},
- </if>
- businessLicenseImage = #{businessLicense}, socialCreditCode = #{socialCreditCode}, firstClubType = #{firstClubType},
- <if test="firstClubType == 1">
- secondClubType = #{secondClubType}, department = #{department}, medicalPracticeLicenseImg = #{medicalPracticeLicense},
- </if>
- <if test="mainProduct != null">
- mainpro = #{mainProduct},
- </if>
- <if test="fax != null">
- fax = #{fax},
- </if>
- <if test="profile != null">
- info = #{profile},
- </if>
- where clubID = #{clubId}
- </update>
- </mapper>
|