use of com.itrus.portal.db.ServiceNameExample in project portal by ixinportal.
the class ServiceNameServiceImpl method checkValidCertificationCharging.
/**
* 如果该CertificationCharging下所有的ServiceName都已经无效了.那么就不校验改CertificationCharging
* 校验该CertificationCharging
* @param ccList
* @return
*/
private List<CertificationCharging> checkValidCertificationCharging(List<CertificationCharging> ccList) {
if (null == ccList || ccList.size() == 0) {
return ccList;
}
Iterator<CertificationCharging> iterator = ccList.iterator();
while (iterator.hasNext()) {
CertificationCharging certificationCharging = iterator.next();
ServiceNameExample serviceNameExample = new ServiceNameExample();
ServiceNameExample.Criteria criteria = serviceNameExample.or();
criteria.andCertificationChargingEqualTo(certificationCharging.getId());
criteria.andIsValidityEqualTo(true);
List<ServiceName> serviceNames = selectListByExample(serviceNameExample);
if (null == serviceNames || serviceNames.size() == 0) {
iterator.remove();
}
}
return ccList;
}
use of com.itrus.portal.db.ServiceNameExample in project portal by ixinportal.
the class ServiceNameServiceImpl method getServiceNamesByCertificationCharging.
/**
* 根据输入的条件,获取serviceNameList
*
* @param certificationChargingId
* @param certificationServiceId
* @return
*/
public List<ServiceName> getServiceNamesByCertificationCharging(Long certificationChargingId, Long certificationServiceId, boolean isValidity) {
List<ServiceName> list = new ArrayList<ServiceName>();
ServiceNameExample serviceNameExample = new ServiceNameExample();
ServiceNameExample.Criteria criteria = serviceNameExample.or();
if (null != certificationChargingId) {
criteria.andCertificationChargingEqualTo(certificationChargingId);
}
if (null != certificationServiceId) {
criteria.andCertificationServiceIdEqualTo(certificationServiceId);
}
criteria.andIsValidityEqualTo(isValidity);
list = sqlSession.selectList("com.itrus.portal.db.ServiceNameMapper.selectByExample", serviceNameExample);
return list;
}
use of com.itrus.portal.db.ServiceNameExample in project portal by ixinportal.
the class TakeServiceNameServiceImpl method selectListByCertificationCharging.
/**
* 取出所有属于该计费规则的服务名称
*
* @param certificationCharging
* @return
*/
public List<ServiceName> selectListByCertificationCharging(CertificationCharging certificationChargings) {
List<ServiceName> list = new ArrayList<ServiceName>();
ServiceNameExample serviceNameExample = new ServiceNameExample();
ServiceNameExample.Criteria criteria = serviceNameExample.or();
criteria.andCertificationChargingEqualTo(certificationChargings.getId());
list = sqlSession.selectList("com.itrus.portal.db.ServiceNameMapper.selectByExample", serviceNameExample);
return list;
}
use of com.itrus.portal.db.ServiceNameExample in project portal by ixinportal.
the class TakeServiceNameServiceImpl method getServiceNamesByCertificationCharging.
/**
* 根据输入的条件,获取serviceNameList
*
* @param certificationChargingId
* @param certificationServiceId
* @return
*/
public List<ServiceName> getServiceNamesByCertificationCharging(Long certificationChargingId, Long certificationServiceId, boolean isValidity) {
List<ServiceName> list = new ArrayList<ServiceName>();
ServiceNameExample serviceNameExample = new ServiceNameExample();
ServiceNameExample.Criteria criteria = serviceNameExample.or();
if (null != certificationChargingId) {
criteria.andCertificationChargingEqualTo(certificationChargingId);
}
if (null != certificationServiceId) {
criteria.andCertificationServiceIdEqualTo(certificationServiceId);
}
criteria.andIsValidityEqualTo(isValidity);
list = sqlSession.selectList("com.itrus.portal.db.ServiceNameMapper.selectByExample", serviceNameExample);
return list;
}
use of com.itrus.portal.db.ServiceNameExample in project portal by ixinportal.
the class TakeServiceNameServiceImpl method selectListByCertificationChargings.
/**
* 取出所有属于该计费规则的服务名称
*
* @param certificationCharging
* @return
*/
public List<ServiceName> selectListByCertificationChargings(List<CertificationCharging> certificationChargings) {
List<Long> ccIdList = new ArrayList<Long>();
for (int i = 0; i < certificationChargings.size(); i++) {
ccIdList.add(certificationChargings.get(i).getId());
}
List<ServiceName> list = new ArrayList<ServiceName>();
ServiceNameExample serviceNameExample = new ServiceNameExample();
ServiceNameExample.Criteria criteria = serviceNameExample.or();
criteria.andCertificationChargingIn(ccIdList);
list = sqlSession.selectList("com.itrus.portal.db.ServiceNameMapper.selectByExample", serviceNameExample);
return list;
}
Aggregations