IntervalController.java 846 Bytes
package com.bsth.controller.sys;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.JSON;
import com.bsth.entity.sys.Interval;
import com.bsth.service.sys.IntervalService;

@RestController
@RequestMapping("interval")
public class IntervalController {
	
	@Autowired
	IntervalService intervalService;
	
	@RequestMapping(value = "/save", method = RequestMethod.POST)
	public Map<String, Object> save(@RequestParam String array){
		return intervalService.saveList(JSON.parseArray(array, Interval.class));
	}
}