RerunController.java
1.13 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.bsth.controller.schedule;
import com.bsth.controller.BaseController;
import com.bsth.entity.schedule.rule.RerunRule;
import com.bsth.repository.schedule.RerunRuleRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* Created by xu on 16/10/20.
*/
@RestController
@RequestMapping("rms")
public class RerunController extends BaseController<RerunRule, Long> {
@Autowired
private RerunRuleRepository rerunRuleRepository;
@Override
public RerunRule findById(@PathVariable("id") Long aLong) {
return super.findById(aLong);
}
/**
* 覆写方法,因为form提交的方式参数不全,改用 json形式提交 @RequestBody
* @Title: save
* @Description: TODO(持久化对象)
* @param @param t
* @param @return 设定文件
* @return Map<String,Object> {status: 1(成功),-1(失败)}
* @throws
*/
@RequestMapping(method = RequestMethod.POST)
public Map<String, Object> save(@RequestBody RerunRule t){
return baseService.save(t);
}
}