public TradeAuth get(TradeAuth tradeAuth) { this.logger.debug("tradeAuth"); QueryConditions qc = new QueryConditions(); qc.addCondition("primary.firmId", "=", tradeAuth.getFirmId()); qc.addCondition("primary.commodityId", "=", tradeAuth.getCommodityId()); List<TradeAuth> list = this.memberTradeAuthDao.getList(qc, null); TradeAuth returnMargin = null; if ((list != null) && (list.size() > 0)) { returnMargin = new TradeAuth(); returnMargin = (TradeAuth) list.get(0); } else { returnMargin = null; } return returnMargin; }
public String relatedRightForward() { this.logger.debug("enter relatedRight"); Map<String, Object> map = EcsideUtil.getQurey(this.request, "", new Boolean(false).booleanValue()); QueryConditions qc = getQueryConditions(map); String userId = this.request.getParameter("userId"); User user = this.userService.loadUserById(userId, false, true, false); String logonIdString = AclCtrl.getLogonID(this.request); User logonUser = this.userService.loadUserById(logonIdString, false, true, false); boolean flag = false; for (Role role : logonUser.getRoleSet()) { if (role.getType().equals(ActionConstant.DEF_SUPERADMIN)) { flag = true; } } if (!flag) { this.request.setAttribute("roleList", logonUser.getOperateRoleSet()); } else { qc.addCondition( "primary.memberNo", "=", this.request.getSession().getAttribute(ActionConstant.REGISTERID)); List<Role> roleList = this.roleService.getList(qc, null); this.request.setAttribute("roleList", roleList); } this.request.setAttribute("user", user); this.request.setAttribute( "ISSUPTERADMIN", this.request.getSession().getAttribute("ISSUPERADMIN")); return getReturnValue(); }
public String relatedRight() { this.logger.debug("enter relatedRight"); String userId = this.request.getParameter("userId"); Map<String, Object> map = EcsideUtil.getQurey(this.request, "", new Boolean(false).booleanValue()); QueryConditions qc = getQueryConditions(map); String[] cksString = this.request.getParameterValues("ck"); String[] operateCks = this.request.getParameterValues("operateCk"); qc.addCondition( "primary.memberNo", "=", this.request.getSession().getAttribute(ActionConstant.REGISTERID)); List<List<String>> inStrings = this.userService.getRelatedIds( userId, AclCtrl.getLogonID(this.request), cksString, qc, operateCks); int value = this.userService.relatedRight( userId, AclCtrl.getLogonID(this.request), inStrings, (String) this.request.getSession().getAttribute(ActionConstant.REGISTERID)); addResultMsg(this.request, value); return getReturnValue(); }