|
@@ -28,6 +28,36 @@
|
|
|
unionId = #{unionId}
|
|
|
where userID = #{userId}
|
|
|
</update>
|
|
|
+ <update id="setSellerHome" parameterType="com.caimei365.user.model.po.ServiceProviderPo">
|
|
|
+ update serviceprovider
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="organizeID != null">organizeID = #{organizeID},</if>
|
|
|
+ <if test="openid != null and openid != ''">openid = #{openid},</if>
|
|
|
+ <if test="unionId != null and unionId != ''">unionId = #{unionId},</if>
|
|
|
+ <if test="name != null and name != ''">name = #{name},</if>
|
|
|
+ <if test="linkMan != null and linkMan != ''">linkMan = #{linkMan},</if>
|
|
|
+ <if test="contractPhone != null and contractPhone != ''">contractPhone = #{contractPhone},</if>
|
|
|
+ <if test="contractMobile != null and contractMobile != ''">contractMobile = #{contractMobile},</if>
|
|
|
+ <if test="contractEmail != null and contractEmail != ''">contractEmail = #{contractEmail},</if>
|
|
|
+ <if test="duty != null and duty != ''">duty = #{duty},</if>
|
|
|
+ <if test="auditStatus != null and auditStatus != ''">auditStatus = #{auditStatus},</if>
|
|
|
+ <if test="auditTime != null and auditTime != ''">auditTime = #{auditTime},</if>
|
|
|
+ <if test="auditNote != null and auditNote != ''">auditNote = #{auditNote},</if>
|
|
|
+ <if test="validFlag != null and validFlag != ''">validFlag = #{validFlag},</if>
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
+ <if test="addTime != null and addTime != ''">addTime = #{addTime},</if>
|
|
|
+ <if test="mainServiceProviderID != null">mainServiceProviderID = #{mainServiceProviderID},</if>
|
|
|
+ <if test="qrCode != null and qrCode != ''">qrCode = #{qrCode},</if>
|
|
|
+ </trim>
|
|
|
+ where userID = #{userID}
|
|
|
+ </update>
|
|
|
+ <update id="setSellerUserHome" >
|
|
|
+ update user
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="image != null and image != ''">image = #{image},</if>
|
|
|
+ </trim>
|
|
|
+ where userId = #{userId}
|
|
|
+ </update>
|
|
|
|
|
|
<select id="findClubTemporary" resultType="com.caimei365.user.model.vo.ClubTemporaryVo">
|
|
|
SELECT
|
|
@@ -141,12 +171,12 @@
|
|
|
<if test="4 == type">
|
|
|
c.spID = #{serviceProviderId}
|
|
|
AND sp.status = 90
|
|
|
- AND (u.loginTime >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH)
|
|
|
+ AND u.loginTime >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH)
|
|
|
</if>
|
|
|
<if test="5 == type">
|
|
|
c.spID = #{serviceProviderId}
|
|
|
AND sp.status = 90
|
|
|
- AND (u.loginTime<![CDATA[ < ]]> DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH)
|
|
|
+ AND u.loginTime <![CDATA[ < ]]> DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH)
|
|
|
</if>
|
|
|
<if test="6 == type">
|
|
|
c.spID = #{serviceProviderId}
|
|
@@ -202,24 +232,27 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="getSellerByUserId" resultType="com.caimei365.user.model.po.ServiceProviderPo">
|
|
|
- select serviceProviderID AS serviceProviderId,
|
|
|
- status,
|
|
|
- userID AS userId,
|
|
|
- openid,
|
|
|
- unionId,
|
|
|
- name,
|
|
|
- contractMobile,
|
|
|
- linkMan,
|
|
|
- duty,
|
|
|
- contractEmail,
|
|
|
- auditStatus,
|
|
|
- auditTime,
|
|
|
- auditNote,
|
|
|
- validFlag,
|
|
|
- addTime,
|
|
|
- mainServiceProviderID AS mainServiceProviderId
|
|
|
- from serviceprovider
|
|
|
- where userID = #{userId}
|
|
|
+ select s.serviceProviderID AS serviceProviderId,
|
|
|
+ s.status,
|
|
|
+ s.userID AS userId,
|
|
|
+ s.openid,
|
|
|
+ s.unionId,
|
|
|
+ s.name,
|
|
|
+ s.contractMobile,
|
|
|
+ s.linkMan,
|
|
|
+ s.duty,
|
|
|
+ s.contractEmail,
|
|
|
+ s.auditStatus,
|
|
|
+ s.auditTime,
|
|
|
+ s.auditNote,
|
|
|
+ s.validFlag,
|
|
|
+ s.addTime,
|
|
|
+ s.qrCode,
|
|
|
+ u.image,
|
|
|
+ s.mainServiceProviderID AS mainServiceProviderId
|
|
|
+ from serviceprovider s
|
|
|
+ LEFT JOIN USER u ON s.userId = u.userId
|
|
|
+ where s.userID = #{userId}
|
|
|
</select>
|
|
|
<select id="findManager" resultType="java.lang.Integer">
|
|
|
SELECT IF(csm.serviceProviderId IS NULL, 2, 1) AS manager
|