package com.whyc.controller; import com.whyc.dto.Response; import com.whyc.pojo.db_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,"验证失败"); } } }