DataManagerController.java
1.08 KB
package com.bsth.controller.realcontrol;
import com.bsth.service.realcontrol.DataManagerService;
import org.apache.commons.lang3.StringEscapeUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
/**
* 数据管理,包括从老系统的数据迁移。新系统的数据校验等
* Created by panzhao on 2017/4/17.
*/
@RestController
@RequestMapping("dataManager")
public class DataManagerController {
@Autowired
DataManagerService dataManagerService;
@RequestMapping("cars/old_now")
public Map<String, Object> carInfos(@RequestParam Integer lineId){
return dataManagerService.carInfos(lineId);
}
@RequestMapping("car/updateDevices")
public Map<String, Object> updateDevices(@RequestParam String jsonStr){
jsonStr = StringEscapeUtils.unescapeHtml4(jsonStr);
return dataManagerService.updateDevices(jsonStr);
}
}