/** 列表查询积分管理 */ public String execute() throws Exception { String where = " where 1=1 "; // if (s_name!=null && s_name.trim().length()!=0) { // where += " and " + Integral.COL_name +" like '%" + s_name.trim()+"%'"; // } List list = Server.getInstance() .getMemberService() .findAllIntegralForPageinfo(where, " ORDER BY ID ", pageinfo); pageinfo = (PageInfo) list.remove(0); listIntegral = list; if (pageinfo.getTotalrow() > 0 && listIntegral.size() == 0) { pageinfo.setPagenum(1); list = Server.getInstance() .getMemberService() .findAllIntegralForPageinfo(where, " ORDER BY ID ", pageinfo); pageinfo = (PageInfo) list.remove(0); listIntegral = list; } for (Integral integral : listIntegral) { if (integral.getAgenttype() == 5) { // 会员 this.integral = integral; } } return SUCCESS; }
/** 编辑积分管理 */ public String edit() throws Exception { HttpServletRequest request = ServletActionContext.getRequest(); String where = " where 1=1 "; List list = Server.getInstance() .getMemberService() .findAllIntegralForPageinfo(where, " ORDER BY ID ", pageinfo); pageinfo = (PageInfo) list.remove(0); listIntegral = list; if (pageinfo.getTotalrow() > 0 && listIntegral.size() == 0) { pageinfo.setPagenum(1); list = Server.getInstance() .getMemberService() .findAllIntegralForPageinfo(where, " ORDER BY ID ", pageinfo); pageinfo = (PageInfo) list.remove(0); listIntegral = list; } int register = Integer.valueOf(converNull(request.getParameter("register5"), "0")); int punish = Integer.valueOf(converNull(request.getParameter("punish5"), "0")); int backorder = Integer.valueOf(converNull(request.getParameter("backorder5"), "0")); int weborder = Integer.valueOf(converNull(request.getParameter("weborder5"), "0")); for (Integral integral : listIntegral) { long type = integral.getAgenttype(); System.out.println(request.getParameter("aircoeft" + type)); float aircoeft = Float.valueOf(converNull(request.getParameter("aircoeft" + type), "0")); // float hotelcoeft=Float.valueOf(converNull(request.getParameter("hotelcoeft"+type),"0")); // float travelcoeft=Float.valueOf(converNull(request.getParameter("travelcoeft"+type),"0")); // float // carrentalcoeft=Float.valueOf(converNull(request.getParameter("carrentalcoeft"+type),"0")); // float // rechargecoeft=Float.valueOf(converNull(request.getParameter("rechargecoeft"+type),"0")); integral.setAircoeft(aircoeft); // integral.setHotelcoeft(hotelcoeft); // integral.setTravelcoeft(travelcoeft); // integral.setCarrentalcoeft(carrentalcoeft); // integral.setRechargecoeft(rechargecoeft); integral.setRegisterscore(register); integral.setPunishscore(punish); integral.setBackorderscore(backorder); integral.setWeborderscore(weborder); Server.getInstance().getMemberService().updateIntegralIgnoreNull(integral); } return this.execute(); }
/** 转向到积分管理审核页面 */ public String tocheck() throws Exception { integral = Server.getInstance().getMemberService().findIntegral(integral.getId()); return CHECK; }
/** 转向到积分管理修改页面 */ public String toedit() throws Exception { integral = Server.getInstance().getMemberService().findIntegral(integral.getId()); return EDIT; }
/** 删除积分管理 */ public String delete() throws Exception { Server.getInstance().getMemberService().deleteIntegral(integral.getId()); return LIST; }