MerchantQueryCondition condition = new MerchantQueryCondition(); condition.setSolutionId(getSolutionId()); ListmerchantList = merchantService.getMerchantList(condition); List merIds = merchantList.stream().map(Merchant::getMerchantId).distinct().collect(Collectors.toList()); if (merIds.size()>0) { req.setMerIds(merIds); }
处理为单引号作为in的查询条件
ListstrArray = req.getMerIds(); String str = String.join("','", strArray); String str2 = "('" + str + "')"; String value = String.format("and dimension in %s ", str2);
sql语句为
SELECt* FROM payment_pri_domain_white_list WHERe 1 = 1 AND dimension IN ('H1001100002226','H1001100003851','H1001100003877' )
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)