Commit b3047d53 by 徐高华

朋友圈

parent 93ce38d7
...@@ -56,7 +56,7 @@ public interface QwMomentPlanAttendMapper { ...@@ -56,7 +56,7 @@ public interface QwMomentPlanAttendMapper {
void updateSuccessStaff(@Param("planId") Long planId, @Param("clerkId") String clerkId , @Param("staffId") String staffId) ; void updateSuccessStaff(@Param("planId") Long planId, @Param("clerkId") String clerkId , @Param("staffId") String staffId) ;
void updateQwData(@Param("planId") Long planId, @Param("clerkId") String clerkId, @Param("likeCount")int likeCount, @Param("momentCount")int momentCount); void updateQwData(@Param("planId") Long planId, @Param("clerkId") String clerkId, @Param("likeCount")int likeCount, @Param("commentCount")int commentCount);
CountBO getQwCount(@Param("planId")Long planId); CountBO getQwCount(@Param("planId")Long planId);
......
...@@ -62,7 +62,7 @@ public class QwMomentPlanDataServiceImpl implements QwMomentPlanDataService { ...@@ -62,7 +62,7 @@ public class QwMomentPlanDataServiceImpl implements QwMomentPlanDataService {
this.qwMomentPlanDataMapper.delAll(task.getPlanId(),task.getClerkId()) ; this.qwMomentPlanDataMapper.delAll(task.getPlanId(),task.getClerkId()) ;
List<MomentComments> likeList = dto.getLikeList() ; List<MomentComments> likeList = dto.getLikeList() ;
int likeCount = 0 ; int likeCount = 0 ;
int momentCount = 0 ; int commentCount = 0 ;
if(CollectionUtils.isNotEmpty(likeList)) { if(CollectionUtils.isNotEmpty(likeList)) {
for(MomentComments item : likeList) { for(MomentComments item : likeList) {
String externalUserid = item.getExternal_userid() ; String externalUserid = item.getExternal_userid() ;
...@@ -98,7 +98,7 @@ public class QwMomentPlanDataServiceImpl implements QwMomentPlanDataService { ...@@ -98,7 +98,7 @@ public class QwMomentPlanDataServiceImpl implements QwMomentPlanDataService {
data = new TabQwMomentPlanData() ; data = new TabQwMomentPlanData() ;
data.setMemberId(memberId); data.setMemberId(memberId);
data.setCommentFlag(1); data.setCommentFlag(1);
momentCount = momentCount + 1 ; commentCount = commentCount + 1 ;
data.setCommentTime(new Date(item.getCreate_time()*1000)); data.setCommentTime(new Date(item.getCreate_time()*1000));
map.put(externalUserid,data) ; map.put(externalUserid,data) ;
} }
...@@ -126,8 +126,8 @@ public class QwMomentPlanDataServiceImpl implements QwMomentPlanDataService { ...@@ -126,8 +126,8 @@ public class QwMomentPlanDataServiceImpl implements QwMomentPlanDataService {
if(CollectionUtils.isNotEmpty(addList)) { if(CollectionUtils.isNotEmpty(addList)) {
this.qwMomentPlanDataMapper.batchInsert(addList); this.qwMomentPlanDataMapper.batchInsert(addList);
} }
this.qwMomentPlanAttendMapper.updateQwData(task.getPlanId(),task.getClerkId(),likeCount,momentCount) ; this.qwMomentPlanAttendMapper.updateQwData(task.getPlanId(),task.getClerkId(),likeCount,commentCount) ;
if(likeCount > 0 || momentCount > 0 && task.getTaskStatus()==1) { if((likeCount > 0 || commentCount > 0) && task.getTaskStatus()==1) {
this.qwMomentPlanAttendService.finishTaskUpdateData(task.getAttendId(), task.getPlanId() , new Date()); this.qwMomentPlanAttendService.finishTaskUpdateData(task.getAttendId(), task.getPlanId() , new Date());
} }
return ServiceResponse.success(); return ServiceResponse.success();
......
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
</update> </update>
<update id="updateQwData"> <update id="updateQwData">
update tab_haoban_qw_moment_plan_attend set like_count = #{likeCount} , comment_count=#{momentCount}, qw_data_time = now() where plan_id = #{planId} and clerk_id = #{clerkId} update tab_haoban_qw_moment_plan_attend set like_count = #{likeCount} , comment_count=#{commentCount}, qw_data_time = now() where plan_id = #{planId} and clerk_id = #{clerkId}
</update> </update>
<!-- ===================== 新增 ======================== --> <!-- ===================== 新增 ======================== -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment