whyclxw
2025-04-21 3a6d4de77253bb86aed3383f9b9c54be5c25752c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.plus_user.ProcessSurvey;
import com.whyc.service.ProcessSurveyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
 
@RestController
@RequestMapping("processSurvey")
@Api(tags = "后台线程管理")
public class ProcessSurveyController{
    @Resource
    private ProcessSurveyService service;
    @GetMapping("getAll")
    @ApiOperation(value = "获取所有线程")
    public Response getAll(){
        return service.getAll();
    }
 
    @PostMapping("update")
    @ApiOperation(value = "通过id更新")
    public Response update(@RequestBody ProcessSurvey survey){
        return service.updateById(survey);
    }
 
    @PostMapping("updateFlag")
    @ApiOperation(value = "通过服务名修改标识")
    public Response updateFlagByName(@RequestBody ProcessSurvey survey){
        return service.updateServerFlagByName(survey);
    }
 
    @PostMapping("judgeRestart")
    @ApiOperation(value = "验证重启密码")
    public Response judgeRestart(@RequestParam String password){
        if(password.equals("123456")){
            return new Response().set(1,true,"验证通过");
        }else{
            return new Response().set(1,false,"验证失败");
        }
    }
 
 
 
}