/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.wlyy.repository.followup;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.yihu.wlyy.entity.follow.FollowUpTemplate;

public interface FollowUpTemplateDao extends PagingAndSortingRepository<FollowUpTemplate, Long>, JpaSpecificationExecutor<FollowUpTemplate> {

	FollowUpTemplate findByCode(String template);

	@Modifying
	@Query("delete from FollowUpTemplate a where a.code = ?1")
	int deleteByCode(String template);

}
