日期:2014-05-20 浏览次数:20919 次
<!-- 根据code检测记录是否存在 -->
<select id="checkByCode" parameterClass="java.lang.String" resultClass="int">
select count(1) from class t where t.code=#code# and t.flag=1
</select>
/**
*根据code查询记录是否存在
*
*@param String
*@return boolean
* */
public boolean checkIsExistByCode(String code);
/**
*根据code查询记录是否存在
*
*@param String
*@return boolean
* */
public boolean checkIsExistByCode(String code){
return (Integer)sqlClient.queryForObject("checkByCode",code)==0?false:true;
}