• hql between and 查询


      public IList<PrdtStdEntity> QueryPrdtStd(PrdtStdEntity prdtStdEntity)
            {
                try
                {
                    var hql = "from PrdtStdEntity t where (t.StdNo=:stdNo or t.ReplacePrdtStdNo=:replacePrdtStdNo)";
                    var paramList = new List<Parameter>
                    {
                        new Parameter("stdNo", prdtStdEntity.StdNo),
                        new Parameter("replacePrdtStdNo", prdtStdEntity.ReplacePrdtStdNo)
                    };
    
    
                    //hql += " and (t.PublishDate BETWEEN TO_DATE('2015-12-09','yyyy-mm-dd') and TO_DATE('2015-12-10','yyyy-mm-dd')) ";
    
    
    
                    hql += " and t.PublishDate between to_date(:beginSampleDate,'yyyy-mm-dd') and to_date(:endSampleDate,'yyyy-mm-dd')  ";
                    paramList.Add(new Parameter("beginSampleDate", "2015-12-01"));
                    paramList.Add(new Parameter("endSampleDate", "2015-12-19"));
    
                    return DataAccess.FindAll<PrdtStdEntity>(hql, paramList);
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
  • 相关阅读:
    webp怎么打开 webp怎么转换成jpg
    波浪运动
    缓动
    动画的封装
    单张滑动tab 组件
    明星单品tab
    多个tab选项卡
    下拉框
    购物车css样式效果
    菜单导航兼容和不兼容捕获方法
  • 原文地址:https://www.cnblogs.com/yisheng/p/5089216.html
Copyright © 2020-2023  润新知