private string getCondPlayerScore(ParamMemberInfo p, GMUser user) { string cond; if (p.isSearchAll()) // 搜索所有的 { string createCode = ""; if (string.IsNullOrEmpty(p.m_creator)) { createCode = ItemHelp.getCreateCodeSpecial(user); } else { createCode = ItemHelp.getCreateCode(p.m_creator, user); } cond = string.Format(" opSrcCreateCode like '{0}%' ", createCode); } else // 直接下级 { if (string.IsNullOrEmpty(p.m_creator)) { cond = string.Format(" opSrc='{0}' ", getAccountSpecial(user)); } else { cond = string.Format(" opSrc='{0}' and opSrcCreateCode like '{1}%' ", p.m_creator, ItemHelp.getCreateCodeSpecial(user)); } } return(cond); }
// 返回条件 protected override string getCondition(ParamMemberInfo p, GMUser user) { string cond = ""; if (p.isSearchAll()) // 搜索所有的下级代理下下级代理...所创建的玩家的输赢情况 { string createCode = ""; string parent = null; if (string.IsNullOrEmpty(p.m_creator)) { createCode = ItemHelp.getCreateCodeSpecial(user); parent = user.m_user; } else { createCode = ItemHelp.getCreateCode(p.m_creator, user); parent = p.m_creator; } if (p.isIncludeDirectlyPlayer()) { cond = string.Format(" playerCreateCode like '{0}%' ", createCode); } else { cond = string.Format(" playerCreateCode like '{0}%' and playerCreator<>'{1}' ", createCode, parent); } } else // 直属会员 { if (string.IsNullOrEmpty(p.m_creator)) { cond = string.Format(" playerCreator='{0}' ", getAccountSpecial(user)); } else { cond = string.Format(" playerCreator='{0}' and playerCreateCode like '{1}%' ", p.m_creator, ItemHelp.getCreateCodeSpecial(user)); } } return(cond); }
private string getCondGm(ParamMemberInfo p, GMUser user) { string cond = ""; string parentAcc = ""; int depth = 0; if (p.isSearchAll()) // 搜索所有的 { string createCode = ""; if (string.IsNullOrEmpty(p.m_creator)) { createCode = ItemHelp.getCreateCodeSpecial(user); parentAcc = getAccountSpecial(user); } else { createCode = ItemHelp.getCreateCode(p.m_creator, user); parentAcc = p.m_creator; } if (p.m_subAcc == 2) // 只搜索子账号 { cond = string.Format(" createCode like '{0}%' and depth={1} ", createCode, user.m_depth); } else { cond = string.Format(" createCode like '{0}%' and depth>{1} ", createCode, user.m_depth); } /* if (p.m_subAcc == 1) // 不包括子账号 * { * cond = string.Format(" createCode like '{0}%' and acc<>'{1}' and accType<>{2} ", * createCode, parentAcc, AccType.ACC_AGENCY_SUB); * } * else if (p.m_subAcc == 2) // 只搜索子账号 * { * cond = string.Format(" createCode like '{0}%' and acc<>'{1}' and accType={2} ", * createCode, parentAcc, AccType.ACC_AGENCY_SUB); * } * else * { * cond = string.Format(" createCode like '{0}%' and acc<>'{1}' ", createCode, parentAcc); * }*/ } else // 直接下级 { if (string.IsNullOrEmpty(p.m_creator)) { cond = string.Format(" owner='{0}' ", getAccountSpecial(user)); depth = user.m_depth; } else { cond = string.Format(" owner='{0}' and createCode like '{1}%' ", p.m_creator, ItemHelp.getCreateCodeSpecial(user)); depth = p.m_creatorDepth; } if (p.m_subAcc == 2) // 只搜索子账号 { // cond += string.Format(" and accType={0} ", AccType.ACC_AGENCY_SUB); cond += string.Format(" and depth={0} ", depth); } else { // cond += string.Format(" and depth>{0} ", depth); cond += string.Format(" and accType<>{0} and accType<>{1} and accType<>{2} ", AccType.ACC_AGENCY_SUB, AccType.ACC_API_ADMIN, AccType.ACC_SUPER_ADMIN_SUB); } /*if (p.m_subAcc == 1) // 不包括子账号 * { * cond += string.Format(" and accType<>{0} ", AccType.ACC_AGENCY_SUB); * } * else if (p.m_subAcc == 2) // 只搜索子账号 * { * cond += string.Format(" and accType={0} ", AccType.ACC_AGENCY_SUB); * }*/ } return(cond); }