use of com.itrus.portal.db.ReviewLog in project portal by ixinportal.
the class BillWebController method reNewCertConfirm.
// 订单详情,待更新确认
@RequestMapping(value = "/reNewCertConfirm/{id}", produces = "text/html")
public String reNewCertConfirm(@PathVariable("id") Long id, HttpServletRequest request, Model uiModel) {
HttpSession session = request.getSession();
UserInfo userInfo = (UserInfo) session.getAttribute("webuserInfo");
Enterprise enterprise = (Enterprise) session.getAttribute("webenterprise");
if (null == userInfo || null == enterprise) {
return "redirect:/userInfoWeb/denglu.html";
}
// 审核记录
ReviewLog reviewLog = reviewLogService.getReviewLog(id);
if (reviewLog != null) {
uiModel.addAttribute("reviewLog", reviewLog);
}
Map param = new HashMap();
// 设置查询条件,选择属于当前用户,当前企业的订单
param.put("id", id);
// param.put("userinfoid", userInfo.getId());
// param.put("enterpriseid", enterprise.getId());
List<Map> billAll = sqlSession.selectList("com.itrus.portal.db.BillMapper.selectProductBillCertById", param);
log.error("--------获取订单数量-------" + billAll.size() + "*****获取订单信息***" + billAll);
log.error("------获取订单id--------" + billAll.get(0).get("id"));
log.error("========获取订单编号=========" + billAll.get(0).get("bill_id"));
if (0 == billAll.size()) {
return "redirect:/userInfoWeb/denglu.html";
}
uiModel.addAttribute("bills", billAll.get(0));
// 获取数字证书
Product product = productService.getProduct((Long) billAll.get(0).get("product"));
log.error("****获取产品id*****" + product.getId());
DigitalCert digitalCert = digitalCertService.getDigitalCert(product.getCert());
// 获取订单在线支付方式
if (billAll.get(0).get("on_pay_info") != null) {
Map<Long, OnPayInfo> opiMap = sqlSession.selectMap("com.itrus.portal.db.OnPayInfoMapper.selectByExample", "id");
uiModel.addAttribute("opiMap", opiMap);
Map<Long, OnlinePay> opMap = sqlSession.selectMap("com.itrus.portal.db.OnlinePayMapper.selectByExample", "id");
uiModel.addAttribute("opMap", opMap);
}
PayInfoExample payInfoex = new PayInfoExample();
Map<Long, PayInfo> payinfoMap = sqlSession.selectMap("com.itrus.portal.db.PayInfoMapper.selectByExample", payInfoex, "id");
uiModel.addAttribute("payinfomap", payinfoMap);
// 获取产品规格
ProductSpec productSpec = null;
if (null != billAll.get(0).get("product_spec") && !"0".equals(billAll.get(0).get("product_spec"))) {
productSpec = productSpecService.getProductSpec((Long) billAll.get(0).get("product_spec"));
}
uiModel.addAttribute("productSpec", productSpec);
uiModel.addAttribute("digitalCert", digitalCert);
// 返回订单对应的老证书的base64
CertBuf certBuf = sqlSession.selectOne("com.itrus.portal.db.CertBufMapper.selectCertBufByBillId", id);
if (null != certBuf) {
uiModel.addAttribute("oldCertB64", certBuf.getCertBuf().replaceAll("\n", ""));
}
log.error("*********签章服务******" + product.getMakeSealServer());
// 判断是否有签章服务,有则显示授权
if (null != product.getMakeSealServer()) {
uiModel.addAttribute("makesealserver", product.getMakeSealServer());
uiModel.addAttribute("billId", billAll.get(0).get("id"));
// 签章服务配置
List<MakeSealConfig> makeSealConfigs = sqlSession.selectList("com.itrus.portal.db.MakeSealConfigMapper.selectByExample");
if (!makeSealConfigs.isEmpty()) {
MakeSealConfig makeSealConfig = makeSealConfigs.get(0);
try {
makeSealConfig.setAddressKey(AESencrp.decrypt(makeSealConfig.getAddressKey(), dbEncKey));
} catch (EncDecException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
uiModel.addAttribute("makeSealConfig", makeSealConfig);
}
}
return "ixinweb/dingdanxiangqing_gengxinqueren";
}
use of com.itrus.portal.db.ReviewLog in project portal by ixinportal.
the class DownLoadCertWebController method toPages.
/**
* 跳转到下载成功或失败页面 2016年11月3日 下午4:52:36
*
* @param id
* 订单id
* @param ret
* 参数 1 成功, 0失败
* @return 逻辑视图
*/
@RequestMapping(value = "/toPages/{id}", produces = "text/html")
public String toPages(@PathVariable("id") Long id, @RequestParam(value = "ret", required = false) int ret, HttpServletRequest request, Model uiModel) {
HttpSession session = request.getSession();
UserInfo userInfo = (UserInfo) session.getAttribute("webuserInfo");
Enterprise enterprise = (Enterprise) session.getAttribute("webenterprise");
if (null == userInfo || null == enterprise) {
return "redirect:/userInfoWeb/denglu.html";
}
Map<String, Object> param = new HashMap<String, Object>();
// 设置查询条件,选择属于当前用户,当前企业的订单
param.put("id", id);
List<Map<String, Object>> billAll = sqlSession.selectList("com.itrus.portal.db.BillMapper.selectProductBillCertById", param);
if (0 == billAll.size()) {
return "redirect:/userInfoWeb/denglu.html";
}
// 审核记录
ReviewLog reviewLog = reviewLogService.getReviewLog(id);
if (reviewLog != null) {
uiModel.addAttribute("reviewLog", reviewLog);
}
uiModel.addAttribute("bills", billAll.get(0));
// 获取订单在线支付方式
if (billAll.get(0).get("on_pay_info") != null) {
OnPayInfo onPayInfo = sqlSession.selectOne("com.itrus.portal.db.OnPayInfoMapper.selectByPrimaryKey", billAll.get(0).get("on_pay_info"));
uiModel.addAttribute("onPayInfo", onPayInfo);
} else if (billAll.get(0).get("pay_info") != null) {
PayInfo payInfo = sqlSession.selectOne("com.itrus.portal.db.PayInfoMapper.selectByPrimaryKey", billAll.get(0).get("pay_info"));
uiModel.addAttribute("payInfo", payInfo);
}
UserCertExample uce = new UserCertExample();
UserCertExample.Criteria ucec = uce.or();
ucec.andBillEqualTo(id);
List<String> certStatus = new ArrayList<String>();
List<UserCert> certs = userCertService.getUserCertByBill(id, certStatus);
certStatus.add(ComNames.CERT_STATUS_1);
certStatus.add(ComNames.CERT_STATUS_2);
if (ret == 1) {
// 下载成功页面
if (certs != null && certs.size() > 0) {
UserCert userCert = certs.get(0);
uiModel.addAttribute("doneTime", userCert.getCertStartTime());
}
return "ixinweb/dingdanxiangqing_xiazaichenggong";
} else {
// 下载失败页面
return "ixinweb/dingdanxiangqing_xiazaishibai";
}
}
Aggregations