| | |
| | | package com.genersoft.iot.vmp.web.gb28181; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.genersoft.iot.vmp.conf.SipConfig; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | 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.ResponseBody; |
| | | |
| | |
| | | * API兼容:系统接口 |
| | | */ |
| | | @Controller |
| | | @CrossOrigin |
| | | |
| | | @RequestMapping(value = "/api/v1") |
| | | public class ApiController { |
| | | |
| | |
| | | private SipConfig sipConfig; |
| | | |
| | | |
| | | @RequestMapping("/getserverinfo") |
| | | @GetMapping("/getserverinfo") |
| | | private JSONObject getserverinfo(){ |
| | | JSONObject result = new JSONObject(); |
| | | result.put("Authorization","ceshi"); |
| | |
| | | return result; |
| | | } |
| | | |
| | | @RequestMapping(value = "/userinfo") |
| | | @GetMapping(value = "/userinfo") |
| | | private JSONObject userinfo(){ |
| | | // JSONObject result = new JSONObject(); |
| | | // result.put("ID","ceshi"); |
| | |
| | | * @param password 密码(经过md5加密,32位长度,不带中划线,不区分大小写) |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/login") |
| | | @GetMapping(value = "/login") |
| | | @ResponseBody |
| | | private JSONObject login(String username,String password ){ |
| | | if (logger.isDebugEnabled()) { |