package com.xiaopeng.maintenance.controller;
|
|
import com.xiaopeng.common.core.domain.R;
|
import com.xiaopeng.maintenance.dto.IndexDataQuery;
|
import com.xiaopeng.maintenance.service.IndexDataService;
|
import com.xiaopeng.maintenance.vo.IndexDataVO;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import javax.annotation.Resource;
|
|
/**
|
* 首页 Controller
|
*
|
* @author mitao
|
*/
|
@Slf4j
|
@RestController
|
@Api(tags = "管理后台-首页")
|
public class IndexController {
|
|
@Resource
|
private IndexDataService indexDataService;
|
|
@ApiOperation(value = "首页数据统计", tags = {"管理后台-首页"})
|
@PostMapping("/base/v1/indexData")
|
public R<IndexDataVO> indexData(@RequestBody(required = false) IndexDataQuery query) {
|
if (query == null) {
|
query = new IndexDataQuery();
|
}
|
return R.ok(indexDataService.getIndexData(query));
|
}
|
}
|