648540858
2021-11-23 b1c92cf4e88447fc59a2b0b8b78c0e2c41282141
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
package com.genersoft.iot.vmp.web.gb28181;
 
import com.genersoft.iot.vmp.service.IUserService;
import com.genersoft.iot.vmp.storager.dao.dto.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
@CrossOrigin
@RestController
@RequestMapping(value = "/auth")
public class AuthController {
 
    @Autowired
    private IUserService userService;
 
    @RequestMapping("/login")
    public String devices(String name, String passwd){
        User user = userService.getUser(name, passwd);
        if (user != null) {
            return "success";
        }else {
            return "fail";
        }
    }
}