use of com.itrus.portal.db.EnterpriseExample in project portal by ixinportal.
the class BillServiceImpl method getEnterpriseMapByUserInfoId.
/**
* 根据用户id查询订单表中对应的企业Map
*
* @param userInfo
* @return
*/
public Map<Long, Enterprise> getEnterpriseMapByUserInfoId(Long userInfo) {
Map<Long, Enterprise> enterpriseMap = new HashMap<Long, Enterprise>();
List<Long> enterpriseIds = sqlSession.selectList("com.itrus.portal.db.BillMapper.selectEnterprisesByUserInfo", userInfo);
if (null != enterpriseIds && !enterpriseIds.isEmpty()) {
EnterpriseExample example = new EnterpriseExample();
EnterpriseExample.Criteria criteria = example.or();
criteria.andIdIn(enterpriseIds);
enterpriseMap = sqlSession.selectMap("com.itrus.portal.db.EnterpriseMapper.selectByExample", example, "id");
}
return enterpriseMap;
}
Aggregations