package com.yida.data.job.task;

import com.yida.data.customForm.feign.RemoteFormService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author ccl
 */
@Component
@Slf4j
@RequiredArgsConstructor
public class FormUpdateTask {
    @Resource
    private RemoteFormService remoteFormService;

    public void formUpdate(String id) {
        log.info("执行表单发布定时任务,id:[{}]", id);
        remoteFormService.updateById(Long.valueOf(id));
    }

    public void formRemind(String id) {
        log.info("执行表单定时提醒任务,id:[{}]", id);
        remoteFormService.remindLast(Long.valueOf(id));
    }
}
