luofl
2025-03-20 ecc3636bffbcf6cc746125c28689ef19d7a9d4cb
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/ScreenController.java
@@ -4,11 +4,17 @@
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.model.TContract;
import com.ruoyi.system.service.TContractService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.service.impl.ScreenService;
import com.ruoyi.system.vo.TenantCountTrendVO;
import com.ruoyi.system.vo.ScreenRentRankVO;
import com.ruoyi.system.vo.ScreenTopStaticsDataVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -21,6 +27,8 @@
import java.util.Map;
import java.util.stream.Collectors;
import java.util.List;
/**
 * @author mitao
 * @date 2025/3/19
@@ -28,9 +36,19 @@
@Api(tags = {"大屏相关接口"})
@RestController
@RequestMapping("/screen")
@RequiredArgsConstructor
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
public class ScreenController {
    private final ScreenService screenService;
    @GetMapping("/statics-data")
    @ApiOperation(value = "获取顶部统计数据")
    public R<ScreenTopStaticsDataVO> getTopStaticsData() {
        return R.ok(screenService.getTopStaticsData());
    }
    @ApiOperation("区域租金排名")
    @GetMapping("/rent-rank")
    public R<List<ScreenRentRankVO>> rentRank() {
        return R.ok(screenService.rentRank());
    }
    private final TContractService contractService;