sqlserver isnull判断
--在新增或编辑的时候设置默认值或加isnull判断
Sql isnull函数 ISNULL(columName, 0)<>35 或 ISNULL(columName, '')<>'35'
即使是数字类型加上单引号也支持
--在新增或编辑的时候设置默认值或加isnull判断
Sql isnull函数 ISNULL(columName, 0)<>35 或 ISNULL(columName, '')<>'35'
即使是数字类型加上单引号也支持
el表达式截取 逗号后面的字符串
${fn:substringAfter(strVar,',' )}
el表达式判断字段长度
<c:if test="${fn:length(strVar)>65 }">
</c:if>
el表达式截取字符串长度
${fn:substring(strVar,0,16 )}
@Caching(evict ={
@CacheEvict(value="cacheName",key="#info.id+'_baojia'",beforeInvocation=true),
@CacheEvict(value="cacheName2",key="#info.id+'_fenlei'",beforeInvocation=true) })
ctrl+shift+O 清理代码引用的多余类
ctrl+shift+R 打开指定文件
//hibernate 返回对象指定属性,需要返回的列,可以直接返回 对象属性 @OverridepublicTeamPlan getTeamPlanByBaoMingId(String baomingid){
Criteria cr=this.getSession().createCriteria(BaoMingInfo.class);
cr.setProjection(Projections.property("teamplan"));//需要返回的列,可以直接返回 对象属性 cr.add(Restrictions.eq("id", baomingid));//条件 return(TeamPlan)cr.uniqueResult();
}
@OverridepublicInteger getSumBaseXuNiZuoWeiByTpid(String teamPlanID){
String hql="select sum(basexunizuoweishu) from TeamPlanXuNiZuoWeiEntity where teamplanid=:teamplanid";
Query query=this.getSession().createQuery(hql);
query.setString("teamplanid", teamPlanID);return(Integer)query.uniqueResult();
}