package cn.hmsoft.hmplatform.project.control;

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

import cn.hmsoft.application.web.Ajax;
import cn.hmsoft.frame.control.FrameControl;
import cn.hmsoft.hmplatform.project.data.dao.PProjectRemarkDao;
import cn.hmsoft.hmplatform.project.data.model.PProjectRemark;
import cn.hmsoft.hmplatform.project.service.PProjectRemarkService;

@RestController
public class ProjectRemarkControl extends FrameControl {

	@Autowired
	private PProjectRemarkService serviceRemark;
	@Autowired
	private PProjectRemarkDao daoRemark;
	
	@RequestMapping("platform/conf/projectremark/list")
	public Ajax list(Integer project_id) {
		return new Ajax(this.daoRemark.listRemark(project_id));
	}
	
	@RequestMapping("platform/conf/projectremark/save")
	public Ajax save(PProjectRemark remark) {
		this.serviceRemark.saveRemark(remark);
		return new Ajax();
	}
	
	@RequestMapping("platform/conf/projectremark/delete")
	public Ajax delete(Integer remark_id) {
		this.serviceRemark.deleteRemark(remark_id);
		return new Ajax();
	}
}
