return orderStr.trim().matches("[\\d]+");
}
@RequestMapping("/advertisement/listAdvertisement.do")
public ModelAndView queryAdvertisement(HttpServletRequest request,HttpServletResponse response){
RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
String description = request.getParameter("description");
List parameters = new ArrayList();
String hql = "";
if(rtUser.getUsertype() == User.USER_TYPE_GSYG)
{
hql = "from Advertisement ad where ad.SFYX = 0 and ad.merchant.DELETEFLAG = '0' " ;
}else if(rtUser.getUsertype()!=User.USER_TYPE_MERCHANT){
hql = "from Advertisement ad where ad.SFYX = 0 and ad.user.id =? ";
parameters.add(rtUser.getId());
}else{
hql = "from Advertisement ad where ad.SFYX = 0 and ad.merchant.id=? ";
parameters.add(rtUser.getOrganizationid());
}
if(null!=description&&!"".equals(description.trim())){
hql += " and ad.tpmx like ?";
parameters.add("%"+description+"%");
}