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());
|
}
|
|
|
|
}
|