CriteriaQuery.setOrder(map)无法正序排列
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 ? //这里还是进行的降序排列!!!
这是咋回事呀?只要添加排序条件,就是反序排列 :Q:Q:Q:Q 求教求教 兄弟,我也碰到你这问题了,请问解决了吗 说明jeecg版本号
页:
[1]