关注JEECG发展历程 关注最新动态和版本, 记录JEECG成长点滴 更新日志 - 技术支持 - 招聘英才

JEECG最新版本下载 JEECG智能开发平台 - 显著提高开发效率 常见问题 - 入门视频 - 参与开源团队

商务QQ: 69893005、3102411850 商务热线(5*8小时): 010-64808099 官方邮箱: jeecgos@163.com

查看: 6713|回复: 4

CriteriaQuery.setOrder(map)无法正序排列

[复制链接]
发表于 2016-7-3 09:57:23 | 显示全部楼层 |阅读模式
CriteriaQuery cq = new CriteriaQuery(FitnessOrderEntity.class, dataGrid);
map.put("tempValidtime", "asc");
cq.setOrder(map);

这样出来的两个字段都是desc排列,第二个设置无效

后台打印出的SQL:
Hibernate:
    select
        this_.ID as ID1_21_0_,
        this_.COACHID as COACHID2_21_0_,
        this_.COACHOPENID as COACHOPE3_21_0_,
        this_.COURSEID as COURSEID4_21_0_,
        this_.COURSENAME as COURSENA5_21_0_,
        this_.COURSETYPE as COURSETY6_21_0_,
        this_.CREATETIME as CREATETI7_21_0_,
        this_.IP as IP8_21_0_,
        this_.jcsr as jcsr9_21_0_,
        this_.jpsj as jpsj10_21_0_,
        this_.kfje as kfje11_21_0_,
        this_.MEMBERID as MEMBERI12_21_0_,
        this_.MEMBERNAME as MEMBERN13_21_0_,
        this_.MEMBEROPENID as MEMBERO14_21_0_,
        this_.MESSAGE as MESSAGE15_21_0_,
        this_.mftsj as mftsj16_21_0_,
        this_.mfttt as mfttt17_21_0_,
        this_.mfttyk as mfttyk18_21_0_,
        this_.ORDERDATE as ORDERDA19_21_0_,
        this_.qxtime as qxtime20_21_0_,
        this_.REALNAME as REALNAM21_21_0_,
        this_.SCANEIP as SCANEIP22_21_0_,
        this_.SCANENTERTIME as SCANENT23_21_0_,
        this_.SCANESTATUS as SCANEST24_21_0_,
        this_.SEX as SEX25_21_0_,
        this_.sjtyk as sjtyk26_21_0_,
        this_.spsr as spsr27_21_0_,
        this_.STATUS as STATUS28_21_0_,
        this_.stringDate as stringD29_21_0_,
        this_.tempCardType as tempCar30_21_0_,
        this_.tempTcbfb as tempTcb31_21_0_,
        this_.tempValidtime as tempVal32_21_0_,
        this_.TOTALCOST as TOTALCO33_21_0_,
        this_.VALIDTIME as VALIDTI34_21_0_,
        this_.xkyj as xkyj35_21_0_,
        this_.xskyj as xskyj36_21_0_,
        this_.zgsr as zgsr37_21_0_
    from
        fitness_order this_
    where
        this_.ORDERDATE=?
        and this_.COURSEID<>?
    order by
        this_.tempValidtime desc limit ? //这里还是进行的降序排列!!!

 楼主| 发表于 2016-7-6 22:10:49 | 显示全部楼层
这是咋回事呀?只要添加排序条件,就是反序排列
 楼主| 发表于 2016-7-20 17:05:04 | 显示全部楼层
求教求教
发表于 2018-8-30 15:03:11 | 显示全部楼层
兄弟,我也碰到你这问题了,请问解决了吗
发表于 2018-8-30 18:14:52 | 显示全部楼层
说明jeecg版本号
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表