use of com.itrus.portal.db.Product in project portal by ixinportal.
the class ProductServiceImpl method getProductByproName.
/**
* 根据产品缩写获取产品
*
* @param productId
* @return
*/
public Product getProductByproName(String proName) {
ProductExample example = new ProductExample();
ProductExample.Criteria criteria = example.or();
criteria.andProNameEqualTo(proName);
Product product = sqlSession.selectOne("com.itrus.portal.db.ProductMapper.selectByExample", example);
return product;
}
use of com.itrus.portal.db.Product in project portal by ixinportal.
the class ProductServiceImpl method getProductById.
/**
* 根据产品ID获取产品
*
* @param productId
* @return
*/
public Product getProductById(Long productId) {
ProductExample example = new ProductExample();
ProductExample.Criteria criteria = example.or();
criteria.andIdEqualTo(productId);
Product product = sqlSession.selectOne("com.itrus.portal.db.ProductMapper.selectByExample", example);
return product;
}
use of com.itrus.portal.db.Product in project portal by ixinportal.
the class ProductServiceImpl method getRenewProduct.
/**
* 查询证书所属的产品
*
* @param raId
* @param projectId
* @param type
* 业务类型(更新、初购)
* @return
*/
public Product getRenewProduct(Long raId, Long projectId, String type, String certDn) {
List<Product> productList = new ArrayList<Product>();
ProductExample example = new ProductExample();
ProductExample.Criteria criteria = example.or();
criteria.andRaEqualTo(raId);
if (null != projectId)
criteria.andProjectEqualTo(projectId);
if (StringUtils.isNotBlank(type))
criteria.andTypeEqualTo(type);
example.setOrderByClause("create_time desc");
productList = sqlSession.selectList("com.itrus.portal.db.ProductMapper.selectByExample", example);
return getProductByCertUid(productList, certDn);
}
use of com.itrus.portal.db.Product in project portal by ixinportal.
the class ProductServiceImpl method getProductByRa.
/**
* 查询配置了某个ra的最新产品
*
* @param raId
* @return
*/
public Product getProductByRa(Long raId) {
ProductExample example = new ProductExample();
ProductExample.Criteria criteria = example.or();
criteria.andRaEqualTo(raId);
example.setOrderByClause("create_time desc");
example.setLimit(1);
Product product = sqlSession.selectOne("com.itrus.portal.db.ProductMapper.selectByExample", example);
return product;
}
use of com.itrus.portal.db.Product in project portal by ixinportal.
the class ProductServiceImpl method getProductByOldProductId.
/**
* 根据产品id,获取该产品对应的更新产品
*
* @param oldProductId
* @return
*/
public Product getProductByOldProductId(Long oldProductId, String type) {
ProductExample example = new ProductExample();
ProductExample.Criteria criteria = example.or();
criteria.andOldProNameEqualTo(oldProductId);
criteria.andTypeEqualTo(type);
example.setOrderByClause("create_time desc");
example.setLimit(1);
Product product = sqlSession.selectOne("com.itrus.portal.db.ProductMapper.selectByExample", example);
return product;
}
Aggregations