package com.fgkj.controller;
|
|
import java.util.List;
|
|
import com.fgkj.dto.ServiceModel;
|
import com.fgkj.dto.User_task_batt_template;
|
import com.fgkj.services.User_task_batt_templateService;
|
import com.google.gson.reflect.TypeToken;
|
|
import com.opensymphony.xwork2.ActionSupport;
|
import io.swagger.annotations.Api;
|
import org.hibernate.validator.constraints.pl.REGON;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
@RequestMapping("UserTaskBattTemplate")
|
@RestController
|
@Api
|
public class User_task_batt_templateController{
|
@Autowired
|
private User_task_batt_templateService service;
|
|
//4.4 作业模板管理(新建模板)
|
@PostMapping("/")
|
public ServiceModel add(@RequestBody User_task_batt_template utbt){
|
ServiceModel model=service.add(utbt);
|
|
return model;
|
}
|
|
//4.4 作业模板管理(修改模板/重命名)
|
@PutMapping("/")
|
public ServiceModel update(@RequestBody List<User_task_batt_template> uplist) {
|
ServiceModel model=service.update(uplist);
|
|
return model;
|
}
|
|
//4.4 作业模板管理(删除)
|
@DeleteMapping("/")
|
public ServiceModel delete(@RequestBody User_task_batt_template utbt){
|
ServiceModel model=service.delete(utbt);
|
|
return model;
|
}
|
|
//4.4根据模板id查询模板的信息
|
@GetMapping("byCondition")
|
public ServiceModel serchByCondition(@RequestBody User_task_batt_template utbt){
|
ServiceModel model=service.serchByCondition(utbt);
|
|
return model;
|
}
|
|
//4.4查询所有的模板
|
@GetMapping("all")
|
public ServiceModel searchAll(){
|
ServiceModel model=service.searchAll();
|
|
return model;
|
}
|
|
}
|