kaiyu
2021-04-12 827ac521835b2c581e1134bb2e865bfcb7778be7
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.moral.api.controller;
 
import com.moral.api.entity.SysArea;
import com.moral.api.pojo.dto.login.AccountInfoDTO;
import com.moral.api.pojo.dto.system.ManageLogQueryDTO;
import com.moral.api.pojo.form.system.ManageLogQueryForm;
import com.moral.api.service.ManageLogService;
import com.moral.api.service.SysAreaService;
import com.moral.constant.ResponseCodeEnum;
import com.moral.constant.ResultMessage;
import com.moral.util.TokenUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.List;
 
/**
 * @ClassName SystemController
 * @Description TODO
 * @Author 陈凯裕
 * @Date 2021/4/7 13:17
 * @Version TODO
 **/
@Slf4j
@RestController
@CrossOrigin(origins = "*", maxAge = 3600)
@RequestMapping("/system")
public class SystemController {
 
    @Autowired
    SysAreaService sysAreaService;
 
    @Autowired
    ManageLogService manageLogService;
 
    @GetMapping("area/query")
    public ResultMessage queryArea() {
        List<SysArea> sysAreas = sysAreaService.querySysArea();
        return ResultMessage.ok(sysAreas);
    }
 
    @GetMapping("log/query")
    public ResultMessage queryLog(ManageLogQueryForm form) {
 
        //判断是否缺少参数
        if (!form.valid())
            return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(),
                    ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
 
        //处理查询业务
        ManageLogQueryDTO dto = manageLogService.queryManageLog(form);
        return null;
    }
 
 
}