package cn.hmsoft.hmplatform.project.service;

import java.time.LocalDateTime;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.hmsoft.hmplatform.project.data.dao.PProjectRemarkDao;
import cn.hmsoft.hmplatform.project.data.model.PProjectRemark;

@Service
public class PProjectRemarkService {

	@Autowired
	private PProjectRemarkDao daoRemark;

	public void saveRemark(PProjectRemark remark) {
		if (remark.getRemark_id() == null) {
			remark.setRemark_time(LocalDateTime.now());
			this.daoRemark.insert(remark);
		} else {
			this.daoRemark.update(remark);
		}
		
	}

	public void deleteRemark(Integer remark_id) {
		this.daoRemark.delete(remark_id);
	}
}
