whycxzp
2021-12-29 2787007b44668bb8e56588a46421d4e6e0aafee9
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
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.Battinf;
import com.whyc.pojo.UserInf;
import com.whyc.service.BattGroupStationUserService;
import com.whyc.util.ActionUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
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.swing.*;
import java.util.List;
 
/**
 * 包机组-用户表
 */
@RestController
@RequestMapping("BattGroupUser")
@Api(tags = "用户管理-电池组|站点-用户")
public class BattGroupStationUserController {
 
    @Autowired
    private BattGroupStationUserService service;
 
    @GetMapping("userList")
    @ApiOperation(value = "查询站点对应的用户列表")
    public Response<List<UserInf>> getUserList(@RequestParam Integer stationId){
        List<UserInf> userList = service.getUserList(stationId);
        return new Response<List<UserInf>>().set(1,userList);
    }
 
    @GetMapping("stationInfoList")
    @ApiOperation(tags = "在线监测-设备状态查询",value = "机房名称查询")
    public Response<List<Battinf>> getStationInfoList(){
        Long uId = ActionUtil.getUser().getUId();
        List<Battinf> list = service.getStationInfoList(uId);
        return new Response<List<Battinf>>().set(1,list);
    }
 
}