|
@RequestMapping(params = "datagrid")
public void datagrid(FAirpriceEntity fAirprice,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
CriteriaQuery cq = new CriteriaQuery(FAirpriceEntity.class, dataGrid);
//查询条件组装器
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, fAirprice, request.getParameterMap());
try{
//自定义追加查询条件 如果是增删改,就只能看到自己的数据。商家后台
cq.eq("createBy", ResourceUtil.getSessionUser().getUserName());
//自定义追加查询条件 如果是客户查看,下订单,就只能看到endtime为之前的数据,参数根据后面取。
}catch (Exception e) {
throw new BusinessException(e.getMessage());
}
cq.add();
this.fAirpriceService.getDataGridReturn(cq, true);
TagUtil.datagrid(response, dataGrid);
}
/**
* 客户运价信息列表 页面跳转
*
* @return
*/
@RequestMapping(params = "viplist")
public ModelAndView viplist(HttpServletRequest request) {
return new ModelAndView("freightpingtai/fairprice/fAirpriceViplist");
}
/**
* easyui AJAX请求数据
*
* @param request
* @param response
* @param vipdataGrid
* @param user
*/
@RequestMapping(params = "vipdatagrid")
public void vipdatagrid(FAirpriceEntity fAirprice,HttpServletRequest request, HttpServletResponse response, DataGrid vipdatagrid) {
CriteriaQuery vipcq = new CriteriaQuery(FAirpriceEntity.class, vipdatagrid);
//查询条件组装器
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(vipcq, fAirprice, request.getParameterMap());
try{
//自定义追加查询条件 如果是增删改,就只能看到自己的数据。商家后台
//cq.eq("createBy", ResourceUtil.getSessionUser().getUserName());
//自定义追加查询条件 如果是客户查看,下订单,就只能看到endtime为之前的数据,参数根据后面取。 String enddate = DateUtils.date2Str(DateUtils.date_sdf);
vipcq.ge("endtime",enddate);
}catch (Exception e) {
throw new BusinessException(e.getMessage());
}
vipcq.add();
this.fAirpriceService.getDataGridReturn(vipcq, true);
TagUtil.datagrid(response, vipdatagrid);
}
我查出来的结果每次都相同,想改造为if语句,根据不同参数进行查询条件的区别,如何取出params里面的内容?
|
|