| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.constant.YamlProperties; |
| | | import com.whyc.dto.ProcessServerDao; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.ProcessSurvey; |
| | | import com.whyc.service.ProcessSurveyService; |
| | | import com.whyc.util.ActionUtil; |
| | | import com.whyc.util.JasyptUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @RestController |
| | | @RequestMapping("processSurvey") |
| | | @Api(tags = "数据管理-后台线程管理") |
| | | public class ProcessSurveyController { |
| | | public class ProcessSurveyController extends BaseController{ |
| | | @Resource |
| | | private ProcessSurveyService service; |
| | | @GetMapping("/getAll") |
| | |
| | | return service.getAll(); |
| | | } |
| | | |
| | | @PutMapping() |
| | | @PostMapping("update") |
| | | @ApiOperation(value = "通过id更新") |
| | | public Response update(@RequestBody ProcessSurvey survey){ |
| | | return service.updateById(survey); |
| | | } |
| | | |
| | | @PutMapping("/updateFlag") |
| | | @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(JasyptUtils.decrypt(ProcessServerDao.RESTART_PWD_ENCRYPT)); |
| | | 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,"验证通过"); |