这样写 为何排序无效
sql.setPager(pager);
sql.setCondition(Cnd.orderBy().desc("mm.FNUMBER"));
sql.setCallback(Sqls.callback.entities());
dao().execute(sql);
这样写 为何排序无效
sql.setPager(pager);
sql.setCondition(Cnd.orderBy().desc("mm.FNUMBER"));
sql.setCallback(Sqls.callback.entities());
dao().execute(sql);
@wendal SELECT * FROM (SELECT T.*, ROWNUM RN FROM (SELECT mm.ID AS orderNoId,mm.FNUMBER AS orderNo,mm.FSTATUS AS statusId,DECODE(mm.FSTATUS,0,'待分配技师',1,'全车检查',2,'车主确认',3,'维修',4,'整车质检',5,'待付款',6,'待提车',7,'已提车',8,'已评价',9,'项目变更',10,'废单') AS statusName,tu.NAME AS tecName,
pr.FNAME AS repairName,mr.FCONNECTER AS contacts,vm.FLICENSENO AS carNum,
(pl.FNAME || ' ' || pm.FNAME) AS carType,
TO_CHAR(mm.FYJJCDATE,'YYYY-MM-DD HH24:MI') AS estimatedDeliveryTime
FROM MM_WORKORDER mm
LEFT JOIN MM_MATEC ma ON ma.ID = mm.FTECHNICIAN
LEFT JOIN TUSER tu ON tu.ID = ma.FNAME
LEFT JOIN PUB_REPAIRCATEGORY pr ON pr.ID = mm.FREPAIR_METHOD
LEFT JOIN MM_REPAIRAPPOINTMENT mr ON mr.ID = mm.FGUYNUMBER
LEFT JOIN VM_CARDATE vm ON vm.ID = mm.FLICENSENO
LEFT JOIN PUB_Line pl ON pl.ID = mm.FLINE
LEFT JOIN PUB_Model pm ON pm.ID = mm.FMODEL
WHERE mm.FCREATER = 84 ) T WHERE ROWNUM <= 15) WHERE RN > 0