码迷,mamicode.com
首页 > 其他好文 > 详细

criteria两个 判断

时间:2020-05-25 16:11:59      阅读:81      评论:0      收藏:0      [点我收藏+]

标签:std   rac   ISE   criteria   日期   info   isnull   等于   date   

if (StringUtils.isEmpty(date)) {
date = DateUtil.Date2String(new Date(), DateUtil.YYYYMMDD);
}
StkInnerStockInfoExample example = new StkInnerStockInfoExample();
StkInnerStockInfoExample.Criteria createCriteria = example.createCriteria();
createCriteria.andDelistDateIsNull();
createCriteria.andContractTypeEqualTo(0);
createCriteria.andListDateLessThanOrEqualTo(date);

StkInnerStockInfoExample.Criteria createCriteria2 = example.createCriteria();
//createCriteria2.andDelistDateGreaterThanOrEqualTo(date);
createCriteria2.andDelistDateGreaterThan(date);//不能等于,退市那个日期是摘牌日
createCriteria.andContractTypeEqualTo(0);
createCriteria2.andListDateLessThanOrEqualTo(date);

example.or(createCriteria2);
return stkInnerStockInfoMapper.selectByExample(example);

criteria两个 判断

标签:std   rac   ISE   criteria   日期   info   isnull   等于   date   

原文地址:https://www.cnblogs.com/redBack/p/12956809.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!