| | |
| | | package com.kidgrow.oprationcenter.controller; |
| | | |
| | | import com.kidgrow.common.annotation.LoginUser; |
| | | import com.kidgrow.common.controller.BaseController; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.model.SysUser; |
| | | import com.kidgrow.oprationcenter.model.SysFeedback; |
| | | import com.kidgrow.oprationcenter.service.ISysFeedbackService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @Description: |
| | | * @Project: 运营中心 |
| | | * @CreateDate: Created in 2020-04-02 18:25:34 <br> |
| | |
| | | */ |
| | | @ApiOperation(value = "保存") |
| | | @PostMapping |
| | | public ResultBody save(@Valid @RequestBody SysFeedback sysFeedback, BindingResult bindingResult) { |
| | | public ResultBody save(@Valid @RequestBody SysFeedback sysFeedback, BindingResult bindingResult, @LoginUser SysUser sysUser) { |
| | | List<String> errMsg= new ArrayList<>(); |
| | | if (bindingResult.hasErrors()) { |
| | | for (ObjectError error : bindingResult.getAllErrors()) { |
| | |
| | | } |
| | | return ResultBody.failed().msg(errMsg.toString()); |
| | | } else { |
| | | boolean v= sysFeedbackService.saveOrUpdate(sysFeedback); |
| | | boolean v = sysFeedbackService.saveOrUpdateStr(sysFeedback, sysUser); |
| | | if(v) { |
| | | return ResultBody.ok().data(sysFeedback).msg("保存成功"); |
| | | } |
| | | else { |
| | | } else { |
| | | return ResultBody.failed().msg("保存失败"); |
| | | } |
| | | } |
| | |
| | | boolean v= sysFeedbackService.removeById(id); |
| | | if(v) { |
| | | return ResultBody.ok().msg("删除成功"); |
| | | } |
| | | else { |
| | | } else { |
| | | return ResultBody.failed().msg("删除失败"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改状态 |
| | | * |
| | |
| | | @ApiImplicitParam(name = "enabled", value = "是否启用", required = true, dataType = "Boolean") |
| | | }) |
| | | public ResultBody updateEnabled(@RequestParam Map<String, Object> params) { |
| | | if (params.size()==0) |
| | | { |
| | | if (params.size() == 0) { |
| | | return ResultBody.failed().msg("参数异常!"); |
| | | } |
| | | return sysFeedbackService.updateEnabled(params); |
| | | } |
| | | @PostMapping("getDoctor") |
| | | public ResultBody getoneee(){ |
| | | return sysFeedbackService.getoneee(); |
| | | } |
| | | |
| | | } |