使用oracle做的数据上传系统后台
kongdeqiang
2026-03-21 b63977ec7120e8d5f8e5b7d1ac9b85be76ad62a8
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
package com.example.controller;
 
import com.example.common.PageResult;
import com.example.common.Result;
import com.example.entity.User;
import com.example.service.DataExcelService;
import com.example.service.DepartmentService;
import com.example.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.HashMap;
import java.util.Map;
 
/**
 * @author kdq
 * @version 1.0.0
 * @ClassName IndexController.java
 * @Description TODO
 * @createTime 2026年03月21日 10:43:00
 */
@RestController
@RequestMapping("/api/index")
public class IndexController {
 
    @Autowired
    private UserService userService;
 
    @Autowired
    private DepartmentService departmentService;
 
    @Autowired
    private DataExcelService dataExcelService;
 
 
    @RequestMapping("/getCount")
    public Result<Map> getCount(){
        int userSize = userService.list().size();
        int deptSize = departmentService.list().size();
        int dataSize = dataExcelService.list().size();
        Map<String, Object> map = new HashMap<>();
        map.put("userSize", userSize);
        map.put("deptSize", deptSize);
        map.put("dataSize", dataSize);
        return Result.success(map);
    }
}