Commit f177352e by 徐高华

朋友圈

parent 8097e4fa
......@@ -51,4 +51,5 @@ public interface QwMomentPlanAttendMapper {
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);
}
......@@ -33,7 +33,7 @@ public interface QwMomentPlanService {
* 拉取企微点赞、评论
* @param task
*/
public void getQwData(TabQwMomentPlanAttend task) ;
void getQwData(TabQwMomentPlanAttend task) ;
void getMomentId(Long planId) ;
......
......@@ -6,6 +6,7 @@ import com.gic.commons.util.PageHelperUtils;
import com.gic.commons.util.UniqueIdUtils;
import com.gic.haoban.manage.api.dto.moment.QwMomentPlanDataDTO;
import com.gic.haoban.manage.api.qdto.moment.PlanDataListQDTO;
import com.gic.haoban.manage.service.dao.mapper.moment.QwMomentPlanAttendMapper;
import com.gic.haoban.manage.service.dao.mapper.moment.QwMomentPlanDataMapper;
import com.gic.haoban.manage.service.entity.moment.TabQwMomentPlanAttend;
import com.gic.haoban.manage.service.entity.moment.TabQwMomentPlanData;
......@@ -28,6 +29,8 @@ public class QwMomentPlanDataServiceImpl implements QwMomentPlanDataService {
private QwMomentPlanDataMapper qwMomentPlanDataMapper ;
@Autowired
private ExternalClerkRelatedService externalClerkRelatedService ;
@Autowired
private QwMomentPlanAttendMapper qwMomentPlanAttendMapper ;
@Override
public ServiceResponse<Page<QwMomentPlanDataDTO>> dataList(PlanDataListQDTO qdto) {
......@@ -54,6 +57,8 @@ public class QwMomentPlanDataServiceImpl implements QwMomentPlanDataService {
Set<String> set = new HashSet<>() ;
Map<String,TabQwMomentPlanData> map = new HashMap<>() ;
List<MomentComments> likeList = dto.getLikeList() ;
int likeCount = 0 ;
int momentCount = 0 ;
if(CollectionUtils.isNotEmpty(likeList)) {
for(MomentComments item : likeList) {
String externalUserid = item.getExternal_userid() ;
......@@ -115,6 +120,7 @@ public class QwMomentPlanDataServiceImpl implements QwMomentPlanDataService {
if(CollectionUtils.isNotEmpty(addList)) {
this.qwMomentPlanDataMapper.batchInsert(addList);
}
this.qwMomentPlanAttendMapper.updateQwData(task.getPlanId(),task.getClerkId(),likeCount,momentCount) ;
return ServiceResponse.success();
}
}
......@@ -388,6 +388,7 @@ public class QwMomentPlanServiceImpl implements QwMomentPlanService {
}
if(vo.getMaterialType()==3) {
vo.setLink(obj.getString("link"));
vo.setImgUrl(obj.getString("imgUrl"));
}
if(vo.getMaterialType()==2) {
vo.setImgUrl(obj.getString("imgUrl"));
......
......@@ -204,6 +204,10 @@
update tab_haoban_qw_moment_plan_attend set status_flag = 1 , staff_id=#{staffId} where plan_id = #{planId} and clerk_id = #{clerkId}
</update>
<update id="updateQwData">
update tab_haoban_qw_moment_plan_attend set like_count = #{likeCount} , comment_count=#{momentCount} where plan_id = #{planId} and clerk_id = #{clerkId}
</update>
<!-- ===================== 新增 ======================== -->
<insert id="batchInsert">
INSERT INTO tab_haoban_qw_moment_plan_attend(
......
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