3 changed files with 30 additions and 1 deletions
@ -1,4 +1,32 @@ |
|||||
package com.project.task.controller; |
package com.project.task.controller; |
||||
|
|
||||
|
|
||||
|
import com.project.base.domain.result.PageResult; |
||||
|
import com.project.base.domain.result.Result; |
||||
|
import com.project.task.domain.service.NotifyTaskDomainService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
@RestController |
||||
|
@Slf4j |
||||
|
@RequestMapping("/api/public") |
||||
public class PublicTaskController { |
public class PublicTaskController { |
||||
|
|
||||
|
@Autowired |
||||
|
private NotifyTaskDomainService notifyTaskDomainService; |
||||
|
@RequestMapping("/notifyNewTasks") |
||||
|
public Result<String> notifyNewTasks() throws Exception { |
||||
|
notifyTaskDomainService.notifyNewTasks(new Date()); |
||||
|
return Result.success("成功"); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping("/notifyDeadlineTasks") |
||||
|
public Result<String> notifyDeadlineTasks() throws Exception { |
||||
|
notifyTaskDomainService.notifyDeadlineTasks(new Date()); |
||||
|
return Result.success("成功"); |
||||
|
} |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue