| | |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.pojoOp.OpeFeedback; |
| | | import com.dy.pipIrrGlobal.pojoOp.OpeFeedbackReply; |
| | | import com.dy.pipIrrGlobal.voOp.Vofeedback; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import jakarta.validation.Valid; |
| | |
| | | return BaseResponseUtils.buildException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加问题反馈回复 |
| | | * @param reply |
| | | * @param bindingResult |
| | | * @return |
| | | */ |
| | | @PostMapping(path = "addReply", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop |
| | | public BaseResponse<Boolean> addReply(@RequestBody @Valid OpeFeedbackReply reply, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | if (bindingResult != null && bindingResult.hasErrors()) { |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | if (reply.getFeedbackId() == null){ |
| | | return BaseResponseUtils.buildFail("请传入反馈编号id"); |
| | | } |
| | | Integer rec = Optional.ofNullable(feedbackSv.addReply(reply)).orElse(0); |
| | | if (rec == 0) { |
| | | return BaseResponseUtils.buildFail("添加回复失败"); |
| | | } |
| | | return BaseResponseUtils.buildSuccess(true); |
| | | } |
| | | } |