|
|
@@ -8,22 +8,19 @@ import com.unissoft.service.QuartzService;
|
|
8
|
8
|
import io.swagger.annotations.ApiOperation;
|
|
9
|
9
|
import org.quartz.SchedulerException;
|
|
10
|
10
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
11
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
12
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
11
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
12
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
13
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
14
|
+import org.springframework.web.bind.annotation.RestController;
|
|
13
|
15
|
|
|
14
|
16
|
|
|
15
|
17
|
@RestController
|
|
16
|
18
|
@RequestMapping("/job")
|
|
17
|
19
|
public class QuartzController {
|
|
18
|
20
|
|
|
19
|
|
- @Value("${ymllocation}")
|
|
20
|
|
- private String ymllocation;
|
|
21
|
|
-
|
|
22
|
21
|
@Autowired
|
|
23
|
22
|
private QuartzService quartzService;
|
|
24
|
23
|
|
|
25
|
|
-// @Autowired
|
|
26
|
|
-// private PublishService publishService;
|
|
27
|
24
|
|
|
28
|
25
|
@ApiOperation(value = "新增任务", notes = "")
|
|
29
|
26
|
@PostMapping("/authority_button/add")
|
|
|
@@ -98,24 +95,4 @@ public class QuartzController {
|
|
98
|
95
|
return ResultView.error();
|
|
99
|
96
|
}
|
|
100
|
97
|
|
|
101
|
|
-// @ApiOperation(value = "测试Redis发布", notes = "")
|
|
102
|
|
-// @GetMapping("/authority_button/testRedisPublish")
|
|
103
|
|
-// public ResultView testRedisPublish() {
|
|
104
|
|
-// MessageVO vo = new MessageVO();
|
|
105
|
|
-// vo.setTitle("aaa");
|
|
106
|
|
-// vo.setContent("测试");
|
|
107
|
|
-// vo.setFromUserId(1);
|
|
108
|
|
-// vo.setToUserId(5);
|
|
109
|
|
-// vo.setType(10);
|
|
110
|
|
-//
|
|
111
|
|
-// publishService.publish(GrainConstant.MQ_MSG_CHANNEL, vo);
|
|
112
|
|
-// return ResultView.success();
|
|
113
|
|
-// }
|
|
114
|
|
-
|
|
115
|
|
- @ApiOperation(value = "测试yml", notes = "")
|
|
116
|
|
- @GetMapping("/authority_button/testYmllocation")
|
|
117
|
|
- public ResultView testRedisPublish() {
|
|
118
|
|
- return ResultView.success(ymllocation);
|
|
119
|
|
- }
|
|
120
|
|
-
|
|
121
|
98
|
}
|