Examples of IPointsRecordDao


Examples of com.lgx8.right.dao.IPointsRecordDao

    Map<Object, Object> root = new HashMap<Object, Object>();
    root.putAll(super.root);
    Template temp = getConfiguration().getTemplate("pointsrecord/PointsRecord.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IPointsRecordDao pointsRecordDao = (IPointsRecordDao)ac.getBean("pointsRecordDao");
   
    String pageno = request.getParameter("pageno");
    //处理当前页
    if(pageno==null) {
      pageno = "1";
    }
    int pagenum = 1;
    try {
      pagenum = Integer.parseInt(pageno);
    } catch (Exception e1) {
      pagenum = 1;
    }
   
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    String entityId = null;
    if(rtUser.getUsertype() == User.USER_TYPE_MERCHANT)
    {
      entityId = rtUser.getOrganizationid()+"";
    }
   
    PageList page =  pointsRecordDao.findPointsRecord(entityId, null, null, 15, pagenum);
   
    if(page!=null&&page.getDataList().size()>0) {
      root.put("page", page);
    }
   
View Full Code Here

Examples of com.lgx8.right.dao.IPointsRecordDao

    if(id == null || "".equals(id))
    {
      id = "0";
    }
   
    IPointsRecordDao pointsRecordDao = (IPointsRecordDao) ac.getBean("pointsRecordDao");
   
    String recordIP = request.getRemoteAddr();
   
    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    Date date = new Date();
   
    String recordTime = format.format(date);
   
    Merchant merchant = merchantDao.getMerchantById(Long.parseLong(id));
   
    if(merchant != null)
    {
      Boolean flag = pointsRecordDao.checkPointsRecordExists(id, "1", recordIP, recordTime);
     
      if(flag)
      {
        double score = merchant.getSYJFSL();
       
        merchant.setSYJFSL(score-1);
       
        merchantDao.updateMerchant(merchant);
       
        PointsRecord record = new PointsRecord();
        record.setEntityId(id);
        record.setType("1");
        record.setEntityName(merchant.getSJMC());
        record.setPoints(1.00);
        record.setRecordIP(recordIP);
        record.setRecordTime(new Date());
       
        pointsRecordDao.savePointsRecord(record);
      }
    }
   
    if(url != null && !"".equals(url))
    {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.