yangys
2024-04-04 ed4a5236bab800094be4a8378f5098eebe3de6ac
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
50
51
52
53
54
55
56
57
package com.qianwen.smartman.modules.system.controller;
 
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import java.util.List;
import com.qianwen.core.scanner.modular.annotation.GetResource;
import com.qianwen.core.scanner.modular.annotation.PostResource;
import com.qianwen.core.scanner.modular.stereotype.ApiResource;
import com.qianwen.core.tenant.annotation.NonDS;
import com.qianwen.core.tool.api.R;
import com.qianwen.core.tool.utils.Func;
import com.qianwen.smartman.modules.system.service.IWorkbenchCardService;
import com.qianwen.smartman.modules.system.vo.WorkbenchCardListAddVO;
import com.qianwen.smartman.modules.system.vo.WorkbenchCardVO;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
@Api(value = "工作台卡片", tags = {"工作台卡片"})
@RestController
@ApiResource({"blade-system/workbench-card"})
@NonDS
@Validated
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/system/controller/WorkbenchCardController.class */
public class WorkbenchCardController {
    private final IWorkbenchCardService workbenchCardService;
 
    public WorkbenchCardController(final IWorkbenchCardService workbenchCardService) {
        this.workbenchCardService = workbenchCardService;
    }
 
    @PostResource({"/create-workbench-card"})
    @ApiOperation(value = "新增工作台卡片", notes = "新增工作台卡片", tags = {"工作台卡片"})
    public R<Boolean> createWorkbenchCard(@Validated @RequestBody WorkbenchCardListAddVO workbenchCardListAddVO) {
        return R.data(this.workbenchCardService.createWorkbenchCard(workbenchCardListAddVO));
    }
 
    @PostResource({"/delete-workbench-card"})
    @ApiOperation(value = "删除工作台卡片", notes = "删除工作台卡片", tags = {"工作台卡片"})
    public R<Boolean> deleteWorkbenchCard(@RequestParam("id") @ApiParam(value = "卡片Id", required = true) String id) {
        return R.data(Boolean.valueOf(this.workbenchCardService.removeById(Long.valueOf(Func.toLong(id)))));
    }
 
    @GetResource({"/detail"})
    @ApiOperation(value = "查看详情", notes = "查看详情", tags = {"工作台卡片"})
    public R<WorkbenchCardVO> detail(@RequestParam("id") @ApiParam(value = "卡片Id", required = true) String id) {
        return R.data(this.workbenchCardService.detail(id));
    }
 
    @GetResource({"/list"})
    @ApiOperation(value = "卡片列表", notes = "卡片列表", tags = {"工作台卡片"})
    public R<List<WorkbenchCardVO>> getWorkbenchCardlist(@RequestParam("workbenchId") @ApiParam(value = "工作台ID", required = true) String workbenchId) {
        return R.data(this.workbenchCardService.getWorkbenchCardList(workbenchId));
    }
}