use of com.itrus.portal.db.ChargingPriceExample in project portal by ixinportal.
the class TakeChargingPriceServiceImpl method selectListByServiceName.
/**
* 获取该服务下的有效的计费价格区间(最大值大于total,按照最小值升序排序)
*
* @param serviceName
* @return
*/
public List<ChargingPrice> selectListByServiceName(ServiceName serviceName) {
List<ChargingPrice> list = new ArrayList<ChargingPrice>();
ChargingPriceExample chargingPriceExample = new ChargingPriceExample();
ChargingPriceExample.Criteria criteria = chargingPriceExample.or();
criteria.andServiceNameEqualTo(serviceName.getId());
criteria.andMaximumNumberGreaterThan(serviceName.getTotalNumber());
chargingPriceExample.setOrderByClause("minimum_number asc");
list = sqlSession.selectList("com.itrus.portal.db.ChargingPriceMapper.selectByExample", chargingPriceExample);
return list;
}
use of com.itrus.portal.db.ChargingPriceExample in project portal by ixinportal.
the class TakeChargingPriceServiceImpl 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;
}
use of com.itrus.portal.db.ChargingPriceExample in project portal by ixinportal.
the class TakeChargingPriceServiceImpl 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;
}
use of com.itrus.portal.db.ChargingPriceExample in project portal by ixinportal.
the class TakeChargingPriceServiceImpl 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;
}
use of com.itrus.portal.db.ChargingPriceExample in project portal by ixinportal.
the class StoreChargingPriceServiceImpl method selectListByServiceName.
/**
* 获取该服务下的有效的计费价格区间(最大值大于total,按照最小值升序排序)
*
* @param serviceName
* @return
*/
public List<ChargingPrice> selectListByServiceName(ServiceName serviceName) {
List<ChargingPrice> list = new ArrayList<ChargingPrice>();
ChargingPriceExample chargingPriceExample = new ChargingPriceExample();
ChargingPriceExample.Criteria criteria = chargingPriceExample.or();
criteria.andServiceNameEqualTo(serviceName.getId());
criteria.andMaximumNumberGreaterThan(serviceName.getTotalNumber());
chargingPriceExample.setOrderByClause("minimum_number asc");
list = sqlSession.selectList("com.itrus.portal.db.ChargingPriceMapper.selectByExample", chargingPriceExample);
return list;
}
Aggregations