|
@@ -38,6 +38,7 @@
|
|
|
LEFT JOIN club c ON c.clubID = cmc.clubID
|
|
|
LEFT JOIN product p ON cmc.productID = p.productID
|
|
|
<where>
|
|
|
+ and cmc.clubID is not null
|
|
|
(cmc.`serviceProviderId`=#{serviceProviderId} and cmc.`clubID`=#{clubId} and cmc.clubID is not null)
|
|
|
<if test="keyWord != null and keyWord !=''">
|
|
|
AND (p.name LIKE concat('%',#{keyWord},'%')
|
|
@@ -66,10 +67,11 @@
|
|
|
cmc.`auditText` as auditText
|
|
|
FROM cm_club_report cmc
|
|
|
LEFT JOIN club c ON c.clubID = cmc.clubID
|
|
|
- LEFT JOIN cm_club_remarks ccr ON ccr.clubID = cmc.clubID
|
|
|
+ LEFT JOIN cm_club_remarks ccr ON cmc.Id = ccr.reportId
|
|
|
LEFT JOIN product p ON p.productID = cmc.productID
|
|
|
LEFT JOIN shop s ON s.shopID = p.shopID
|
|
|
WHERE cmc.id = #{reportId}
|
|
|
+ and cmc.clubID is not null
|
|
|
ORDER BY cmc.`addTime` DESC
|
|
|
</select>
|
|
|
|
|
@@ -88,10 +90,11 @@
|
|
|
s.name as shopName,
|
|
|
cmc.`auditText` as auditText
|
|
|
FROM cm_club_report cmc
|
|
|
- LEFT JOIN cm_visitor_remarks ccr ON ccr.questionManId = cmc.questionManId
|
|
|
+ LEFT JOIN cm_visitor_remarks ccr ON cmc.Id = ccr.reportId
|
|
|
LEFT JOIN product p ON p.productID = cmc.productID
|
|
|
LEFT JOIN shop s ON s.shopID = p.shopID
|
|
|
WHERE cmc.id = #{reportId}
|
|
|
+ and cmc.clubID is null
|
|
|
ORDER BY cmc.`addTime` DESC
|
|
|
</select>
|
|
|
|
|
@@ -99,12 +102,12 @@
|
|
|
|
|
|
<select id="reportRemarks" 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
|
|
|
+ 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.clubId = ccr.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
|
|
@@ -132,14 +135,14 @@
|
|
|
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.questionManId = ccr.questionManId
|
|
|
+ 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>
|
|
|
and cmc.clubID is null
|
|
|
- and reportID is not null
|
|
|
+# and reportID is not null
|
|
|
<if test="keyWord != null and keyWord != ''">
|
|
|
AND p.name LIKE concat('%',#{keyWord},'%')
|
|
|
or cmc.reportText LIKE CONCAT('%', #{keyWord}, '%')
|
|
@@ -197,6 +200,7 @@
|
|
|
LEFT JOIN cm_club_report cmc ON cmc.Id = ccr.reportID
|
|
|
<where>
|
|
|
and cmc.id=#{reportId}
|
|
|
+ and cmc.clubID is not null
|
|
|
<if test="teamId!=null">
|
|
|
and csg.teamId = #{teamId}
|
|
|
</if>
|
|
@@ -266,6 +270,7 @@
|
|
|
LEFT JOIN cm_club_report cmc ON cmc.Id = ccr.reportID
|
|
|
<where>
|
|
|
and cmc.id=#{reportId}
|
|
|
+ and cmc.clubID is null
|
|
|
and reportID is not null
|
|
|
<if test="teamId!=null">
|
|
|
and csg.teamId = #{teamId}
|
|
@@ -326,11 +331,12 @@
|
|
|
cmc.id as reportId,cmc.productID as productId,cmc.reportName as reportName,ccr.questionMan AS questionMan,c.`name` as clubName,cmc.`addTime`,p.`name` as
|
|
|
productName,p.`mainImage` as mainImage,cmc.`reportText`,cmc.status AS status,cmc.`auditText` as auditText
|
|
|
FROM cm_club_report cmc
|
|
|
- LEFT JOIN cm_visitor_remarks ccr ON ccr.questionManId = cmc.questionManId
|
|
|
+ LEFT JOIN cm_visitor_remarks ccr ON cmc.Id = ccr.reportID
|
|
|
LEFT JOIN serviceprovider s ON cmc.serviceProviderId = s.serviceProviderID
|
|
|
LEFT JOIN club c ON c.clubID = cmc.clubID
|
|
|
LEFT JOIN product p ON p.productID = cmc.productID
|
|
|
<where>
|
|
|
+ and cmc.clubID is null
|
|
|
and cmc.`questionManId`=#{questionManId} and cmc.clubID is null
|
|
|
<if test="keyWord != null and keyWord !=''">
|
|
|
AND (p.name LIKE concat('%',#{keyWord},'%')
|