use of com.itrus.portal.db.OnlinePayExample in project portal by ixinportal.
the class OnlinePayServiceImpl method removeOnlinePayWinthClientFw.
/**
* 移除服务型客户的在线支付,只返回不属于服务型客户的在线支付,即:web支付
* @return
*/
public String[] removeOnlinePayWinthClientFw(String[] onpay) {
String ClientFwPayConfigId = systemConfigService.getClientfwPayConfigIds();
if (StringUtils.isNotBlank(ClientFwPayConfigId)) {
String[] ClientFwPayConfigIds = ClientFwPayConfigId.split(",");
List<Long> payConfigIds = new ArrayList<>();
for (String string : ClientFwPayConfigIds) {
payConfigIds.add(Long.valueOf(string));
}
OnlinePayExample example = new OnlinePayExample();
OnlinePayExample.Criteria criteria = example.or();
criteria.andPayConfigIn(payConfigIds);
List<OnlinePay> onlinePayList = selectByExample(example);
if (null == onlinePayList || onlinePayList.isEmpty()) {
return onpay;
}
List<Long> onlinePayIds = new ArrayList<>();
for (OnlinePay onlinePay : onlinePayList) {
onlinePayIds.add(onlinePay.getId());
}
List<String> newOnpayList = new ArrayList<>();
for (String string : onpay) {
if (!onlinePayIds.contains(Long.valueOf(string))) {
newOnpayList.add(string);
}
}
String[] strings = new String[newOnpayList.size()];
return newOnpayList.toArray(strings);
} else {
return onpay;
}
}
Aggregations