Search in sources :

Example 1 with MobileAppserviceNameExample

use of com.itrus.portal.db.MobileAppserviceNameExample in project portal by ixinportal.

the class MobileAppserviceNameService method checkValidAppserviceCharging.

/**
 * 如果该MobileAppserviceCharging下所有的MobileAppserviceName都已经无效了.那么就不校验改MobileAppserviceCharging
 * 校验该MobileAppserviceCharging
 * @param ccList
 * @return
 */
private List<MobileAppserviceCharging> checkValidAppserviceCharging(List<MobileAppserviceCharging> acList) {
    if (null == acList || acList.size() == 0) {
        return acList;
    }
    Iterator<MobileAppserviceCharging> iterator = acList.iterator();
    while (iterator.hasNext()) {
        MobileAppserviceCharging appserviceCharging = iterator.next();
        MobileAppserviceNameExample appserviceNameExample = new MobileAppserviceNameExample();
        MobileAppserviceNameExample.Criteria criteria = appserviceNameExample.or();
        criteria.andAppserviceChargingEqualTo(appserviceCharging.getId());
        criteria.andIsValidityEqualTo(true);
        List<MobileAppserviceName> appserviceNames = selectListByExample(appserviceNameExample);
        if (null == appserviceNames || appserviceNames.size() == 0) {
            iterator.remove();
        }
    }
    return acList;
}
Also used : MobileAppserviceCharging(com.itrus.portal.db.MobileAppserviceCharging) MobileAppserviceName(com.itrus.portal.db.MobileAppserviceName) MobileAppserviceNameExample(com.itrus.portal.db.MobileAppserviceNameExample)

Example 2 with MobileAppserviceNameExample

use of com.itrus.portal.db.MobileAppserviceNameExample in project portal by ixinportal.

the class MobileAppserviceNameService method getAppserviceNamesByAppserviceCharging.

/**
 * 根据输入的条件,获取MobileAppserviceNameList
 *
 * @param appserviceChargingId
 * @return
 */
public List<MobileAppserviceName> getAppserviceNamesByAppserviceCharging(Long appserviceChargingId, boolean isValidity) {
    List<MobileAppserviceName> list = new ArrayList<MobileAppserviceName>();
    MobileAppserviceNameExample appserviceNameExample = new MobileAppserviceNameExample();
    MobileAppserviceNameExample.Criteria criteria = appserviceNameExample.or();
    if (null != appserviceChargingId) {
        criteria.andAppserviceChargingEqualTo(appserviceChargingId);
    }
    criteria.andIsValidityEqualTo(isValidity);
    list = sqlSession.selectList("com.itrus.portal.db.MobileAppserviceNameMapper.selectByExample", appserviceNameExample);
    return list;
}
Also used : MobileAppserviceName(com.itrus.portal.db.MobileAppserviceName) ArrayList(java.util.ArrayList) MobileAppserviceNameExample(com.itrus.portal.db.MobileAppserviceNameExample)

Example 3 with MobileAppserviceNameExample

use of com.itrus.portal.db.MobileAppserviceNameExample in project portal by ixinportal.

the class MobileAppserviceNameService method selectListByAppserviceCharging.

/**
 * 取出所有属于该计费规则的服务名称
 *
 * @param certificationCharging
 * @return
 */
public List<MobileAppserviceName> selectListByAppserviceCharging(MobileAppserviceCharging appserviceChargings) {
    List<MobileAppserviceName> list = new ArrayList<MobileAppserviceName>();
    MobileAppserviceNameExample appserviceNameExample = new MobileAppserviceNameExample();
    MobileAppserviceNameExample.Criteria criteria = appserviceNameExample.or();
    criteria.andAppserviceChargingEqualTo(appserviceChargings.getId());
    list = sqlSession.selectList("com.itrus.portal.db.MobileAppserviceNameMapper.selectByExample", appserviceNameExample);
    return list;
}
Also used : MobileAppserviceName(com.itrus.portal.db.MobileAppserviceName) ArrayList(java.util.ArrayList) MobileAppserviceNameExample(com.itrus.portal.db.MobileAppserviceNameExample)

Example 4 with MobileAppserviceNameExample

use of com.itrus.portal.db.MobileAppserviceNameExample in project portal by ixinportal.

the class MobileAppserviceNameService method selectListByCertificationChargingId.

public List<MobileAppserviceName> selectListByCertificationChargingId(Long CertificationChargingId) {
    List<MobileAppserviceName> list = new ArrayList<MobileAppserviceName>();
    MobileAppserviceNameExample serviceNameExample = new MobileAppserviceNameExample();
    MobileAppserviceNameExample.Criteria criteria = serviceNameExample.or();
    criteria.andAppserviceChargingEqualTo(CertificationChargingId);
    // criteria.andCertificationChargingEqualTo();
    criteria.andIsValidityEqualTo(true);
    list = sqlSession.selectList("com.itrus.portal.db.MobileAppserviceNameMapper.selectByExample", serviceNameExample);
    return list;
}
Also used : MobileAppserviceName(com.itrus.portal.db.MobileAppserviceName) ArrayList(java.util.ArrayList) MobileAppserviceNameExample(com.itrus.portal.db.MobileAppserviceNameExample)

Example 5 with MobileAppserviceNameExample

use of com.itrus.portal.db.MobileAppserviceNameExample in project portal by ixinportal.

the class MobileAppserviceNameService method selectListByCertificationChargings.

/**
 * 取出所有属于该计费规则的服务名称
 *
 * @param certificationCharging
 * @return
 */
public List<MobileAppserviceName> selectListByCertificationChargings(List<MobileAppserviceCharging> certificationChargings) {
    List<Long> ccIdList = new ArrayList<Long>();
    for (int i = 0; i < certificationChargings.size(); i++) {
        ccIdList.add(certificationChargings.get(i).getId());
    }
    List<MobileAppserviceName> list = new ArrayList<MobileAppserviceName>();
    MobileAppserviceNameExample serviceNameExample = new MobileAppserviceNameExample();
    MobileAppserviceNameExample.Criteria criteria = serviceNameExample.or();
    // criteria.andCertificationChargingIn(ccIdList);
    criteria.andAppserviceChargingIn(ccIdList);
    list = sqlSession.selectList("com.itrus.portal.db.MobileAppserviceNameMapper.selectByExample", serviceNameExample);
    return list;
}
Also used : MobileAppserviceName(com.itrus.portal.db.MobileAppserviceName) ArrayList(java.util.ArrayList) MobileAppserviceNameExample(com.itrus.portal.db.MobileAppserviceNameExample)

Aggregations

MobileAppserviceName (com.itrus.portal.db.MobileAppserviceName)5 MobileAppserviceNameExample (com.itrus.portal.db.MobileAppserviceNameExample)5 ArrayList (java.util.ArrayList)4 MobileAppserviceCharging (com.itrus.portal.db.MobileAppserviceCharging)1