hjl
2024-07-01 03c6572c7918beaa20365e69c9694a11f0d9948a
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
58
59
60
package com.ruoyi.user.controller;
 
 
import com.ruoyi.common.core.domain.R;
import com.ruoyi.user.entity.RecoveryServe;
import com.ruoyi.user.service.RecoveryServeService;
import com.ruoyi.user.vo.ServeListVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
import java.util.List;
 
/**
 * <p>
 * 回收服务列表 前端控制器
 * </p>
 *
 * @author hjl
 * @since 2024-06-06
 */
@RestController
@RequestMapping("/serve")
@Api(tags = {"用户端-服务"})
public class RecoveryServeController {
 
    @Resource
    private RecoveryServeService recoveryServeService;
 
    /**
     * 获取服务列表
     */
    @GetMapping(value = "/serveList")
    @ApiOperation(value = "获取服务列表", tags = {"用户端-服务"})
    public R<List<ServeListVO>> serveList() {
        return R.ok(recoveryServeService.serveList());
    }
 
    /**
     * 获取服务详情
     */
    @GetMapping(value = "/serveDetail")
    @ApiOperation(value = "获取服务详情", tags = {"用户端-服务"})
    @ApiImplicitParams({
            @ApiImplicitParam(value = "服务id", name = "serveId", dataType = "Integer", required = true)
    })
    public R<RecoveryServe> serveDetail(@RequestParam Integer serveId) {
        return R.ok(recoveryServeService.lambdaQuery().eq(RecoveryServe::getId, serveId)
                .eq(RecoveryServe::getIsDelete, 0).orderByAsc(RecoveryServe::getSort).one());
    }
 
 
 
}