Commit 43d5bf44 by 徐高华

朋友圈

parent 0bd2b903
...@@ -8,6 +8,7 @@ import com.gic.haoban.manage.api.qdto.moment.TaskNumQDTO; ...@@ -8,6 +8,7 @@ import com.gic.haoban.manage.api.qdto.moment.TaskNumQDTO;
import com.gic.haoban.manage.service.entity.moment.TabQwMomentPlan; import com.gic.haoban.manage.service.entity.moment.TabQwMomentPlan;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List; import java.util.List;
public interface QwMomentPlanMapper { public interface QwMomentPlanMapper {
...@@ -37,4 +38,6 @@ public interface QwMomentPlanMapper { ...@@ -37,4 +38,6 @@ public interface QwMomentPlanMapper {
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); List<Long> listForData(@Param("type")int type);
List<TabQwMomentPlan> listForStop(@Param("time")Date time);
} }
...@@ -21,7 +21,6 @@ import com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO; ...@@ -21,7 +21,6 @@ import com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO;
import com.gic.haoban.manage.api.dto.moment.QwMomentPlanAttendDTO; import com.gic.haoban.manage.api.dto.moment.QwMomentPlanAttendDTO;
import com.gic.haoban.manage.api.dto.moment.QwMomentPlanDTO; import com.gic.haoban.manage.api.dto.moment.QwMomentPlanDTO;
import com.gic.haoban.manage.api.dto.moment.QwMomentPlanWxaDTO; import com.gic.haoban.manage.api.dto.moment.QwMomentPlanWxaDTO;
import com.gic.haoban.manage.api.dto.notify.qdto.PendingTaskQDTO;
import com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum; import com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum;
import com.gic.haoban.manage.api.enums.PendingTaskTypeEnum; import com.gic.haoban.manage.api.enums.PendingTaskTypeEnum;
import com.gic.haoban.manage.api.qdto.moment.PlanListWxaQDTO; import com.gic.haoban.manage.api.qdto.moment.PlanListWxaQDTO;
...@@ -622,5 +621,22 @@ public class QwMomentPlanServiceImpl implements QwMomentPlanService { ...@@ -622,5 +621,22 @@ public class QwMomentPlanServiceImpl implements QwMomentPlanService {
} }
} }
} }
// 到期停止
if(params.equals("3")) {
Date end = DateUtil.getEndTimeOfDay(new Date()) ;
List<TabQwMomentPlan> planList = this.qwMomentPlanMapper.listForStop(end) ;
if(CollectionUtils.isNotEmpty(planList)) {
for(TabQwMomentPlan plan : planList) {
String wxEnterpriseId = plan.getWxEnterpriseId() ;
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ;
logger.info("取消发送={},{}",plan.getPlanId(),plan.getMomentId());
if(StringUtils.isNotBlank(plan.getMomentId())) {
this.qywxExternalUserService.cancelMomentTask(qwDTO.getThirdCorpid(),
qwDTO.getSelf3thSecret(), plan.getMomentId(), qwDTO.isSelf(), qwDTO.getUrlHost());
}
}
}
}
} }
} }
...@@ -261,6 +261,10 @@ ...@@ -261,6 +261,10 @@
</if> </if>
</select> </select>
<select id="listForStop" resultMap="result-map-tabHaobanQwMomentPlan">
select <include refid="Base_Column_List" /> from tab_haoban_qw_moment_plan where end_date =#{time} and delete_flag =0 and status_flag = 1 and exec_type = 0
</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