This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
k18-ntcs-web-argus-service/src/main/java/com/nis/web/controller/restful/ServiceController.java

86 lines
2.8 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @Title: ServiceController.java
* @Package com.nis.web.controller
* @Description: TODO(用一句话描述该文件做什么)
* @author darnell
* @date 2016年8月14日 下午2:16:33
* @version V1.0
*/
package com.nis.web.controller.restful;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.nis.domain.ControlLog;
import com.nis.web.controller.BaseRestController;
import com.nis.web.service.restful.ControlLogService;
/**
* @ClassName: ServiceController
* @Description: TODO(这里用一句话描述这个类的作用)
* @author (darnell)
* @date 2016年8月14日 下午2:16:33
* @version V1.0
*/
/*@RestController
@RequestMapping("${servicePath}")*/
public class ServiceController extends BaseRestController{
protected final Logger logger = Logger.getLogger(this.getClass());
@Autowired
protected ControlLogService logService;
// @RequestMapping(value="/log/v1/logs", method = RequestMethod.GET)
// @ApiOperation(value="日志分页获取" , httpMethod = "GET", notes="get log list")
// public Map logList(ControlLog log, HttpServletRequest request, HttpServletResponse response, Model model) {
// Page<ControlLog> content = logService.findPage(new Page<ControlLog>(request, response), log);
// return serviceResponse(request, response, "数据删除", content);
// }
// @RequestMapping(value="/log/v1/logs/{id}", method = RequestMethod.GET)
// public Map getControlLog(@PathVariable("id") long id, HttpServletRequest request, HttpServletResponse response) {
//
// ControlLog log = logService.findById(id);
// if (StringUtil.isEmpty(log)) {
// throw new RestServiceException("未获取管控日志日志ID为"+id, RestBusinessCode.missing_args.getValue());
// }
// return serviceResponse(request, response, "数据删除", log);
// }
@RequestMapping(value="/log/v1/logs", method = RequestMethod.POST)
public ControlLog createControlLog(@RequestBody ControlLog controlLog) {
logService.createControlLog(controlLog);
return controlLog;
}
/* @RequestMapping(value="/cfg/v1/configSources", method = RequestMethod.POST)
public ConfigSource createConfigSource(@RequestBody ConfigSource configSource) {
System.out.println(configSource.getOperator());
return null;
}*/
// @RequestMapping(value="/log/v1/logs/{id}", method = RequestMethod.DELETE)
// public Map deleteControlLog(@PathVariable("id") long id, HttpServletRequest request, HttpServletResponse response) {
// logService.deleteControlLog(id);
// return serviceResponse(request, response, "数据删除");
//
// }
}