package com.whyc.controller; import com.whyc.constant.YamlProperties; import com.whyc.dto.Response; import com.whyc.pojo.db_param.ProcessSurvey; import com.whyc.service.ProcessSurveyService; import com.whyc.util.ActionUtil; 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 extends BaseController{ @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){ String default_pwd=(String) ActionUtil.EncryptionMD5(YamlProperties.restartPasswd); String restart_pwd=(String) ActionUtil.EncryptionMD5(password); if(restart_pwd.equals(default_pwd)){ return new Response().set(1,true,"验证通过"); }else{ return new Response().set(1,false,"验证失败"); } }*/ }