ChildTaskPlanController.java
1.13 KB
package com.bsth.controller.realcontrol;
import com.bsth.controller.BaseController;
import com.bsth.entity.realcontrol.ChildTaskPlan;
import com.bsth.service.realcontrol.ChildTaskPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
@RestController
@RequestMapping("/childTask")
public class ChildTaskPlanController extends BaseController<ChildTaskPlan, Long>{
@Autowired
ChildTaskPlanService childTaskPlanService;
@RequestMapping(value = "history", method = RequestMethod.POST)
public Map<String, Object> saveHistory(ChildTaskPlan childTask){
return childTaskPlanService.saveHistory(childTask);
}
@RequestMapping(value = "history/{id}", method = RequestMethod.DELETE)
public Map<String, Object> delHistory(@PathVariable("id") Long id){
return childTaskPlanService.delHistory(id);
}
}