Search in sources :

Example 1 with ChargingPriceExample

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

the class TakeChargingPriceServiceImpl method selectChargingPriceList.

/**
 * 获取该serviceName下属的所有计费规则,按照最大值降序排序
 * @param serviceName
 * @return
 */
public List<ChargingPrice> selectChargingPriceList(ServiceName serviceName) {
    ChargingPriceExample cpe = new ChargingPriceExample();
    ChargingPriceExample.Criteria criteria = cpe.or();
    criteria.andCertificationChargingEqualTo(serviceName.getCertificationCharging());
    criteria.andServiceNameEqualTo(serviceName.getId());
    cpe.setOrderByClause("maximum_number desc");
    List<ChargingPrice> list = sqlSession.selectList("com.itrus.portal.db.ChargingPriceMapper.selectByExample", cpe);
    return list;
}
Also used : ChargingPriceExample(com.itrus.portal.db.ChargingPriceExample) ChargingPrice(com.itrus.portal.db.ChargingPrice)

Example 2 with ChargingPriceExample

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

the class StoreChargingPriceServiceImpl method selectListByServiceNames.

/**
 * 根据serviceName,获取对应的计费以及价格区间
 *
 * @param serviceNames
 * @return
 */
public List<ChargingPrice> selectListByServiceNames(List<ServiceName> serviceNames) {
    List<Long> serviceNamesId = new ArrayList<Long>();
    for (int i = 0; i < serviceNames.size(); i++) {
        serviceNamesId.add(serviceNames.get(i).getId());
    }
    List<ChargingPrice> list = new ArrayList<ChargingPrice>();
    ChargingPriceExample chargingPriceExample = new ChargingPriceExample();
    ChargingPriceExample.Criteria criteria = chargingPriceExample.or();
    criteria.andServiceNameIn(serviceNamesId);
    list = sqlSession.selectList("com.itrus.portal.db.ChargingPriceMapper.selectByExample", chargingPriceExample);
    return list;
}
Also used : ChargingPriceExample(com.itrus.portal.db.ChargingPriceExample) ArrayList(java.util.ArrayList) ChargingPrice(com.itrus.portal.db.ChargingPrice)

Example 3 with ChargingPriceExample

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

the class StoreChargingPriceServiceImpl method selectList.

public List<ChargingPrice> selectList() {
    List<ChargingPrice> list = new ArrayList<ChargingPrice>();
    ChargingPriceExample chargingPriceExample = new ChargingPriceExample();
    ChargingPriceExample.Criteria criteria = chargingPriceExample.or();
    list = sqlSession.selectList("com.itrus.portal.db.ChargingPriceMapper.selectByExample", chargingPriceExample);
    return list;
}
Also used : ChargingPriceExample(com.itrus.portal.db.ChargingPriceExample) ArrayList(java.util.ArrayList) ChargingPrice(com.itrus.portal.db.ChargingPrice)

Example 4 with ChargingPriceExample

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

the class StoreChargingPriceServiceImpl method selectListByOneServiceName.

/**
 * 根据serviceName,获取对应的计费以及价格区间
 *
 * @param serviceNames
 * @return
 */
public List<ChargingPrice> selectListByOneServiceName(ServiceName serviceName) {
    List<ChargingPrice> list = new ArrayList<ChargingPrice>();
    ChargingPriceExample chargingPriceExample = new ChargingPriceExample();
    ChargingPriceExample.Criteria criteria = chargingPriceExample.or();
    criteria.andServiceNameEqualTo(serviceName.getId());
    chargingPriceExample.setOrderByClause("minimum_number asc");
    list = sqlSession.selectList("com.itrus.portal.db.ChargingPriceMapper.selectByExample", chargingPriceExample);
    return list;
}
Also used : ChargingPriceExample(com.itrus.portal.db.ChargingPriceExample) ArrayList(java.util.ArrayList) ChargingPrice(com.itrus.portal.db.ChargingPrice)

Example 5 with ChargingPriceExample

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

the class StoreChargingPriceServiceImpl method selectChargingPriceList.

/**
 * 获取该serviceName下属的所有计费规则,按照最大值降序排序
 * @param serviceName
 * @return
 */
public List<ChargingPrice> selectChargingPriceList(ServiceName serviceName) {
    ChargingPriceExample cpe = new ChargingPriceExample();
    ChargingPriceExample.Criteria criteria = cpe.or();
    criteria.andCertificationChargingEqualTo(serviceName.getCertificationCharging());
    criteria.andServiceNameEqualTo(serviceName.getId());
    cpe.setOrderByClause("maximum_number desc");
    List<ChargingPrice> list = sqlSession.selectList("com.itrus.portal.db.ChargingPriceMapper.selectByExample", cpe);
    return list;
}
Also used : ChargingPriceExample(com.itrus.portal.db.ChargingPriceExample) ChargingPrice(com.itrus.portal.db.ChargingPrice)

Aggregations

ChargingPrice (com.itrus.portal.db.ChargingPrice)15 ChargingPriceExample (com.itrus.portal.db.ChargingPriceExample)15 ArrayList (java.util.ArrayList)12