排序无效
本帖最后由 Wayne 于 2018-5-21 16:53 编辑版本:3.72
我用minidao在最后加以下语句
数据没问题,但没有排序效果!!!
Controller是这样写的
@RequestMapping(params = "minidaoDatagrid")
public void minidaoDatagrid(NrdMaterielEntity nrdMateriel,Integer status,String applyPurchaseNo,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
// String authSql = JeecgDataAutorUtils.loadDataSearchConditonSQLString();
//获取当前登录人信息
TSUser currentUser = ResourceUtil.getSessionUser();
String purchaseUser = null;
if(!"admin".equals(currentUser.getUserName())){
if(status!=null){
if(status==1){
nrdMateriel.setUpdateBy(currentUser.getUserName());
}
if(status==5){
purchaseUser = currentUser.getUserName();
}
if(status==0){
nrdMateriel.setCreateBy(currentUser.getUserName());
}
}else{
nrdMateriel.setCreateBy(currentUser.getUserName());
}
}
MiniDaoPage<Map<String, Object>> list = nrdApplyPurchaseMinidaoDao.getAll(nrdMateriel,status,purchaseUser,applyPurchaseNo, dataGrid.getPage(), dataGrid.getRows());
dataGrid.setTotal(list.getTotal());
dataGrid.setResults(list.getResults());
TagUtil.datagrid(response, dataGrid);
}
应该如何写才能排序?
不会啊,你确定下新写的sql文件编译到class目录下了没 admin 发表于 2018-5-22 10:08 static/image/common/back.gif
不会啊,你确定下新写的sql文件编译到class目录下了没
:Q 已确认过,已经编译到class,还是没有排序的效果!! 把日志打出来看看 admin 发表于 2018-6-7 17:12 static/image/common/back.gif
把日志打出来看看
没报错信息。。。。 把minidao输出sql的日志解开,看看执行的sql是什么 admin 发表于 2018-6-7 22:36 static/image/common/back.gif
把minidao输出sql的日志解开,看看执行的sql是什么
请问这个sql输出日志怎么解开,找了很久。。。 admin 发表于 2018-6-7 22:36 static/image/common/back.gif
把minidao输出sql的日志解开,看看执行的sql是什么
Hibernate:
select
count(*)
from
t_s_function
where
functiontype = 0
and functionurl = 'nrdInvResultController.do?minidaoDatagrid'
Hibernate:
select
this_.ID as ID100_3_,
this_.parentfunctionid as parentf15_100_3_,
this_.iconid as iconid100_3_,
this_.desk_iconid as desk17_100_3_,
this_.create_by as create2_100_3_,
this_.create_date as create3_100_3_,
this_.create_name as create4_100_3_,
this_.function_icon_style as function5_100_3_,
this_.functioniframe as function6_100_3_,
this_.functionlevel as function7_100_3_,
this_.functionname as function8_100_3_,
this_.functionorder as function9_100_3_,
this_.functiontype as functio10_100_3_,
this_.functionurl as functio11_100_3_,
this_.update_by as update12_100_3_,
this_.update_date as update13_100_3_,
this_.update_name as update14_100_3_,
tsfunction2_.ID as ID100_0_,
tsfunction2_.parentfunctionid as parentf15_100_0_,
tsfunction2_.iconid as iconid100_0_,
tsfunction2_.desk_iconid as desk17_100_0_,
tsfunction2_.create_by as create2_100_0_,
tsfunction2_.create_date as create3_100_0_,
tsfunction2_.create_name as create4_100_0_,
tsfunction2_.function_icon_style as function5_100_0_,
tsfunction2_.functioniframe as function6_100_0_,
tsfunction2_.functionlevel as function7_100_0_,
tsfunction2_.functionname as function8_100_0_,
tsfunction2_.functionorder as function9_100_0_,
tsfunction2_.functiontype as functio10_100_0_,
tsfunction2_.functionurl as functio11_100_0_,
tsfunction2_.update_by as update12_100_0_,
tsfunction2_.update_date as update13_100_0_,
tsfunction2_.update_name as update14_100_0_,
tsicon3_.ID as ID101_1_,
tsicon3_.extend as extend101_1_,
tsicon3_.iconclas as iconclas101_1_,
tsicon3_.content as content101_1_,
tsicon3_.name as name101_1_,
tsicon3_.path as path101_1_,
tsicon3_.type as type101_1_,
tsicon4_.ID as ID101_2_,
tsicon4_.extend as extend101_2_,
tsicon4_.iconclas as iconclas101_2_,
tsicon4_.content as content101_2_,
tsicon4_.name as name101_2_,
tsicon4_.path as path101_2_,
tsicon4_.type as type101_2_
from
t_s_function this_
left outer join
t_s_function tsfunction2_
on this_.parentfunctionid=tsfunction2_.ID
left outer join
t_s_icon tsicon3_
on tsfunction2_.iconid=tsicon3_.ID
left outer join
t_s_icon tsicon4_
on tsfunction2_.desk_iconid=tsicon4_.ID
where
this_.functionurl=?
admin 发表于 2018-6-7 22:36 static/image/common/back.gif
把minidao输出sql的日志解开,看看执行的sql是什么
MiniDao-SQL:
select nir.id,nir.inv_stor_num as invStorNum,nir.ma_name_code as maNameCode, nm.materiel_name as materielName,nm.classify_id as classifyId, nm.model_no as modelNo,nm.scd,nm.version_id as versionId,nm.unit from nrd_inv_result as nir left join nrd_materiel as nm on nir.materiel_id=nm.id where nir.flag=1 ORDER BY nir.create_date DESC 大佬们,这个怎么处理啊????
页:
[1]
2