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.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`, `email`, `userIdentity`, `userPermission`, `clubStatus`, `password`, `agreeFlag`, `validFlag`, `serviceProviderID`, `serviceProviderStatus`)
- values(#{registerTime},#{registerIp},#{source},#{registerUserTypeId},#{name},#{userName},#{bindMobile},#{email},#{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`, `scanFlag`)
- values(#{name},#{shortName},#{contractMobile},#{linkMan},#{userId},#{addTime},#{status},#{serviceProviderId},#{scanFlag})
- </insert>
- <insert id="insertUpgradeClub" parameterType="com.caimei365.user.model.po.ClubPo" keyProperty="clubId" useGeneratedKeys="true">
- insert into club(`name`, `sname`, `contractMobile`, `linkMan`, `userID`, `addTime`, `status`, `spID`, `scanFlag`,`contractEmail1`,`linkMan`, `provinceID`, `cityID`,`townID`, `address`, `headpic`, `businessLicenseImage`,`socialCreditCode`,`firstClubType`,`secondClubType`,`department`,`medicalPracticeLicenseImg`,`mainpro`)
- values(#{name},#{shortName},#{contractMobile},#{linkMan},#{userId},#{addTime},#{status},#{serviceProviderId},#{scanFlag},#{contractEmail},#{linkMan},#{provinceId},#{cityId},#{townId},#{address},#{shopPhoto},#{businessLicense},#{socialCreditCode},#{firstClubType},#{secondClubType},#{department},#{medicalPracticeLicense},#{mainProduct})
- </insert>
- <insert id="insertOperation" parameterType="com.caimei365.user.model.po.OperationPo" keyProperty="id" useGeneratedKeys="true">
- insert into cm_mall_operation_user(`userID`, `clubID`, `userOrganizeID`, `nickName`, `headimgurl`, `userType`, `mobile`, `linkName`, `status`, `unionId`, `openid`, `addTime`, `updateTime`, `bindTime`, `delFlag`)
- values(#{userId},#{clubId},#{organizeId},#{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},#{shortName},#{linkMan},#{contractMobile},#{contractEmail},#{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 = #{email},
- name = #{name},
- clubStatus = #{clubStatus}
- where userID = #{userId}
- </update>
- <update id="updateShopUserByApply">
- update user set userName = #{userName}, name = #{name}, manufacturerStatus = #{manufacturerStatus}
- <if test="email != null">
- , email = #{email}
- </if>
- where userID = #{userId}
- </update>
- <update id="updateClubByUpgrade">
- update club set userID = #{userId}, name = #{name}, sname = #{shortName}, 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>
- status = #{status}
- where clubID = #{clubId}
- </update>
- <update id="updateShopInfoByApply">
- update shop set userID = #{userId}, name = #{name},
- <if test="shortName != null">
- sname = #{shortName},
- </if>
- <if test="email != null">
- contractEmail1 = #{email},
- </if>
- <if test="linkMan != null">
- linkMan = #{linkMan},
- </if>
- <if test="provinceId != null">
- provinceID = #{provinceId},
- </if>
- <if test="cityId != null">
- cityID = #{cityId},
- </if>
- <if test="townId != null">
- townID = #{townId},
- </if>
- <if test="address != null">
- address = #{address},
- </if>
- <if test="socialCreditCode != null">
- socialCreditCode = #{socialCreditCode},
- </if>
- <if test="businessLicense != null">
- businessLicenseImage = #{businessLicense},
- </if>
- <if test="firstShopType != null">
- firstShopType = #{firstShopType},
- </if>
- <if test="secondShopType != null">
- secondShopType = #{secondShopType},
- </if>
- <if test="mainProduct != null">
- mainpro = #{mainProduct},
- </if>
- status = #{status}
- where shopID = #{shopId}
- </update>
- </mapper>
|