|
@@ -718,4 +718,405 @@
|
|
|
<select id="selRegisterIP" resultType="com.caimei.modules.user.entity.CmBehaviorRecord">
|
|
|
SELECT u.registerIP,u.ipAddress AS region, u.registerTime FROM USER u LEFT JOIN club c ON u.userID = c.userID WHERE c.clubID = #{clubId}
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="selStatisticsList" resultType="com.caimei.modules.user.entity.ClubStatistics">
|
|
|
+ SELECT
|
|
|
+ u.userId,
|
|
|
+ c.clubID,
|
|
|
+ c.name,
|
|
|
+ c.linkMan,
|
|
|
+ c.contractMobile,
|
|
|
+ c.linkManIdentity,
|
|
|
+ c.address,
|
|
|
+ c.businessLicenseImage,
|
|
|
+ u.userIdentity,
|
|
|
+ c.sname,
|
|
|
+ c.contractEmail,
|
|
|
+ c.contractPhone,
|
|
|
+ c.fax,
|
|
|
+ c.headpic,
|
|
|
+ c.socialCreditCode,
|
|
|
+ c.info,
|
|
|
+ (CASE WHEN c.linkManIdentity=1 THEN '老板'
|
|
|
+ WHEN c.linkManIdentity=2 THEN '采购'
|
|
|
+ WHEN c.linkManIdentity=3 THEN '运营'
|
|
|
+ WHEN c.linkManIdentity=4 THEN '其他'
|
|
|
+ END) AS linkManStatus,
|
|
|
+ (CASE WHEN c.status = 1 THEN '待审核'
|
|
|
+ WHEN c.status=91 THEN '已下线'
|
|
|
+ WHEN c.status=90 THEN '已上线'
|
|
|
+ WHEN c.status=92 THEN '审核未通过'
|
|
|
+ WHEN c.status=93 THEN '已确认'
|
|
|
+ ELSE '已冻结' END) AS clubStatus,
|
|
|
+ (CASE WHEN u.userIdentity=2 THEN '资质机构'
|
|
|
+ ELSE '个人机构' END) AS clubRank,
|
|
|
+ (CASE WHEN c.firstClubType=1 THEN '医美'
|
|
|
+ WHEN c.firstClubType=2 THEN '生美'
|
|
|
+ WHEN c.firstClubType=3 THEN '项目公司'
|
|
|
+ WHEN c.firstClubType=4 THEN '个人'
|
|
|
+ ELSE '其他' END) AS firstClubType,
|
|
|
+ (CASE WHEN c.secondClubType=1 THEN '诊所'
|
|
|
+ WHEN c.secondClubType=2 THEN '门诊'
|
|
|
+ WHEN c.secondClubType=3 THEN '医院'
|
|
|
+ WHEN c.secondClubType=5 THEN '美容院'
|
|
|
+ WHEN c.secondClubType=6 THEN '养生馆'
|
|
|
+ WHEN c.secondClubType=7 THEN '其他'
|
|
|
+ END) AS classify,
|
|
|
+ c.addTime AS addTime,
|
|
|
+ IF(csu.delFlag = '0' AND NOW() <![CDATA[ < ]]> csu.endTime,1,0) AS svipUserFlag,
|
|
|
+ case sp.status when 91 then '采美默认协销经理(官方账号)' else sp.linkMan end AS spName,
|
|
|
+ IFNULL(orderMonth.payTotalMonth,0) AS payTotalMonth,
|
|
|
+ IFNULL(orderMonth.orderCountMonth,0) AS orderCountMonth,
|
|
|
+ IFNULL(orderYesr.payTotalYesr,0) AS payTotalYear,
|
|
|
+ IFNULL(orderYesr.orderCountYesr,0) AS orderCountYear,
|
|
|
+ IFNULL(orderTotal.payTotal,0) AS payTotal,
|
|
|
+ MAX(cor.orderTime) AS lastOrderTime
|
|
|
+ FROM club c
|
|
|
+ LEFT JOIN cm_order cor ON c.userID = cor.userID
|
|
|
+ LEFT JOIN USER u ON u.userId=c.userId
|
|
|
+ LEFT JOIN cm_svip_user csu ON csu.userId = u.userID
|
|
|
+ LEFT JOIN serviceprovider sp ON sp.serviceProviderID = c.spID
|
|
|
+ LEFT JOIN
|
|
|
+ (SELECT userId,SUM(co.payTotalFee) AS payTotalMonth,
|
|
|
+ COUNT(co.orderid) AS orderCountMonth
|
|
|
+ FROM cm_order co
|
|
|
+ <where>
|
|
|
+ co.status NOT IN (0,6,7)
|
|
|
+ <if test="monthStartTime != null and monthStartTime != '' and monthEndTime != null and monthEndTime != ''">
|
|
|
+ AND co.orderTime BETWEEN #{monthStartTime} AND #{monthEndTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ GROUP BY co.userid) AS orderMonth ON c.userId=orderMonth.userId
|
|
|
+
|
|
|
+ LEFT JOIN
|
|
|
+ (SELECT userId,SUM(co.payTotalFee) AS payTotalYesr,
|
|
|
+ COUNT(co.orderid) AS orderCountYesr
|
|
|
+ FROM cm_order co
|
|
|
+ <where>
|
|
|
+ co.status NOT IN (0,6,7)
|
|
|
+ <if test="yearStartTime != null and yearStartTime != '' and yearEndTime != null and yearEndTime != ''">
|
|
|
+ AND co.orderTime BETWEEN #{yearStartTime} AND #{yearEndTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ GROUP BY co.userid) AS orderYesr ON c.userId=orderYesr.userId
|
|
|
+
|
|
|
+ LEFT JOIN
|
|
|
+ (SELECT userId,SUM(co.payTotalFee) AS payTotal,
|
|
|
+ COUNT(co.orderid) AS 21OrderCount
|
|
|
+ FROM cm_order co
|
|
|
+ <where>
|
|
|
+ co.status NOT IN (0,6,7)
|
|
|
+ <if test="customStartTime != null and customStartTime != ''">
|
|
|
+ AND (co.orderTime > #{customStartTime} or co.orderTime = #{customStartTime})
|
|
|
+ </if>
|
|
|
+ <if test="customEndTime != null and customEndTime != ''">
|
|
|
+ AND co.orderTime <![CDATA[ <= ]]> #{customEndTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ GROUP BY co.userid) AS orderTotal ON c.userId=orderTotal.userId
|
|
|
+
|
|
|
+ <where>
|
|
|
+ <if test="registerStartTime != null and registerStartTime != ''">
|
|
|
+ AND (c.addTime > #{registerStartTime} or c.addTime = #{registerStartTime} )
|
|
|
+ </if>
|
|
|
+ <if test="registerEndTime != null and registerEndTime != ''">
|
|
|
+ AND c.addTime <![CDATA[ <= ]]> #{registerEndTime}
|
|
|
+ </if>
|
|
|
+ <if test="searchStartTime != null and searchStartTime != ''">
|
|
|
+ AND (cor.orderTime > #{searchStartTime} or cor.orderTime = #{searchStartTime} )
|
|
|
+ </if>
|
|
|
+ <if test=" searchEndTime != null and searchEndTime != ''">
|
|
|
+ AND cor.orderTime <![CDATA[ <= ]]> #{searchEndTime}
|
|
|
+ </if>
|
|
|
+ <if test="customerValue != null and customerValue != ''">
|
|
|
+ AND c.firstClubType = #{customerValue}
|
|
|
+ </if>
|
|
|
+ <if test="searchUserIdentity != null and searchUserIdentity != '' and searchUserIdentity != '8'.toString()">
|
|
|
+ AND u.userIdentity = #{searchUserIdentity}
|
|
|
+ </if>
|
|
|
+ <if test="searchUserIdentity != null and searchUserIdentity != '' and searchUserIdentity == '8'.toString()">
|
|
|
+ AND csu.delFlag = '0' and now() <![CDATA[ < ]]> csu.endTime
|
|
|
+ </if>
|
|
|
+ <if test="searchStatus != null and searchStatus != ''">
|
|
|
+ AND c.status = #{searchStatus}
|
|
|
+ </if>
|
|
|
+ <if test="linkManIdentity != null and linkManIdentity != ''">
|
|
|
+ AND c.linkManIdentity = #{linkManIdentity}
|
|
|
+ </if>
|
|
|
+ <if test="payTotalMonth != null and payTotalMonth != ''">
|
|
|
+ <if test="payTotalMonth==1">
|
|
|
+ AND orderMonth.payTotalMonth <![CDATA[ < ]]> 10000
|
|
|
+ </if>
|
|
|
+ <if test="payTotalMonth==2">
|
|
|
+ AND orderMonth.payTotalMonth BETWEEN 10000 AND 100000
|
|
|
+ </if>
|
|
|
+ <if test="payTotalMonth==3">
|
|
|
+ AND orderMonth.payTotalMonth BETWEEN 100000 AND 1000000
|
|
|
+ </if>
|
|
|
+ <if test="payTotalMonth==4">
|
|
|
+ AND orderMonth.payTotalMonth <![CDATA[ > ]]> 1000000
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="payTotalYear != null and payTotalYear != ''">
|
|
|
+ <if test="payTotalYear==1">
|
|
|
+ AND orderYesr.payTotalYesr <![CDATA[ < ]]> 10000
|
|
|
+ </if>
|
|
|
+ <if test="payTotalYear==2">
|
|
|
+ AND orderYesr.payTotalYesr BETWEEN 10000 AND 100000
|
|
|
+ </if>
|
|
|
+ <if test="payTotalYear==3">
|
|
|
+ AND orderYesr.payTotalYesr BETWEEN 100000 AND 1000000
|
|
|
+ </if>
|
|
|
+ <if test="payTotalYear==4">
|
|
|
+ AND orderYesr.payTotalYesr <![CDATA[ > ]]> 1000000
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="payTotal != null and payTotal != ''">
|
|
|
+ <if test="payTotal==1">
|
|
|
+ AND orderTotal.payTotal <![CDATA[ < ]]> 10000
|
|
|
+ </if>
|
|
|
+ <if test="payTotal==2">
|
|
|
+ AND orderTotal.payTotal BETWEEN 10000 AND 100000
|
|
|
+ </if>
|
|
|
+ <if test="payTotal==3">
|
|
|
+ AND orderTotal.payTotal BETWEEN 100000 AND 1000000
|
|
|
+ </if>
|
|
|
+ <if test="payTotal==4">
|
|
|
+ AND orderTotal.payTotal <![CDATA[ > ]]> 1000000
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ GROUP BY c.userID ORDER BY
|
|
|
+ <if test="payTotalMonthType == null and orderCountMonthType == null and payTotalYearType == null and orderCountYearType == null and payTotalType == null">
|
|
|
+ MAX(cor.orderTime) DESC
|
|
|
+ </if>
|
|
|
+ <if test="orderCountMonthType != null">
|
|
|
+ <if test="orderCountMonthType == 0">
|
|
|
+ orderMonth.orderCountMonth
|
|
|
+ </if>
|
|
|
+ <if test="orderCountMonthType == 1">
|
|
|
+ orderMonth.orderCountMonth DESC
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="orderCountYearType != null">
|
|
|
+ <if test="orderCountYearType == 0">
|
|
|
+ orderYesr.orderCountYesr
|
|
|
+ </if>
|
|
|
+ <if test="orderCountYearType == 1">
|
|
|
+ orderYesr.orderCountYesr DESC
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="payTotalMonthType != null">
|
|
|
+ <if test="payTotalMonthType == 0">
|
|
|
+ orderMonth.payTotalMonth
|
|
|
+ </if>
|
|
|
+ <if test="payTotalMonthType == 1">
|
|
|
+ orderMonth.payTotalMonth DESC
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="payTotalYearType != null">
|
|
|
+ <if test="payTotalYearType == 0">
|
|
|
+ orderYesr.payTotalYesr
|
|
|
+ </if>
|
|
|
+ <if test="payTotalYearType == 1">
|
|
|
+ orderYesr.payTotalYesr DESC
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="payTotalType != null">
|
|
|
+ <if test="payTotalType == 0">
|
|
|
+ orderTotal.payTotal
|
|
|
+ </if>
|
|
|
+ <if test="payTotalType == 1">
|
|
|
+ orderTotal.payTotal DESC
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selPageLable" resultType="com.caimei.modules.user.entity.CmBehaviorRecord">
|
|
|
+ SELECT c.userID, COUNT(pageType) AS number, cbr.pageLabel
|
|
|
+ FROM club c
|
|
|
+ LEFT JOIN cm_behavior_record cbr ON cbr.userID = c.userID
|
|
|
+ WHERE cbr.userID = c.userID AND cbr.pageType in (8,9)
|
|
|
+ GROUP BY c.userID, cbr.pageLabel
|
|
|
+ </select>
|
|
|
+ <select id="findExcelList" resultType="com.caimei.modules.user.entity.easyExcel">
|
|
|
+ SELECT
|
|
|
+ u.userId,
|
|
|
+ c.clubID,
|
|
|
+ c.name,
|
|
|
+ c.linkMan,
|
|
|
+ c.contractMobile,
|
|
|
+ c.linkManIdentity,
|
|
|
+ c.address,
|
|
|
+ c.businessLicenseImage,
|
|
|
+ u.userIdentity,
|
|
|
+ c.sname,
|
|
|
+ c.contractEmail,
|
|
|
+ c.contractPhone,
|
|
|
+ c.fax,
|
|
|
+ c.headpic,
|
|
|
+ c.socialCreditCode,
|
|
|
+ c.info,
|
|
|
+ (CASE WHEN c.linkManIdentity=1 THEN '老板'
|
|
|
+ WHEN c.linkManIdentity=2 THEN '采购'
|
|
|
+ WHEN c.linkManIdentity=3 THEN '运营'
|
|
|
+ WHEN c.linkManIdentity=4 THEN '其他'
|
|
|
+ END) AS linkManStatus,
|
|
|
+ (CASE WHEN c.status = 1 THEN '待审核'
|
|
|
+ WHEN c.status=91 THEN '已下线'
|
|
|
+ WHEN c.status=90 THEN '已上线'
|
|
|
+ WHEN c.status=92 THEN '审核未通过'
|
|
|
+ WHEN c.status=93 THEN '已确认'
|
|
|
+ ELSE '已冻结' END) AS clubStatus,
|
|
|
+ (CASE WHEN u.userIdentity=2 THEN '资质机构'
|
|
|
+ ELSE '个人机构' END) AS clubRank,
|
|
|
+ (CASE WHEN c.firstClubType=1 THEN '医美'
|
|
|
+ WHEN c.firstClubType=2 THEN '生美'
|
|
|
+ WHEN c.firstClubType=3 THEN '项目公司'
|
|
|
+ WHEN c.firstClubType=4 THEN '个人'
|
|
|
+ ELSE '其他' END) AS firstClubType,
|
|
|
+ (CASE WHEN c.secondClubType=1 THEN '诊所'
|
|
|
+ WHEN c.secondClubType=2 THEN '门诊'
|
|
|
+ WHEN c.secondClubType=3 THEN '医院'
|
|
|
+ WHEN c.secondClubType=5 THEN '美容院'
|
|
|
+ WHEN c.secondClubType=6 THEN '养生馆'
|
|
|
+ WHEN c.secondClubType=7 THEN '其他'
|
|
|
+ END) AS classify,
|
|
|
+ c.addTime AS addTime,
|
|
|
+ IF(csu.delFlag = '0' AND NOW() <![CDATA[ < ]]> csu.endTime,1,0) AS svipUserFlag,
|
|
|
+ case sp.status when 91 then '采美默认协销经理(官方账号)' else sp.linkMan end AS spName,
|
|
|
+ IFNULL(orderMonth.payTotalMonth,0) AS payTotalMonth,
|
|
|
+ IFNULL(orderMonth.orderCountMonth,0) AS orderCountMonth,
|
|
|
+ IFNULL(orderYesr.payTotalYesr,0) AS payTotalYear,
|
|
|
+ IFNULL(orderYesr.orderCountYesr,0) AS orderCountYear,
|
|
|
+ IFNULL(orderTotal.payTotal,0) AS payTotal,
|
|
|
+ pb.pageLabel,
|
|
|
+ MAX(cor.orderTime) AS lastOrderTime
|
|
|
+ FROM club c
|
|
|
+ LEFT JOIN cm_order cor ON c.userID = cor.userID
|
|
|
+ LEFT JOIN USER u ON u.userId=c.userId
|
|
|
+ LEFT JOIN cm_svip_user csu ON csu.userId = u.userID
|
|
|
+ LEFT JOIN serviceprovider sp ON sp.serviceProviderID = c.spID
|
|
|
+ LEFT JOIN
|
|
|
+ (SELECT userId,SUM(co.payTotalFee) AS payTotalMonth,
|
|
|
+ COUNT(co.orderid) AS orderCountMonth
|
|
|
+ FROM cm_order co
|
|
|
+ <where>
|
|
|
+ co.status NOT IN (0,6,7)
|
|
|
+ <if test="monthStartTime != null and monthStartTime != '' and monthEndTime != null and monthEndTime != ''">
|
|
|
+ AND co.orderTime BETWEEN #{monthStartTime} AND #{monthEndTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ GROUP BY co.userid) AS orderMonth ON c.userId=orderMonth.userId
|
|
|
+
|
|
|
+ LEFT JOIN
|
|
|
+ (SELECT userId,SUM(co.payTotalFee) AS payTotalYesr,
|
|
|
+ COUNT(co.orderid) AS orderCountYesr
|
|
|
+ FROM cm_order co
|
|
|
+ <where>
|
|
|
+ co.status NOT IN (0,6,7)
|
|
|
+ <if test="yearStartTime != null and yearStartTime != '' and yearEndTime != null and yearEndTime != ''">
|
|
|
+ AND co.orderTime BETWEEN #{yearStartTime} AND #{yearEndTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ GROUP BY co.userid) AS orderYesr ON c.userId=orderYesr.userId
|
|
|
+
|
|
|
+ LEFT JOIN
|
|
|
+ (SELECT userId,SUM(co.payTotalFee) AS payTotal,
|
|
|
+ COUNT(co.orderid) AS 21OrderCount
|
|
|
+ FROM cm_order co
|
|
|
+ <where>
|
|
|
+ co.status NOT IN (0,6,7)
|
|
|
+ <if test="customStartTime != null and customStartTime != ''">
|
|
|
+ AND (co.orderTime > #{customStartTime} or co.orderTime = #{customStartTime})
|
|
|
+ </if>
|
|
|
+ <if test="customEndTime != null and customEndTime != ''">
|
|
|
+ AND co.orderTime <![CDATA[ <= ]]> #{customEndTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ GROUP BY co.userid) AS orderTotal ON c.userId=orderTotal.userId
|
|
|
+
|
|
|
+ LEFT JOIN
|
|
|
+ (
|
|
|
+ SELECT c.userID, COUNT(cbr.pageLabel), cbr.pageLabel
|
|
|
+ FROM cm_behavior_record cbr
|
|
|
+ LEFT JOIN club c ON cbr.userID = c.userID
|
|
|
+ <where> cbr.userID = c.userID</where>
|
|
|
+ GROUP BY cbr.pageLabel) AS pb ON c.userID = pb.userID
|
|
|
+ <where>
|
|
|
+ <if test="registerStartTime != null and registerStartTime != ''">
|
|
|
+ AND (c.addTime > #{registerStartTime} or c.addTime = #{registerStartTime} )
|
|
|
+ </if>
|
|
|
+ <if test="registerEndTime != null and registerEndTime != ''">
|
|
|
+ AND c.addTime <![CDATA[ <= ]]> #{registerEndTime}
|
|
|
+ </if>
|
|
|
+ <if test="searchStartTime != null and searchStartTime != ''">
|
|
|
+ AND (cor.orderTime > #{searchStartTime} or cor.orderTime = #{searchStartTime} )
|
|
|
+ </if>
|
|
|
+ <if test=" searchEndTime != null and searchEndTime != ''">
|
|
|
+ AND cor.orderTime <![CDATA[ <= ]]> #{searchEndTime}
|
|
|
+ </if>
|
|
|
+ <if test="customerValue != null and customerValue != ''">
|
|
|
+ AND c.firstClubType = #{customerValue}
|
|
|
+ </if>
|
|
|
+ <if test="searchUserIdentity != null and searchUserIdentity != '' and searchUserIdentity != '8'.toString()">
|
|
|
+ AND u.userIdentity = #{searchUserIdentity}
|
|
|
+ </if>
|
|
|
+ <if test="searchUserIdentity != null and searchUserIdentity != '' and searchUserIdentity == '8'.toString()">
|
|
|
+ AND csu.delFlag = '0' and now() <![CDATA[ < ]]> csu.endTime
|
|
|
+ </if>
|
|
|
+ <if test="searchStatus != null and searchStatus != ''">
|
|
|
+ AND c.status = #{searchStatus}
|
|
|
+ </if>
|
|
|
+ <if test="linkManIdentity != null and linkManIdentity != ''">
|
|
|
+ AND c.linkManIdentity = #{linkManIdentity}
|
|
|
+ </if>
|
|
|
+ <if test="searchStatus != null and searchStatus != ''">
|
|
|
+ AND c.status = #{searchStatus}
|
|
|
+ </if>
|
|
|
+ <if test="payTotalMonth != null and payTotalMonth != ''">
|
|
|
+ <if test="payTotalMonth==1">
|
|
|
+ AND orderMonth.payTotalMonth <![CDATA[ < ]]> 10000
|
|
|
+ </if>
|
|
|
+ <if test="payTotalMonth==2">
|
|
|
+ AND orderMonth.payTotalMonth BETWEEN 10000 AND 100000
|
|
|
+ </if>
|
|
|
+ <if test="payTotalMonth==3">
|
|
|
+ AND orderMonth.payTotalMonth BETWEEN 100000 AND 1000000
|
|
|
+ </if>
|
|
|
+ <if test="payTotalMonth==4">
|
|
|
+ AND orderMonth.payTotalMonth <![CDATA[ > ]]> 1000000
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="payTotalYear != null and payTotalYear != ''">
|
|
|
+ <if test="payTotalYear==1">
|
|
|
+ AND orderYesr.payTotalYesr <![CDATA[ < ]]> 10000
|
|
|
+ </if>
|
|
|
+ <if test="payTotalYear==2">
|
|
|
+ AND orderYesr.payTotalYesr BETWEEN 10000 AND 100000
|
|
|
+ </if>
|
|
|
+ <if test="payTotalYear==3">
|
|
|
+ AND orderYesr.payTotalYesr BETWEEN 100000 AND 1000000
|
|
|
+ </if>
|
|
|
+ <if test="payTotalYear==4">
|
|
|
+ AND orderYesr.payTotalYesr <![CDATA[ > ]]> 1000000
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="payTotal != null and payTotal != ''">
|
|
|
+ <if test="payTotal==1">
|
|
|
+ AND orderTotal.payTotal <![CDATA[ < ]]> 10000
|
|
|
+ </if>
|
|
|
+ <if test="payTotal==2">
|
|
|
+ AND orderTotal.payTotal BETWEEN 10000 AND 100000
|
|
|
+ </if>
|
|
|
+ <if test="payTotal==3">
|
|
|
+ AND orderTotal.payTotal BETWEEN 100000 AND 1000000
|
|
|
+ </if>
|
|
|
+ <if test="payTotal==4">
|
|
|
+ AND orderTotal.payTotal <![CDATA[ > ]]> 1000000
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ GROUP BY c.userID ORDER BY MAX(cor.orderTime) DESC
|
|
|
+ </select>
|
|
|
</mapper>
|