|
|
@@ -123,9 +123,11 @@ public class ExpertInviteManage { |
|
|
|
* @param rule 随机邀请规则 |
|
|
|
*/ |
|
|
|
private static void addRegionLimit(LambdaQueryWrapper<ExpertUserFullInfo> query, RandomInviteRuleDTO rule) { |
|
|
|
if (ObjectUtils.allNotNull(rule.getExpertRegionCode(), rule.getExpertRegionLevel())) { |
|
|
|
query.eq(ExpertUserFullInfo::getRegionCode, rule.getExpertRegionCode()); |
|
|
|
query.eq(ExpertUserFullInfo::getRegionLevel, rule.getExpertRegionLevel()); |
|
|
|
if (CollUtil.isNotEmpty(rule.getExpertRegionList())) { |
|
|
|
String inSqlParam = rule.getExpertRegionList().stream() |
|
|
|
.map(w -> "('" + w.getRegionCode() + "'," + w.getRegionLevel() + ")") |
|
|
|
.collect(Collectors.joining(",", "(", ")")); |
|
|
|
query.apply("(region_code, region_level) in " + inSqlParam); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|