Commit 93ce38d7 by 徐高华

朋友圈

parent 5ce9637e
...@@ -70,4 +70,13 @@ public interface QwMomentApiService { ...@@ -70,4 +70,13 @@ public interface QwMomentApiService {
* @return * @return
*/ */
ServiceResponse<Void> finishTask(SendResultQDTO qdto); ServiceResponse<Void> finishTask(SendResultQDTO qdto);
/**
* 定时拉取企微数据
* @param params
* @return
*/
ServiceResponse<Void> qwDataTimer(String params) ;
} }
...@@ -35,4 +35,6 @@ public interface QwMomentPlanMapper { ...@@ -35,4 +35,6 @@ public interface QwMomentPlanMapper {
void updateMomentId(@Param("planId") Long planId, @Param("momentId") String jobId); void updateMomentId(@Param("planId") Long planId, @Param("momentId") String jobId);
void updateQwData(@Param("planId") Long planId, @Param("like") int like, @Param("comment") int comment); void updateQwData(@Param("planId") Long planId, @Param("like") int like, @Param("comment") int comment);
List<Long> listForData(@Param("type")int type);
} }
...@@ -50,4 +50,6 @@ public interface QwMomentPlanService { ...@@ -50,4 +50,6 @@ public interface QwMomentPlanService {
* @param planId * @param planId
*/ */
void getQwPublishData(Long planId , String cursor) ; void getQwPublishData(Long planId , String cursor) ;
void qwDataTimer(String params);
} }
...@@ -592,4 +592,28 @@ public class QwMomentPlanServiceImpl implements QwMomentPlanService { ...@@ -592,4 +592,28 @@ public class QwMomentPlanServiceImpl implements QwMomentPlanService {
this.getQwPublishData(planId,cursor); this.getQwPublishData(planId,cursor);
} }
} }
@Override
public void qwDataTimer(String params) {
// 是否完成
if(params.equals("1")) {
List<Long> planIdList = this.qwMomentPlanMapper.listForData(1) ;
if(CollectionUtils.isNotEmpty(planIdList)) {
for(Long planId : planIdList) {
this.getQwPublishData(planId,null) ;
}
}
}
// 评论数据
if(params.equals("2")) {
List<Long> planIdList = this.qwMomentPlanMapper.listForData(2) ;
if(CollectionUtils.isNotEmpty(planIdList)) {
for(Long planId : planIdList) {
this.getQwData(planId);
}
}
}
}
} }
...@@ -89,4 +89,10 @@ public class QwMomentApiServiceImpl implements QwMomentApiService { ...@@ -89,4 +89,10 @@ public class QwMomentApiServiceImpl implements QwMomentApiService {
public ServiceResponse<Void> finishTask(SendResultQDTO qdto) { public ServiceResponse<Void> finishTask(SendResultQDTO qdto) {
return this.qwMomentPlanAttendService.finishTask(qdto) ; return this.qwMomentPlanAttendService.finishTask(qdto) ;
} }
@Override
public ServiceResponse<Void> qwDataTimer(String params) {
this.qwMomentPlanService.qwDataTimer(params) ;
return null;
}
} }
...@@ -252,6 +252,15 @@ ...@@ -252,6 +252,15 @@
and delete_flag = 0 order by ${sortColumn} ${sortType} and delete_flag = 0 order by ${sortColumn} ${sortType}
</select> </select>
<select id="listForData" resultType="java.lang.Long">
<if test="type==1">
select plan_id from tab_haoban_qw_moment_plan where status_flag = 1 and begin_date <![CDATA[ < ]]> now() and end_date > now() and delete_flag = 0 and task_clerk_num > done_num
</if>
<if test="type==2">
select plan_id from tab_haoban_qw_moment_plan where status_flag = 1 and begin_date <![CDATA[ < ]]> now() and end_date > now() and delete_flag = 0 and done_num > 0
</if>
</select>
<update id="del" parameterType="java.lang.Long"> <update id="del" parameterType="java.lang.Long">
update tab_haoban_qw_moment_plan set delete_flag = 1 where plan_id = #{planId} update tab_haoban_qw_moment_plan set delete_flag = 1 where plan_id = #{planId}
</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