|
@@ -120,13 +120,32 @@
|
|
|
<if test="teamId!=null">
|
|
|
and csg.teamId = #{teamId}
|
|
|
</if>
|
|
|
- <if test="teamId==null and serviceProviderId!=null">
|
|
|
+ <if test="serviceProviderId!=null">
|
|
|
and cmc.serviceProviderId=#{serviceProviderId}
|
|
|
</if>
|
|
|
</where>
|
|
|
ORDER BY cmc.`addTime` DESC
|
|
|
</select>
|
|
|
|
|
|
+ <select id="repotRemark" resultType="com.caimei365.user.model.vo.ReportVo">
|
|
|
+ SELECT DISTINCT
|
|
|
+ cmc.id AS reportId ,cmc.productID AS productId,ccr.serviceProviderID AS serviceProviderId, c.name AS clubName,c.`newDeal` AS newDeal,cmc.reportName AS
|
|
|
+ reportName,cmc.`addTime` AS ADDTIME,p.`mainImage` AS mainImage,p.name AS productName,cmc.`reportText` AS
|
|
|
+ reportText,cmc.status AS STATUS,cmc.`auditText` AS auditText,ccr.questionMan AS questionMan
|
|
|
+ FROM cm_club_report cmc
|
|
|
+ LEFT JOIN club c ON c.clubId=cmc.clubId
|
|
|
+ LEFT JOIN cm_club_remarks ccr ON cmc.Id = ccr.reportId
|
|
|
+ LEFT JOIN serviceprovider s ON ccr.serviceProviderId = s.serviceProviderID
|
|
|
+ LEFT JOIN cm_serviceTeam_group csg ON ccr.serviceProviderId = csg.serviceId
|
|
|
+ LEFT JOIN cm_serviceTeam_role csr ON csr.id = csg.teamId
|
|
|
+ LEFT JOIN product p ON p.productID = cmc.productID
|
|
|
+ where
|
|
|
+ cmc.clubID is not null
|
|
|
+
|
|
|
+ ORDER BY cmc.`addTime` DESC
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
<select id="visitorReportRemarks" resultType="com.caimei365.user.model.vo.ReportVo">
|
|
|
SELECT DISTINCT
|
|
|
cmc.id AS reportId , cmc.productID as productId,cmc.serviceProviderID as serviceProviderId,cmc.questionManId AS questionManId, c.name AS clubName,c.`newDeal` AS
|
|
@@ -156,6 +175,23 @@
|
|
|
ORDER BY cmc.`addTime` DESC
|
|
|
</select>
|
|
|
|
|
|
+ <select id="visitoReportRemark" resultType="com.caimei365.user.model.vo.ReportVo">
|
|
|
+ SELECT DISTINCT
|
|
|
+ cmc.id AS reportId , cmc.productID as productId,cmc.serviceProviderID as serviceProviderId,cmc.questionManId AS questionManId, c.name AS clubName,c.`newDeal` AS
|
|
|
+ newDeal,cmc.reportName AS reportName,cmc.`addTime` AS ADDTIME,p.`mainImage` AS mainImage,p.name AS
|
|
|
+ productName,cmc.`reportText` as reportText,cmc.status AS status,cmc.`auditText` as auditText
|
|
|
+ FROM cm_club_report cmc
|
|
|
+ LEFT JOIN club c ON c.clubId=cmc.clubId
|
|
|
+ LEFT JOIN cm_visitor_remarks ccr ON cmc.Id = ccr.reportId
|
|
|
+ LEFT JOIN serviceprovider s ON ccr.serviceProviderId = s.serviceProviderID
|
|
|
+ LEFT JOIN cm_serviceTeam_group csg ON ccr.serviceProviderId = csg.serviceId
|
|
|
+ LEFT JOIN cm_serviceTeam_role csr ON csr.id = csg.teamId
|
|
|
+ LEFT JOIN product p ON p.productID = cmc.productID
|
|
|
+ where
|
|
|
+ cmc.clubID is null
|
|
|
+
|
|
|
+ ORDER BY cmc.`addTime` DESC
|
|
|
+ </select>
|
|
|
|
|
|
<select id="reportLeaderId" resultType="java.lang.Integer">
|
|
|
SELECT DISTINCT id
|