feat: 定时任务调用修改
This commit is contained in:
parent
91a1154383
commit
99dba02361
|
|
@ -104,10 +104,10 @@ public class ScheduleJobServiceImpl extends ServiceImpl<ScheduleJobDao, Schedule
|
|||
// return method.invoke(classInstance, jobDTO.getArgs().toArray());
|
||||
// }
|
||||
// 获取指定的Method对象
|
||||
Method method = classInstance.getClass().getDeclaredMethod("run");
|
||||
Method method = classInstance.getClass().getDeclaredMethod("run", String.class);
|
||||
|
||||
// 调用方法并返回结果
|
||||
Object invoke = method.invoke(classInstance);
|
||||
Object invoke = method.invoke(classInstance, jobEntity.getParams());
|
||||
if (invoke != null) {
|
||||
result.add(invoke);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class CashOutTask{
|
|||
|
||||
private Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
public void run() {
|
||||
public void run(String params) {
|
||||
logger.info("提现开始");
|
||||
List<CashOut> cashOuts = cashOutDao.selectYesterday();
|
||||
for (CashOut cashOut : cashOuts) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue