use of com.itrus.portal.db.ProductExample in project portal by ixinportal.
the class RegisterController method register.
@RequestMapping(value = "/s/{name}")
public String register(@PathVariable("name") String name, @RequestParam(value = "login", required = false) String login, HttpSession session, Model uiModel) {
ProductExample productExample = new ProductExample();
ProductExample.Criteria pe = productExample.createCriteria();
pe.andProNameEqualTo(name);
Product product = sqlSession.selectOne("com.itrus.portal.db.ProductMapper.selectByExample", productExample);
// return
// "forward:/userInfoWeb/zhuce.html?projectId="+product.getProject()+"&productId="+product.getId();
Project project = sqlSession.selectOne("com.itrus.portal.db.ProjectMapper.selectByPrimaryKey", product.getProject());
uiModel.addAttribute("projectId", product.getProject());
uiModel.addAttribute("productId", product.getId());
uiModel.addAttribute("productName", product.getName());
uiModel.addAttribute("projectName", project.getName());
if (StringUtils.isNotBlank(login) && login.equals("1")) {
List<String> allIssUerDn = new ArrayList<String>();
allIssUerDn = sqlSession.selectList("com.itrus.portal.db.CrlContextMapper.selectAllIssUerDn");
try {
uiModel.addAttribute("allIssUerDn", jsonTool.writeValueAsString(allIssUerDn));
// 返回随机数
String random = UniqueIDUtils.genUUID();
uiModel.addAttribute("random", random);
session.setAttribute("webrandom", random);
} catch (JsonGenerationException e) {
e.printStackTrace();
} catch (JsonMappingException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return "ixinweb/denglu2";
}
if (null != product.getIsBan() && product.getIsBan() == true) {
EnterpriseQqExample enterprise1 = new EnterpriseQqExample();
EnterpriseQqExample.Criteria qqEx = enterprise1.createCriteria();
qqEx.andProjectIdEqualTo(product.getProject());
EnterpriseQq enterpriseqq = sqlSession.selectOne("com.itrus.portal.db.EnterpriseQqMapper.selectByExample", enterprise1);
if (enterpriseqq != null && enterpriseqq.getEnterpriseQq() != null) {
uiModel.addAttribute("enterpriseqq", enterpriseqq.getEnterpriseQqLinks());
}
// 产品已经下架
return "ixinweb/chanpinxiajia";
}
return "ixinweb/zhuce";
}
use of com.itrus.portal.db.ProductExample in project portal by ixinportal.
the class HomeController method register.
// @RequestMapping(value = "/s/{name}")
public String register(@PathVariable("name") String name, @RequestParam(value = "login", required = false) String login, HttpSession session, Model uiModel) {
ProductExample productExample = new ProductExample();
ProductExample.Criteria pe = productExample.createCriteria();
pe.andProNameEqualTo(name);
Product product = sqlSession.selectOne("com.itrus.portal.db.ProductMapper.selectByExample", productExample);
// return
// "forward:/userInfoWeb/zhuce.html?projectId="+product.getProject()+"&productId="+product.getId();
uiModel.addAttribute("projectId", product.getProject());
uiModel.addAttribute("productId", product.getId());
if (StringUtils.isNotBlank(login) && login.equals("1")) {
List<String> allIssUerDn = new ArrayList<String>();
allIssUerDn = sqlSession.selectList("com.itrus.portal.db.CrlContextMapper.selectAllIssUerDn");
try {
uiModel.addAttribute("allIssUerDn", jsonTool.writeValueAsString(allIssUerDn));
// 返回随机数
String random = UniqueIDUtils.genUUID();
uiModel.addAttribute("random", random);
session.setAttribute("webrandom", random);
} catch (JsonGenerationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (JsonMappingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "ixinweb/denglu2";
}
if (null != product.getIsBan() && product.getIsBan() == true) {
EnterpriseQqExample enterprise = new EnterpriseQqExample();
EnterpriseQqExample.Criteria qqEx = enterprise.createCriteria();
qqEx.andProjectIdEqualTo(product.getProject());
EnterpriseQq enterpriseqq = sqlSession.selectOne("com.itrus.portal.db.EnterpriseQqMapper.selectByExample", enterprise);
uiModel.addAttribute("enterpriseqq", enterpriseqq.getEnterpriseQqLinks());
// 产品已经下架
return "ixinweb/chanpinxiajia";
}
return "ixinweb/zhuce";
}
use of com.itrus.portal.db.ProductExample in project portal by ixinportal.
the class SubmitReviewServiceImpl method getAuditProduct.
/**
* 获取需要送审的产品
*
* @return
*/
public List<Product> getAuditProduct() {
List<Product> productList = new ArrayList<Product>();
ProductExample example = new ProductExample();
ProductExample.Criteria criteria = example.or();
criteria.andIsAuthEqualTo(true);
criteria.andAppIdIsNotNull();
criteria.andAppsecretIsNotNull();
productList = sqlSession.selectList("com.itrus.portal.db.ProductMapper.selectByExample", example);
return productList;
}
use of com.itrus.portal.db.ProductExample 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.ProductExample 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;
}
Aggregations