package com.project.admin.controller.tool; import com.project.common.annotation.Log; import com.project.common.annotation.RepeatSubmit; import com.project.common.core.domain.AjaxResult; import com.project.common.enums.BusinessType; import com.project.enforce.service.ICheckService; import com.project.system.domain.bo.editBo.CheckBo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @Api(value = "审核管理", tags = {"审核"}) @RequiredArgsConstructor(onConstructor_ = @Autowired) @RestController @RequestMapping("/tool/check") public class CheckController { private final ICheckService checkService; @ApiOperation("审核") @Log(title = "审核", businessType = BusinessType.UPDATE) @PostMapping(value = "/checkOrder") @RepeatSubmit public AjaxResult checkOrder(@RequestBody CheckBo bo) { if (bo.getCheckStatus()!=1 && bo.getCheckStatus()!=-1){ return AjaxResult.error("审核状态有误!"); } Boolean check = checkService.checkOrder(bo); if (check){ if (bo.getCheckStatus()==1){ return AjaxResult.success("审核通过成功!"); } return AjaxResult.success("审核拒绝成功!"); } return AjaxResult.error("审核失败!"); } }