9 changed files with 167 additions and 199 deletions
@ -0,0 +1,15 @@ |
|||
package com.elink.esua.epdc.constant; |
|||
|
|||
/** |
|||
* 定时任务模块部分常量 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/4/10 16:49 |
|||
*/ |
|||
public interface JobModuleConstant { |
|||
|
|||
/** |
|||
* 审核初心互助报名用户 |
|||
*/ |
|||
String TASK_NAME_AUDIT_ACT = "autoAuditActUserTask"; |
|||
} |
|||
@ -1,55 +0,0 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.task.activity; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.service.ActivityService; |
|||
import com.elink.esua.epdc.service.ScheduleJobService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 自动审核通过未审核的报名人员 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-19 |
|||
*/ |
|||
@Component("AutoAuditActUserTask") |
|||
public class AutoAuditActUserTaskImpl implements AutoAuditActUserTask { |
|||
|
|||
@Autowired |
|||
private ActivityService activityService; |
|||
|
|||
@Autowired |
|||
private ScheduleJobService scheduleJobService; |
|||
|
|||
@Override |
|||
public void run(String actId){ |
|||
//活动时间到自动审核通过未审核的报名人员
|
|||
Result result = activityService.AutoAuditActUser(actId); |
|||
|
|||
//删除对应job
|
|||
if(result.getCode() == 0){ |
|||
scheduleJobService.deleteJobByParams(actId); |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
} |
|||
@ -1,43 +0,0 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.task.volunteer; |
|||
|
|||
import com.elink.esua.epdc.service.VolunteerService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 定时更新志愿者排名 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-19 |
|||
*/ |
|||
@Component("UpdateVolunteerRankTask") |
|||
public class UpdateVolunteerRankTaskImpl implements UpdateVolunteerRankTask { |
|||
|
|||
@Autowired |
|||
private VolunteerService volunteerService; |
|||
|
|||
@Override |
|||
public void run(String param){ |
|||
//每日定时更新排行榜
|
|||
volunteerService.generateRankingList(); |
|||
} |
|||
|
|||
|
|||
} |
|||
Loading…
Reference in new issue