//=============公=======共=======方=======法==========区=========start============// /** * 列表分页查询 */ public String equip(){ Map<String,Object> alias = new HashMap<String,Object>(); StringBuffer sb = new StringBuffer(); sb = sb.append("from Equip where 1=1 "); if(equip.getType() != null&&!"".equals(equip.getType())){ sb.append(" and type = :type"); alias.put("type",equip.getType()); } if(equip.getPrice() != null&&!"".equals(equip.getPrice())){ sb.append(" and price = :price"); alias.put("price",equip.getPrice()); } if(equip!=null && equip.getName() !=null && !"".equals(equip.getName())){ sb.append(" and name like :name "); alias.put("name", "%" +equip.getName()+ "%" ); } sb = sb.append(" order by id desc"); Pager<Equip> pagers = equipService.findByAlias(sb.toString(),alias); ActionContext.getContext().put("pagers", pagers); ActionContext.getContext().put("Obj", equip); return SUCCESS; }
public String equip1(){ Map<String,Object> alias = new HashMap<String,Object>(); StringBuffer sb = new StringBuffer(); sb = sb.append("from Equip where 1=1 "); if(equip.getType() != null&&!"".equals(equip.getType())){ sb.append(" and type = :type"); alias.put("type",equip.getType()); } if(equip.getPrice() != null&&!"".equals(equip.getPrice())){ sb.append(" and price = :price");
//=============公=======共=======方=======法==========区=========start============// /** * 列表分页查询 */ public String coach(){ Map<String,Object> alias = new HashMap<String,Object>();