|
@@ -1,284 +1,251 @@
|
|
|
<?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(`userOrganizeID`, `registerTime`, `registerIP`, `ipAddress`, `source`, `registerUserTypeID`,
|
|
|
- `name`, `userName`, `bindMobile`, `email`, `userIdentity`, `guideFlag`,
|
|
|
- `password`, `agreeFlag`, `validFlag`, `serviceProviderID`, `serviceProviderStatus`, userBeans)
|
|
|
- values (#{organizeId}, #{registerTime}, #{registerIp}, #{ipAddress}, #{source}, #{registerUserTypeId}, #{name},
|
|
|
- #{userName}, #{bindMobile}, #{email}, #{userIdentity}, #{guideFlag}, #{password},
|
|
|
- #{agreeFlag}, #{validFlag}, #{serviceProviderId}, #{serviceProviderStatus}, #{userBeans})
|
|
|
+ <insert id="insertClubUser" parameterType="com.caimei365.user.model.po.UserPo" keyProperty="userId" useGeneratedKeys="true">
|
|
|
+ insert into user(`userOrganizeID`,`registerTime`,`registerIP`, `ipAddress`, `source`, `registerUserTypeID`, `name`, `userName`, `bindMobile`, `email`, `userIdentity`, `userPermission`,`guideFlag`,`clubStatus`, `password`, `agreeFlag`, `validFlag`, `serviceProviderID`, `serviceProviderStatus`, userBeans)
|
|
|
+ values(#{organizeId},#{registerTime},#{registerIp},#{ipAddress},#{source},#{registerUserTypeId},#{name},#{userName},#{bindMobile},#{email},#{userIdentity},#{userPermission},#{guideFlag},#{clubStatus},#{password},#{agreeFlag},#{validFlag},#{serviceProviderId},#{serviceProviderStatus}, #{userBeans})
|
|
|
</insert>
|
|
|
<select id="selUser" resultType="com.caimei365.user.model.po.UserPo">
|
|
|
- select *
|
|
|
- from user
|
|
|
- where registerTime = #{registerTime}
|
|
|
+ select * from user where registerTime = #{registerTime}
|
|
|
</select>
|
|
|
<insert id="insertOrgan">
|
|
|
insert into cm_organ_value_system
|
|
|
- (userID, activeState, customerValue, stage, delType)
|
|
|
- values (#{userID}, "新增用户", "一般挽留客户", 0, 1)
|
|
|
+ (userID, activeState, customerValue, activeStatus, customerStatus, stage, delType)
|
|
|
+ values(#{userID}, '活跃用户', '低价值客户', 0, 3, 0, 1)
|
|
|
</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`, provinceID, cityID, townID, address, headpic, businessLicenseImage,
|
|
|
- medicalPracticeLicenseImg, socialCreditCode)
|
|
|
- values (#{name}, #{shortName}, #{contractMobile}, #{linkMan}, #{userId}, #{addTime}, #{status},
|
|
|
- #{serviceProviderId}, #{scanFlag}, #{provinceId}, #{cityId}, #{townId}, #{address}, #{shopPhoto},
|
|
|
- #{businessLicense}, #{medicalPracticeLicense}, #{socialCreditCode})
|
|
|
+ <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`, provinceID, cityID, townID, address, headpic, businessLicenseImage, medicalPracticeLicenseImg, socialCreditCode,newDeal)
|
|
|
+ values(#{name},#{shortName},#{contractMobile},#{linkMan},#{userId},#{addTime},#{status}, #{serviceProviderId}, #{scanFlag}, #{provinceId}, #{cityId}, #{townId}, #{address}, #{shopPhoto}, #{businessLicense},#{medicalPracticeLicense}, #{socialCreditCode},1)
|
|
|
</insert>
|
|
|
- <insert id="insertUpgradeClub" parameterType="com.caimei365.user.model.po.ClubPo" keyProperty="clubId"
|
|
|
- useGeneratedKeys="true">
|
|
|
- insert into club(`name`, `sname`, `contractMobile`, `userID`, `addTime`, `status`, `spID`, `scanFlag`,
|
|
|
- `contractEmail`, `linkMan`, `provinceID`, `cityID`, `townID`, `address`, `headpic`,
|
|
|
- `businessLicenseImage`, `socialCreditCode`, `firstClubType`, `secondClubType`, `department`,
|
|
|
- `medicalPracticeLicenseImg`, `mainpro`)
|
|
|
- values (#{name}, #{shortName}, #{contractMobile}, #{userId}, #{addTime}, #{status}, #{serviceProviderId},
|
|
|
- #{scanFlag}, #{contractEmail}, #{linkMan}, #{provinceId}, #{cityId}, #{townId}, #{address},
|
|
|
- #{shopPhoto}, #{businessLicense}, #{socialCreditCode}, #{firstClubType}, #{secondClubType},
|
|
|
- #{department}, #{medicalPracticeLicense}, #{mainProduct})
|
|
|
+ <insert id="insertUpgradeClub" parameterType="com.caimei365.user.model.po.ClubPo" keyProperty="clubId" useGeneratedKeys="true">
|
|
|
+ insert into club(`name`, `sname`, `contractMobile`, `userID`, `addTime`, `status`, `spID`, `scanFlag`,`contractEmail`,`linkMan`, `provinceID`, `cityID`,`townID`, `address`, `headpic`, `businessLicenseImage`,`socialCreditCode`,`firstClubType`,`secondClubType`,`department`,`medicalPracticeLicenseImg`,`mainpro`,newDeal)
|
|
|
+ values(#{name},#{shortName},#{contractMobile},#{userId},#{addTime},#{status},#{serviceProviderId},#{scanFlag},#{contractEmail},#{linkMan},#{provinceId},#{cityId},#{townId},#{address},#{shopPhoto},#{businessLicense},#{socialCreditCode},#{firstClubType},#{secondClubType},#{department},#{medicalPracticeLicense},#{mainProduct},1)
|
|
|
</insert>
|
|
|
- <insert id="insertOperation" parameterType="com.caimei365.user.model.po.OperationPo" keyProperty="id"
|
|
|
- useGeneratedKeys="true">
|
|
|
- insert into cm_mall_operation_user(`userID`, `clubID`, `shopID`, `userOrganizeID`, `linkName`, `nickName`,
|
|
|
- `headimgurl`, `userType`, `mobile`, `status`, `unionId`, `openid`,
|
|
|
- `pcOpenid`, `addTime`, `updateTime`, `bindTime`, `delFlag`)
|
|
|
- values (#{userId}, #{clubId}, #{shopId}, #{organizeId}, #{linkName}, #{nickName}, #{avatarUrl}, #{userType},
|
|
|
- #{mobile}, #{status}, #{unionId}, #{openId}, #{pcOpenId}, #{addTime}, #{updateTime}, #{bindTime},
|
|
|
- #{delFlag})
|
|
|
+ <insert id="insertOperation" parameterType="com.caimei365.user.model.po.OperationPo" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ insert into cm_mall_operation_user(`userID`, `clubID`, `shopID`, `userOrganizeID`,`linkName`,`nickName`,`headimgurl`,`userType`,`mobile`,`status`, `unionId`, `openid`,`pcOpenid`, `addTime`, `updateTime`, `bindTime`, `delFlag`)
|
|
|
+ values(#{userId},#{clubId},#{shopId},#{organizeId},#{linkName},#{nickName},#{avatarUrl},#{userType},#{mobile} ,#{status},#{unionId},#{openId},#{pcOpenId},#{addTime},#{updateTime},#{bindTime},#{delFlag})
|
|
|
</insert>
|
|
|
- <insert id="insertShopUser" parameterType="com.caimei365.user.model.po.UserPo" keyProperty="userId"
|
|
|
- useGeneratedKeys="true">
|
|
|
- insert into user(`userOrganizeID`, `registerTime`, `registerIP`, `ipAddress`, `source`, `registerUserTypeID`,
|
|
|
- `name`, `userName`, `bindMobile`, `email`, `userIdentity`,
|
|
|
- `manufacturerStatus`, `password`, `agreeFlag`, `validFlag`)
|
|
|
- values (#{organizeId}, #{registerTime}, #{registerIp}, #{ipAddress}, #{source}, #{registerUserTypeId}, #{name},
|
|
|
- #{userName}, #{bindMobile}, #{email}, #{userIdentity}, #{manufacturerStatus},
|
|
|
- #{password}, #{agreeFlag}, #{validFlag})
|
|
|
+ <insert id="insertShopUser" parameterType="com.caimei365.user.model.po.UserPo" keyProperty="userId" useGeneratedKeys="true">
|
|
|
+ insert into user(`userOrganizeID`,`registerTime`, `registerIP`, `ipAddress`, `source`, `registerUserTypeID`, `name`, `userName`, `bindMobile`, `email`, `userIdentity`, `userPermission`, `manufacturerStatus` , `password`, `agreeFlag`, `validFlag`)
|
|
|
+ values(#{organizeId},#{registerTime},#{registerIp},#{ipAddress},#{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`, `contractEmail`, `provinceID`,
|
|
|
- `cityID`, `townID`, `address`, `socialCreditCode`, `businessLicenseImage`, `firstShopType`,
|
|
|
- `secondShopType`, `mainpro`, `productDesc`, `info`, `website`, `wxOfficialAccount`,
|
|
|
- `wxApplets`, `addTime`, `validFlag`, `status`, medicalPracticeLicenseImg1)
|
|
|
- values (#{userId}, #{name}, #{shortName}, #{linkMan}, #{contractMobile}, #{contractEmail}, #{provinceId},
|
|
|
- #{cityId}, #{townId}, #{address}, #{socialCreditCode}, #{businessLicense}, #{firstShopType},
|
|
|
- #{secondShopType}, #{mainProduct}, #{mainProductDesc}, #{shopDesc}, #{website}, #{wxOfficialAccount},
|
|
|
- #{wxApplets}, #{addTime}, #{validFlag}, #{status}, #{medicalPracticeLicenseImg1})
|
|
|
+ <insert id="insertShop" parameterType="com.caimei365.user.model.po.ShopPo" keyProperty="shopId" useGeneratedKeys="true">
|
|
|
+ insert into shop(`userID`, `name`, `sname`, `linkMan`, `contractMobile`, `contractEmail`, `provinceID`, `cityID`, `townID`, `address`, `socialCreditCode`, `businessLicenseImage`, `firstShopType`, `secondShopType`, `mainpro`, `productDesc`, `info`, `website`, `wxOfficialAccount`, `wxApplets`, `addTime`, `validFlag`, `status`,medicalPracticeLicenseImg1)
|
|
|
+ values(#{userId},#{name},#{shortName},#{linkMan},#{contractMobile},#{contractEmail},#{provinceId},#{cityId},#{townId},#{address},#{socialCreditCode},#{businessLicense},#{firstShopType},#{secondShopType},#{mainProduct},#{mainProductDesc},#{shopDesc},#{website},#{wxOfficialAccount},#{wxApplets},#{addTime},#{validFlag},#{status},#{medicalPracticeLicenseImg1})
|
|
|
</insert>
|
|
|
<update id="updateUserClubId">
|
|
|
- update user
|
|
|
- set clubID = #{clubId}
|
|
|
- where userID = #{userId}
|
|
|
+ update user set clubID = #{clubId} where userID = #{userId}
|
|
|
</update>
|
|
|
<update id="updateUserShopId">
|
|
|
- update user
|
|
|
- set shopID = #{shopId}
|
|
|
- where userID = #{userId}
|
|
|
+ update user set shopID = #{shopId} where userID = #{userId}
|
|
|
</update>
|
|
|
<update id="updateClubUserByUpgrade">
|
|
|
- update user
|
|
|
- set registerIP = #{registerIp},
|
|
|
- email = #{email},
|
|
|
- name = #{name}
|
|
|
+ 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 and email != ''">
|
|
|
- , email = #{email}
|
|
|
- </if>
|
|
|
+ <if test="email != null and email != ''">
|
|
|
+ , email = #{email}
|
|
|
+ </if>
|
|
|
where userID = #{userId}
|
|
|
</update>
|
|
|
<update id="updateClubByUpgrade">
|
|
|
update club set userID = #{userId}, name = #{name}, sname = #{shortName}, contractEmail = #{contractEmail},
|
|
|
- <if test="contractPhone != null and contractPhone != ''">
|
|
|
- contractPhone = #{contractPhone},
|
|
|
- </if>
|
|
|
- <if test="linkMan != null and linkMan != ''">
|
|
|
- linkMan = #{linkMan},
|
|
|
- </if>
|
|
|
- <if test="linkManIdentity != null and linkManIdentity != ''">
|
|
|
- linkManIdentity = #{linkManIdentity},
|
|
|
- </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 and mainProduct != ''">
|
|
|
- mainpro = #{mainProduct},
|
|
|
- </if>
|
|
|
- <if test="fax != null and fax != ''">
|
|
|
- fax = #{fax},
|
|
|
- </if>
|
|
|
- <if test="profile != null and profile != ''">
|
|
|
- info = #{profile},
|
|
|
- </if>
|
|
|
- status = #{status}
|
|
|
+ <if test="contractPhone != null and contractPhone != ''">
|
|
|
+ contractPhone = #{contractPhone},
|
|
|
+ </if>
|
|
|
+ <if test="linkMan != null and linkMan != ''">
|
|
|
+ linkMan = #{linkMan},
|
|
|
+ </if>
|
|
|
+ <if test="linkManIdentity != null and linkManIdentity != ''">
|
|
|
+ linkManIdentity = #{linkManIdentity},
|
|
|
+ </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 and mainProduct != ''">
|
|
|
+ mainpro = #{mainProduct},
|
|
|
+ </if>
|
|
|
+ <if test="fax != null and fax != ''">
|
|
|
+ fax = #{fax},
|
|
|
+ </if>
|
|
|
+ <if test="profile != null and profile != ''">
|
|
|
+ info = #{profile},
|
|
|
+ </if>
|
|
|
+ status = #{status}
|
|
|
where clubID = #{clubId}
|
|
|
</update>
|
|
|
<update id="updateShopInfoByApply">
|
|
|
update shop set userID = #{userId}, name = #{name},
|
|
|
- <if test="shortName != null and shortName != ''">
|
|
|
- sname = #{shortName},
|
|
|
- </if>
|
|
|
- <if test="email != null and email != ''">
|
|
|
- contractEmail = #{email},
|
|
|
- </if>
|
|
|
- <if test="linkMan != null and linkMan != ''">
|
|
|
- linkMan = #{linkMan},
|
|
|
- </if>
|
|
|
- <if test="townId != null and townId != ''">
|
|
|
- provinceID = #{provinceId},cityID = #{cityId},townID = #{townId},address = #{address},
|
|
|
- </if>
|
|
|
- <if test="socialCreditCode != null and socialCreditCode != ''">
|
|
|
- socialCreditCode = #{socialCreditCode},
|
|
|
- </if>
|
|
|
- <if test="businessLicense != null and businessLicense != ''">
|
|
|
- businessLicenseImage = #{businessLicense},
|
|
|
- </if>
|
|
|
- <if test="firstShopType != null and firstShopType != ''">
|
|
|
- firstShopType = #{firstShopType},
|
|
|
- </if>
|
|
|
- <if test="secondShopType != null and secondShopType != ''">
|
|
|
- secondShopType = #{secondShopType},
|
|
|
- </if>
|
|
|
- <if test="mainProduct != null and mainProduct != ''">
|
|
|
- mainpro = #{mainProduct},
|
|
|
- </if>
|
|
|
- productDesc = #{mainProductDesc},
|
|
|
- info = #{shopDesc},
|
|
|
- website = #{website},
|
|
|
- wxOfficialAccount = #{wxOfficialAccount},
|
|
|
- wxApplets = #{wxApplets},
|
|
|
- status = #{status}
|
|
|
+ <if test="shortName != null and shortName != ''">
|
|
|
+ sname = #{shortName},
|
|
|
+ </if>
|
|
|
+ <if test="email != null and email != ''">
|
|
|
+ contractEmail = #{email},
|
|
|
+ </if>
|
|
|
+ <if test="linkMan != null and linkMan != ''">
|
|
|
+ linkMan = #{linkMan},
|
|
|
+ </if>
|
|
|
+ <if test="townId != null and townId != ''">
|
|
|
+ provinceID = #{provinceId},cityID = #{cityId},townID = #{townId},address = #{address},
|
|
|
+ </if>
|
|
|
+ <if test="socialCreditCode != null and socialCreditCode != ''">
|
|
|
+ socialCreditCode = #{socialCreditCode},
|
|
|
+ </if>
|
|
|
+ <if test="businessLicense != null and businessLicense != ''">
|
|
|
+ businessLicenseImage = #{businessLicense},
|
|
|
+ </if>
|
|
|
+ <if test="firstShopType != null and firstShopType != ''">
|
|
|
+ firstShopType = #{firstShopType},
|
|
|
+ </if>
|
|
|
+ <if test="secondShopType != null and secondShopType != ''">
|
|
|
+ secondShopType = #{secondShopType},
|
|
|
+ </if>
|
|
|
+ <if test="mainProduct != null and mainProduct != ''">
|
|
|
+ mainpro = #{mainProduct},
|
|
|
+ </if>
|
|
|
+ productDesc = #{mainProductDesc},
|
|
|
+ info = #{shopDesc},
|
|
|
+ website = #{website},
|
|
|
+ wxOfficialAccount = #{wxOfficialAccount},
|
|
|
+ wxApplets = #{wxApplets},
|
|
|
+ status = #{status}
|
|
|
where shopID = #{shopId}
|
|
|
</update>
|
|
|
|
|
|
<update id="updateGuideFlagByUserId">
|
|
|
- update user
|
|
|
- set guideFlag=1
|
|
|
- where userID = #{userId}
|
|
|
+ update user set guideFlag=1 where userID=#{userId}
|
|
|
</update>
|
|
|
|
|
|
- <insert id="insertClubTemporary" useGeneratedKeys="true" keyProperty="userId" keyColumn="id"
|
|
|
- parameterType="com.caimei365.user.model.dto.ClubOnlineDto">
|
|
|
- INSERT INTO `club_temporary` (`userId`, `name`, `shortName`, `bindMobile`,
|
|
|
- `contractEmail`, `linkMan`, `linkManIdentity`, `provinceId`,
|
|
|
- `cityId`, `townId`, `address`, `shopPhoto`,
|
|
|
- `businessLicense`, `socialCreditCode`,
|
|
|
- `firstClubType`, `secondClubType`,
|
|
|
- `department`, `medicalPracticeLicense`,
|
|
|
- `mainProduct`, `isAgreed`, addTime)
|
|
|
- VALUES (#{userId}, #{name}, #{shortName}, #{bindMobile},
|
|
|
- #{contractEmail}, #{linkMan}, #{linkManIdentity}, #{provinceId},
|
|
|
- #{cityId}, #{townId}, #{address}, #{shopPhoto},
|
|
|
- #{businessLicense}, #{socialCreditCode},
|
|
|
- #{firstClubType}, #{secondClubType},
|
|
|
- #{department}, #{medicalPracticeLicense},
|
|
|
- #{mainProduct}, #{isAgreed}, now())
|
|
|
+ <insert id="insertClubTemporary" useGeneratedKeys="true" keyProperty="userId" keyColumn="id" parameterType="com.caimei365.user.model.dto.ClubOnlineDto">
|
|
|
+ INSERT INTO `club_temporary` (
|
|
|
+ `userId`, `name`, `shortName`, `bindMobile`,
|
|
|
+ `contractEmail`, `linkMan`, `linkManIdentity`, `provinceId`,
|
|
|
+ `cityId`, `townId`, `address`, `shopPhoto`,
|
|
|
+ `businessLicense`, `socialCreditCode`,
|
|
|
+ `firstClubType`, `secondClubType`,
|
|
|
+ `department`, `medicalPracticeLicense`,
|
|
|
+ `mainProduct`, `isAgreed`,addTime
|
|
|
+ )
|
|
|
+ VALUES
|
|
|
+ (
|
|
|
+ #{userId}, #{name}, #{shortName}, #{bindMobile},
|
|
|
+ #{contractEmail}, #{linkMan}, #{linkManIdentity}, #{provinceId},
|
|
|
+ #{cityId}, #{townId}, #{address}, #{shopPhoto},
|
|
|
+ #{businessLicense}, #{socialCreditCode},
|
|
|
+ #{firstClubType}, #{secondClubType},
|
|
|
+ #{department}, #{medicalPracticeLicense},
|
|
|
+ #{mainProduct}, #{isAgreed},now()
|
|
|
+ )
|
|
|
</insert>
|
|
|
|
|
|
<select id="getTemporary" resultType="com.caimei365.user.model.vo.ClubTemporaryVo">
|
|
|
- SELECT `userId`,
|
|
|
- confirmUserId,
|
|
|
- `name`,
|
|
|
- `shortName`,
|
|
|
- `bindMobile`,
|
|
|
- `contractEmail`,
|
|
|
- `linkMan`,
|
|
|
- `provinceId`,
|
|
|
- `cityId`,
|
|
|
- `townId`,
|
|
|
- `address`,
|
|
|
- `shopPhoto`,
|
|
|
- `businessLicense`,
|
|
|
- `socialCreditCode`,
|
|
|
- `firstClubType`,
|
|
|
- `secondClubType`,
|
|
|
- `department`,
|
|
|
- `medicalPracticeLicense`,
|
|
|
- `mainProduct`,
|
|
|
- `isAgreed`
|
|
|
- FROM `club_temporary`
|
|
|
- WHERE id = #{id}
|
|
|
+ SELECT
|
|
|
+ `userId`,
|
|
|
+ confirmUserId,
|
|
|
+ `name`,
|
|
|
+ `shortName`,
|
|
|
+ `bindMobile`,
|
|
|
+ `contractEmail`,
|
|
|
+ `linkMan`,
|
|
|
+ `provinceId`,
|
|
|
+ `cityId`,
|
|
|
+ `townId`,
|
|
|
+ `address`,
|
|
|
+ `shopPhoto`,
|
|
|
+ `businessLicense`,
|
|
|
+ `socialCreditCode`,
|
|
|
+ `firstClubType`,
|
|
|
+ `secondClubType`,
|
|
|
+ `department`,
|
|
|
+ `medicalPracticeLicense`,
|
|
|
+ `mainProduct`,
|
|
|
+ `isAgreed`
|
|
|
+ FROM
|
|
|
+ `club_temporary`
|
|
|
+ WHERE
|
|
|
+ id = #{id}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertBeansHistory">
|
|
|
- INSERT INTO `user_beans_history` (`userId`, `type`, `beansType`, `orderId`, `archiveId`,
|
|
|
- `num`, `pushStatus`, `addTime`, delFlag)
|
|
|
- VALUES (#{userId}, #{type}, #{beansType}, #{orderId}, #{archiveId},
|
|
|
- #{num}, #{pushStatus}, #{addTime}, 0)
|
|
|
+ INSERT INTO `user_beans_history` (
|
|
|
+ `userId`, `type`, `beansType`, `orderId`, `archiveId`,
|
|
|
+ `num`, `pushStatus`, `addTime`, delFlag
|
|
|
+ )
|
|
|
+ VALUES
|
|
|
+ (
|
|
|
+ #{userId}, #{type}, #{beansType}, #{orderId}, #{archiveId},
|
|
|
+ #{num}, #{pushStatus}, #{addTime}, 0
|
|
|
+ )
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateClubUser">
|
|
|
UPDATE
|
|
|
- user
|
|
|
- SET bindMobile = #{bindMobile},
|
|
|
- userIdentity = #{userIdentity},
|
|
|
- email = #{email},
|
|
|
- userName = #{userName},
|
|
|
- source = #{source},
|
|
|
- password = #{password},
|
|
|
- registerUserTypeID = #{registerUserTypeId},
|
|
|
- name = #{name},
|
|
|
- registerTime = #{registerTime},
|
|
|
- registerIP = #{registerIp},
|
|
|
- ipAddress = #{ipAddress},
|
|
|
- serviceProviderStatus = #{serviceProviderStatus},
|
|
|
- serviceProviderID = #{serviceProviderId},
|
|
|
- guideFlag = #{guideFlag}
|
|
|
- WHERE userID = #{userId}
|
|
|
+ user
|
|
|
+ SET
|
|
|
+ bindMobile = #{bindMobile},
|
|
|
+ userPermission = #{userPermission},
|
|
|
+ userIdentity = #{userIdentity},
|
|
|
+ email = #{email},
|
|
|
+ userName = #{userName},
|
|
|
+ source = #{source},
|
|
|
+ password = #{password},
|
|
|
+ registerUserTypeID = #{registerUserTypeId},
|
|
|
+ name = #{name},
|
|
|
+ registerTime = #{registerTime},
|
|
|
+ registerIP = #{registerIp},
|
|
|
+ ipAddress = #{ipAddress},
|
|
|
+ clubStatus = #{clubStatus},
|
|
|
+ serviceProviderStatus = #{serviceProviderStatus},
|
|
|
+ serviceProviderID = #{serviceProviderId},
|
|
|
+ guideFlag = #{guideFlag}
|
|
|
+ WHERE
|
|
|
+ userID = #{userId}
|
|
|
</update>
|
|
|
|
|
|
<update id="updateClub">
|
|
|
UPDATE
|
|
|
- club
|
|
|
- SET name = #{name},
|
|
|
- sname = #{shortName},
|
|
|
- provinceID = #{provinceId},
|
|
|
- cityID = #{cityId},
|
|
|
- townID = #{townId},
|
|
|
- spID = #{serviceProviderId},
|
|
|
- address = #{address},
|
|
|
- linkMan = #{linkMan},
|
|
|
- contractPhone = #{contractPhone},
|
|
|
- contractMobile = #{contractMobile},
|
|
|
- fax = #{fax},
|
|
|
- contractEmail = #{contractEmail},
|
|
|
- info = #{profile},
|
|
|
- addTime = #{addTime},
|
|
|
- status = #{status},
|
|
|
- businessLicenseImage = #{businessLicense},
|
|
|
- defaultServiceProviderID = #{serviceProviderId},
|
|
|
- mainpro = #{mainProduct},
|
|
|
- headpic = #{shopPhoto},
|
|
|
- lastModify = NOW(),
|
|
|
- socialCreditCode = #{socialCreditCode},
|
|
|
- department = #{department},
|
|
|
- medicalPracticeLicenseImg = #{medicalPracticeLicense}
|
|
|
- WHERE userID = #{userId}
|
|
|
+ club
|
|
|
+ SET
|
|
|
+ name = #{name},
|
|
|
+ sname = #{shortName},
|
|
|
+ provinceID = #{provinceId},
|
|
|
+ cityID = #{cityId},
|
|
|
+ townID = #{townId},
|
|
|
+ spID = #{serviceProviderId},
|
|
|
+ address = #{address},
|
|
|
+ linkMan = #{linkMan},
|
|
|
+ contractPhone = #{contractPhone},
|
|
|
+ contractMobile = #{contractMobile},
|
|
|
+ fax = #{fax},
|
|
|
+ contractEmail = #{contractEmail},
|
|
|
+ info = #{profile},
|
|
|
+ addTime = #{addTime},
|
|
|
+ status = #{status},
|
|
|
+ businessLicenseImage = #{businessLicense},
|
|
|
+ defaultServiceProviderID = #{serviceProviderId},
|
|
|
+ mainpro = #{mainProduct},
|
|
|
+ headpic = #{shopPhoto},
|
|
|
+ lastModify = NOW(),
|
|
|
+ socialCreditCode = #{socialCreditCode},
|
|
|
+ department = #{department},
|
|
|
+ medicalPracticeLicenseImg = #{medicalPracticeLicense}
|
|
|
+ WHERE
|
|
|
+ userID = #{userId}
|
|
|
</update>
|
|
|
<select id="selProvince" resultType="java.lang.Integer">
|
|
|
- SELECT provinceID as provinceId
|
|
|
- FROM province
|
|
|
- WHERE NAME LIKE concat('%', #{regionPro}, '%')
|
|
|
- limit 1
|
|
|
+ SELECT provinceID as provinceId FROM province WHERE NAME LIKE concat('%', #{regionPro} ,'%') limit 1
|
|
|
</select>
|
|
|
<select id="selCity" resultType="java.lang.Integer">
|
|
|
- SELECT cityID as cityId
|
|
|
- FROM city
|
|
|
- WHERE NAME LIKE concat('%', #{regionCity}, '%')
|
|
|
- AND validFlag = 1
|
|
|
- limit 1
|
|
|
+ SELECT cityID as cityId FROM city WHERE NAME LIKE concat('%', #{regionCity} ,'%') AND validFlag = 1 limit 1
|
|
|
</select>
|
|
|
</mapper>
|