|
@@ -3,8 +3,8 @@
|
|
|
<mapper namespace="com.caimei365.user.mapper.ClubMapper">
|
|
|
<insert id="insertRemarks" parameterType="com.caimei365.user.model.po.ClubRemarksPo" keyProperty="remarksId"
|
|
|
useGeneratedKeys="true">
|
|
|
- insert into cm_club_remarks(clubId, serviceProviderId, remarks, addTime, questionMan,consultType,clubType,pinceSensitve,satisfied,followup,extra)
|
|
|
- values (#{clubId}, #{serviceProviderId}, #{remarks}, now(), #{questionMan},#{consult}, #{clubType}, #{pinceSensitve}, #{satisfied}, #{followup}, #{extra})
|
|
|
+ insert into cm_club_remarks(clubId, serviceProviderId, remarks, addTime, questionMan,consultType,clubType,pinceSensitve,satisfied,followup,extra,productID,reportID)
|
|
|
+ values (#{clubId}, #{serviceProviderId}, #{remarks}, now(), #{questionMan},#{consult}, #{clubType}, #{pinceSensitve}, #{satisfied}, #{followup}, #{extra},#{productID},#{reportID})
|
|
|
</insert>
|
|
|
<insert id="insertRemarksImage">
|
|
|
insert into cm_club_remarks_file(remarksId, fileType, imageUrl)
|
|
@@ -205,7 +205,9 @@
|
|
|
pinceSensitve=#{pinceSensitve},
|
|
|
satisfied=#{satisfied},
|
|
|
followup=#{followup},
|
|
|
- extra=#{extra}
|
|
|
+ extra=#{extra},
|
|
|
+ productID=#{productID},
|
|
|
+ reportID=#{reportID}
|
|
|
where id = #{remarksId}
|
|
|
</update>
|
|
|
<update id="updateQuestionMan">
|
|
@@ -293,10 +295,15 @@
|
|
|
order by addTime desc
|
|
|
</select>
|
|
|
<select id="getRemarks" resultType="com.caimei365.user.model.vo.RemarksVo">
|
|
|
- select ccr.id as remarksId, ccr.remarks, ccr.questionMan, ccr.addTime, ccr.clubId, c.userID,IFNULL(ccr.consultType,'')as consult,ccr.clubType,ccr.pinceSensitve,ccr.satisfied,ccr.followup,ccr.extra
|
|
|
- from cm_club_remarks ccr
|
|
|
- left join club c on ccr.clubId = c.clubId
|
|
|
- where id = #{remarksId}
|
|
|
+ SELECT ccr.id AS remarksId, ccr.remarks, ccr.questionMan, ccr.addTime, ccr.clubId, c.userID,IFNULL(ccr.consultType,'')AS consult,
|
|
|
+ ccr.clubType,ccr.pinceSensitve,ccr.satisfied,ccr.followup,ccr.extra,p.`mainImage` AS mainImage,p.name AS productName,s.name AS shopName,
|
|
|
+ cmc.`reportText` as reportText,cmc.`status` as status,cmc.`auditText` as auditText
|
|
|
+ FROM cm_club_remarks ccr
|
|
|
+ LEFT JOIN club c ON ccr.clubId = c.clubId
|
|
|
+ LEFT JOIN product p ON p.productID = ccr.productID
|
|
|
+ LEFT JOIN cm_club_report cmc ON cmc.ID = ccr.reportID
|
|
|
+ LEFT JOIN shop s ON s.shopID = p.shopID
|
|
|
+ where ccr.id = #{remarksId}
|
|
|
</select>
|
|
|
<select id="getRemarksImageList" resultType="java.lang.String">
|
|
|
select imageUrl
|
|
@@ -446,13 +453,14 @@
|
|
|
csr.leaderId AS leaderId,IFNULL(ccr.consultType,'') as consult, c.Name as clubName,
|
|
|
ccr.clubType AS clubType,ccr.pinceSensitve AS pinceSensitve,ccr.satisfied AS satisfied,ccr.followup AS followup,ccr.extra AS extra,
|
|
|
(SELECT NAME FROM serviceprovider s WHERE s.serviceProviderID= csr.leaderId) AS leaderName,
|
|
|
- (SELECT linkMan FROM serviceprovider s WHERE s.serviceProviderID = ccr.serviceProviderID) AS recordName
|
|
|
+ (SELECT linkMan FROM serviceprovider s WHERE s.serviceProviderID = ccr.serviceProviderID) AS recordName,c.newDeal as newDeal,cmc.status as status
|
|
|
# (SELECT linkMan FROM serviceprovider s WHERE s.serviceProviderID = ccr.oldserviceProviderId) AS oldName
|
|
|
FROM cm_club_remarks ccr
|
|
|
LEFT JOIN serviceprovider s ON ccr.serviceProviderId = s.serviceProviderID
|
|
|
LEFT JOIN club c ON c.clubId=ccr.clubId
|
|
|
LEFT JOIN cm_serviceTeam_group csg ON ccr.serviceProviderId = csg.serviceId
|
|
|
LEFT JOIN cm_serviceTeam_role csr ON csr.id = csg.teamId
|
|
|
+ LEFT JOIN cm_club_report cmc ON cmc.ID = ccr.reportID
|
|
|
where ccr.serviceProviderId=#{serviceProviderId}
|
|
|
|
|
|
<if test="keyWord != null and keyWord != ''">
|
|
@@ -585,13 +593,14 @@
|
|
|
csr.leaderId AS leaderId,IFNULL(ccr.consultType,'') as consult, c.Name as clubName,
|
|
|
ccr.clubType AS clubType,ccr.pinceSensitve AS pinceSensitve,ccr.satisfied AS satisfied,ccr.followup AS followup,ccr.extra AS extra,
|
|
|
(SELECT NAME FROM serviceprovider s WHERE s.serviceProviderID= csr.leaderId) AS leaderName,
|
|
|
- (SELECT linkMan FROM serviceprovider s WHERE s.serviceProviderID = ccr.serviceProviderID) AS recordName
|
|
|
+ (SELECT linkMan FROM serviceprovider s WHERE s.serviceProviderID = ccr.serviceProviderID) AS recordName,c.newDeal as newDeal,cmc.status as status
|
|
|
# (SELECT linkMan FROM serviceprovider s WHERE s.serviceProviderID = ccr.oldserviceProviderId) AS oldName
|
|
|
FROM cm_club_remarks ccr
|
|
|
LEFT JOIN serviceprovider s ON ccr.serviceProviderId = s.serviceProviderID
|
|
|
LEFT JOIN club c ON c.clubId=ccr.clubId
|
|
|
LEFT JOIN cm_serviceTeam_group csg ON ccr.serviceProviderId = csg.serviceId
|
|
|
LEFT JOIN cm_serviceTeam_role csr ON csr.id = csg.teamId
|
|
|
+ LEFT JOIN cm_club_report cmc ON cmc.ID = ccr.reportID
|
|
|
<where>
|
|
|
<if test="keyWord != null and keyWord !=''">
|
|
|
AND (ccr.remarks LIKE concat('%',#{keyWord},'%')
|
|
@@ -621,6 +630,9 @@
|
|
|
<if test="followup != '' and followup !=null">
|
|
|
and ccr.followup LIKE concat('%',#{followup},'%')
|
|
|
</if>
|
|
|
+ <if test="newDeal !=null">
|
|
|
+ and c.newDeal =#{newDeal}
|
|
|
+ </if>
|
|
|
|
|
|
<if test="con != null and con.size > 0">
|
|
|
and
|