ZQN
2024-06-19 72468556f3709380ab3a70e07d8a916fbd47c988
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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)
//    @PreAuthorize("@ss.hasPermi('sys:company:check')")
    @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("审核失败!");
    }
 
 
}