Package com.lgx8.management.entities

Examples of com.lgx8.management.entities.Rechargehistory


    String czje = request.getParameter("czje");
    String czjf = "";
    String[] is_nore = request.getParameterValues("is_nore");
    if(rtUser!=null&&rtUser.getUsertype()==User.USER_TYPE_MERCHANT){
      Merchant _m = merchantDao.getMerchantById(rtUser.getOrganizationid());
      Rechargehistory rechargeh = new Rechargehistory();
      rechargeh.setCZYHBH(rtUser);
      rechargeh.setCZSJ(new Date());
      rechargeh.setCzzt(Rechargehistory.RECHARGEHISTORY_INIT);
      rechargeh.setCZJE(Double.parseDouble(czje==null?"0":czje));
      if(is_nore!=null&&is_nore.length > 0){
        czjf = request.getParameter("czjf");
        rechargeh.setRESERVATION02("02");
      }else{
        czjf = Double.parseDouble(czje==null?"0":czje)*10+"";
        rechargeh.setRESERVATION02("01");
      }
      rechargeh.setCZDHJFS(Double.parseDouble(czjf==null?"0":czjf));
      rechargeh.setRESERVATION01(Rechargehistory.RECHARGEHISTORY_CZLX_ZFBZ);
      rechargeh.setCZYHLX("02");
      if(_m!=null){
        rechargeh.setMerchant(_m);
      }
     
      rechargehistoryDao.createRechargeHistory(rechargeh);
      request.setAttribute("rechargehistory", rechargeh);
     
View Full Code Here


 
  private Logger logger = Logger.getLogger("payment");
 
  @RequestMapping("/paymentmerchant.do")
  public ModelAndView payment(HttpServletRequest request,HttpServletResponse response){
    Rechargehistory rechargeHistory = (Rechargehistory)request.getAttribute("rechargehistory");
    String xml = alipayto(rechargeHistory);
    request.setAttribute("reqHtmlText", xml);
    return new ModelAndView("paymerchant/alipayto");
  }
View Full Code Here

        //判断该笔订单是否在商户网站中已经做过处理(可参考“集成教程”中“3.4返回数据处理”)
        //如果没有做过处理,根据订单号(out_trade_no)在商户网站的订单系统中查到该笔订单的详细,并执行商户的业务程序
        //如果有做过处理,不执行商户的业务程序
        logger.debug("notify WAIT_BUYER_PAY[rechargeHistoryID:"+order_no+"]");
        if(order_no==null)order_no="-1";
        Rechargehistory rechargehistory = rechargehistoryDao.findRechargehistoryById(Long.parseLong(order_no.trim()));
        if(null!=rechargehistory){
          if(rechargehistory.getCzzt()==Rechargehistory.RECHARGEHISTORY_INIT){
            logger.debug("notify WAIT_BUYER_PAY[update null operation:"+order_no+"]");
          }
        }
          out.println("success")//请不要修改或删除
      } else if(trade_status.equals("WAIT_SELLER_SEND_GOODS")){
        //该判断表示买家已在支付宝交易管理中产生了交易记录且付款成功,但卖家没有发货
        //判断该笔订单是否在商户网站中已经做过处理(可参考“集成教程”中“3.4返回数据处理”)
        //如果没有做过处理,根据订单号(out_trade_no)在商户网站的订单系统中查到该笔订单的详细,并执行商户的业务程序
        //如果有做过处理,不执行商户的业务程序
        logger.debug("notify WAIT_SELLER_SEND_GOODS[rechargeHistoryID:"+order_no+"]");
          if(order_no==null)order_no="-1";
          Rechargehistory rechargehistory = rechargehistoryDao.findRechargehistoryById(Long.parseLong(order_no.trim()));
          if(null!=rechargehistory){
            if(rechargehistory.getCzzt()==Rechargehistory.RECHARGEHISTORY_INIT){
              logger.debug("notify WAIT_SELLER_SEND_GOODS[null operation:"+order_no+"]");
            }
          }
          out.println("success")//请不要修改或删除
        } else if(trade_status.equals("WAIT_BUYER_CONFIRM_GOODS")){
        //该判断表示卖家已经发了货,但买家还没有做确认收货的操作
        //判断该笔订单是否在商户网站中已经做过处理(可参考“集成教程”中“3.4返回数据处理”)
        //如果没有做过处理,根据订单号(out_trade_no)在商户网站的订单系统中查到该笔订单的详细,并执行商户的业务程序
        //如果有做过处理,不执行商户的业务程序   
          logger.debug("notify WAIT_BUYER_CONFIRM_GOODS[rechargeHistoryID:"+order_no+"]");
          if(order_no==null)order_no="-1";
          Rechargehistory rechargehistory = rechargehistoryDao.findRechargehistoryById(Long.parseLong(order_no.trim()));
          if(null!=rechargehistory){
            if(rechargehistory.getCzzt()==Rechargehistory.RECHARGEHISTORY_INIT){
              logger.debug("notify WAIT_BUYER_CONFIRM_GOODS[update null operation:"+order_no+"]");
            }
          }
         
          out.println("success")//请不要修改或删除
        } else if(trade_status.equals("TRADE_FINISHED")){
        //该判断表示买家已经确认收货,这笔交易完成
        //判断该笔订单是否在商户网站中已经做过处理(可参考“集成教程”中“3.4返回数据处理”)
        //如果没有做过处理,根据订单号(out_trade_no)在商户网站的订单系统中查到该笔订单的详细,并执行商户的业务程序
        //如果有做过处理,不执行商户的业务程序
          logger.debug("notify TRADE_FINISHED[rechargeHistoryID:"+order_no+"]");
          if(order_no==null)order_no="-1";
          Rechargehistory rechargehistory = rechargehistoryDao.findRechargehistoryById(Long.parseLong(order_no.trim()));
          if(null!=rechargehistory){
            if(rechargehistory.getCzzt()==Rechargehistory.RECHARGEHISTORY_INIT){
              logger.debug("notify TRADE_FINISHED[rechargehistoryID:"+order_no+"]");
              rechargeRebateService.confirmRechargehistory(null, rechargehistory, "1");
            }
          }
          out.println("success")//请不要修改或删除
        }
        else {
          logger.debug("notify else[rechargehistoryID:"+order_no+"]");
          out.println("success")//请不要修改或删除
        }

      //——请根据您的业务逻辑来编写程序(以上代码仅作参考)——

      //////////////////////////////////////////////////////////////////////////////////////////
    }else{//验证失败
      logger.debug("notify TRADE_FINISHED[rechargeHistoryID:"+order_no+"]");
      if(order_no==null)order_no="-1";
      Rechargehistory rechargehistory = rechargehistoryDao.findRechargehistoryById(Long.parseLong(order_no.trim()));
      if(null!=rechargehistory){
        if(rechargehistory.getCzzt()==Rechargehistory.RECHARGEHISTORY_INIT){
          logger.debug("notify faild [rechargehistoryID:"+order_no+"]");
          rechargeRebateService.confirmRechargehistory(null, rechargehistory, "0");//失败情况下
        }
      }
      out.println("fail");
View Full Code Here

        //判断该笔订单是否在商户网站中已经做过处理(可参考“集成教程”中“3.4返回数据处理”)
        //如果没有做过处理,根据订单号(out_trade_no)在商户网站的订单系统中查到该笔订单的详细,并执行商户的业务程序
        //如果有做过处理,不执行商户的业务程序
        logger.debug("return WAIT_SELLER_SEND_GOODS[rechargeHistoryID:"+order_no+"]");
        if(order_no==null)order_no="-1";
        Rechargehistory rechargehistory = rechargehistoryDao.findRechargehistoryById(Long.parseLong(order_no.trim()));
        if(null!=rechargehistory){
          if(rechargehistory.getCzzt()==Rechargehistory.RECHARGEHISTORY_INIT){
            logger.debug("return WAIT_SELLER_SEND_GOODS[null operation:"+order_no+"]");
          }
        }
      }
   
      if(trade_status.equals("TRADE_FINISHED")){
        //判断该笔订单是否在商户网站中已经做过处理(可参考“集成教程”中“3.4返回数据处理”)
        //如果没有做过处理,根据订单号(out_trade_no)在商户网站的订单系统中查到该笔订单的详细,并执行商户的业务程序
        //如果有做过处理,不执行商户的业务程序
        if(order_no==null)order_no="-1";
        Rechargehistory rechargehistory = rechargehistoryDao.findRechargehistoryById(Long.parseLong(order_no.trim()));
        logger.debug("return TRADE_FINISHED[rechargehistoryID:"+order_no+"]");
        if(null!=rechargehistory){
          if(rechargehistory.getCzzt()==Rechargehistory.RECHARGEHISTORY_INIT){
            logger.debug("return TRADE_FINISHED[update orderID:"+order_no+"]");
            rechargeRebateService.confirmRechargehistory(null, rechargehistory, "1");
          }
        }
      }
 
      /*RunTimeUser.getRunTimeUser(request).updateUser(user);
      FareWay farway = farewayDao.getFareWayById(Integer.parseInt(deliveryId.trim()));
      request.setAttribute("farway", farway);
      request.setAttribute("order", order);
      request.setAttribute("url", MemberURLConst.URL_ORDER_DETAIL);
      return new ModelAndView(MemberURLConst.URL_BASE);*/
      //——请根据您的业务逻辑来编写程序(以上代码仅作参考)——
      out.print("<script type=\"text/javascript\">alert('支付成功');//window.close();</script>");
      //////////////////////////////////////////////////////////////////////////////////////////
    }else{
      logger.debug("return verify failed[rechargehistoryID:"+order_no+"]");
      if(order_no==null)order_no="-1";
      Rechargehistory rechargehistory = rechargehistoryDao.findRechargehistoryById(Long.parseLong(order_no.trim()));
      logger.debug("return TRADE_FINISHED[rechargehistoryID:"+order_no+"]");
      if(null!=rechargehistory){
        if(rechargehistory.getCzzt()==Rechargehistory.RECHARGEHISTORY_INIT){
          logger.debug("return TRADE_FINISHED[update orderID:"+order_no+"]");
          rechargeRebateService.confirmRechargehistory(null, rechargehistory, "0");
        }
      }
      //该页面可做页面美工编辑
View Full Code Here

  public Rechargehistory createCustmerXF(Merchant m, User user, double czje, double czjfs) {
    if(m!=null){
      Rebaterule re_rule = null;
      Organization _or = m.getOrganization();
      Rechargehistory recharge = new Rechargehistory();
      if(_or!=null){
        double flje = 0.0;
        if(_or.getJGLX().equals("2")){
          re_rule = rebateRuleDao.findRebateRuleByLx("01");
          double flqb = _or.getFlqb();
          if(re_rule!=null){
            flje = czjfs*re_rule.getFLLV();
            Rebate re = new Rebate();
            re.setFLED(flje);
            re.setFLSJ(new Date());
            re.setFLSYFBH(_or.getID());
            re.setFLLX("01");
            re.setRESERVATION01(m.getSJMC());
            re.setRESERVATION02(m.getID()+"");
            re.setRESERVATION03(_or.getJGMC());
            _or.setFlqb(flqb+flje);
            organizationDao.updateOrganization(_or);
            rebateDao.createRebate(re);
          }
        }
        if(_or.getJGLX().equals("3")){
          re_rule = rebateRuleDao.findRebateRuleByLx("02");
          double flqb = _or.getFlqb();
          if(re_rule!=null){
            flje = czjfs*re_rule.getFLLV();
            Rebate re = new Rebate();
            re.setFLED(flje);
            re.setFLSJ(new Date());
            re.setFLSYFBH(_or.getID());
            re.setFLLX("02");
            re.setRESERVATION01(m.getSJMC());
            re.setRESERVATION02(m.getID()+"");
            re.setRESERVATION03(_or.getJGMC());
            _or.setFlqb(flqb+flje);
            organizationDao.updateOrganization(_or);
            rebateDao.createRebate(re);
          }
        }
        if(_or.getJGLX().equals("4")){
          re_rule = rebateRuleDao.findRebateRuleByLx("03");
          double flqb = _or.getFlqb();
          if(re_rule!=null){
            flje = czjfs*re_rule.getFLLV();
            Rebate re = new Rebate();
            re.setFLED(flje);
            re.setFLSJ(new Date());
            re.setFLSYFBH(_or.getID());
            re.setFLLX("03");
            re.setRESERVATION01(m.getSJMC());
            re.setRESERVATION02(m.getID()+"");
            re.setRESERVATION03(_or.getJGMC());
            _or.setFlqb(flqb+flje);
            organizationDao.updateOrganization(_or);
            rebateDao.createRebate(re);
          }
        }
       
        Organization _por = _or.getSsjg();
        if(_por != null &&  _por.getJGLX().equals("5")){
          re_rule = rebateRuleDao.findRebateRuleByLx("04");
          double flqb = _por.getFlqb();
          if(re_rule!=null){
            flje = czjfs*re_rule.getFLLV();
            Rebate re = new Rebate();
            re.setFLED(flje);
            re.setFLSJ(new Date());
            re.setFLSYFBH(_por.getID());
            re.setFLLX("04");
            re.setRESERVATION01(m.getSJMC());
            re.setRESERVATION02(m.getID()+"");
            re.setRESERVATION03(_por.getJGMC());
            _por.setFlqb(flqb+flje);
            organizationDao.updateOrganization(_por);
            rebateDao.createRebate(re);
          }
        }
        recharge.setCZDHJFS(czjfs);
        recharge.setCZJE(czje);
        recharge.setCZQDR(null);
        recharge.setCZSJ(new Date());
        recharge.setMerchant(m);
        recharge.setCZYHBH(user);
        recharge.setCZYHLX("01");
        rechargehistoryDao.createRechargeHistory(recharge);
        double syjfs = m.getSYJFSL();
        m.setSYJFSL(syjfs+czjfs);
        merchantDao.updateMerchant(m);
      }
View Full Code Here

    }
   
    List<Scorecard> cards = new ArrayList<Scorecard>();
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IScorecardDao scorecardDao = (IScorecardDao) ac.getBean("scorecardDao");
   
    cards = scorecardDao.listScorecards(cardStart, cardEnd);
   
    String[] headers = { "卡号", "密码", "积分", "有效开始时间", "有效结束时间" };
   
    int size = cards.size();
    int number = Integer.parseInt(numberStr);
View Full Code Here

    String tj_st = request.getParameter("tj_st");
    String tj_ed = request.getParameter("tj_ed");
    String fllx = request.getParameter("fllx");
    StringBuffer sb = new StringBuffer();
    PageArgument pr = getPageInfo(request);
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    if(tj_st!=null&&!tj_st.equals("")){
      sb.append(" and createdtime>=str_to_date('"+tj_st+"','%Y-%m-%d %H:%i:%s')");
    }
    if(tj_ed!=null&&!tj_ed.equals("")){
      sb.append(" and createdtime<=str_to_date('"+tj_ed+"','%Y-%m-%d %H:%i:%s')");
View Full Code Here

  }
 
  @RequestMapping("/rebate/modifyrebateruleinit.do")
  public ModelAndView modifyRebateruleInit(HttpServletRequest request,HttpServletResponse response){
    String re_id = request.getParameter("rrid");
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    if(re_id!=null&&re_id.length()>0){
      if(rtUser.getUsertype()==User.USER_TYPE_GSYG){
        Rebaterule rr = rechargeRebateService.getRebateRule(Long.parseLong(re_id));
        request.setAttribute("rebaterule", rr);
        return  new ModelAndView("/management/rebate/create_rebaterule");
      }else{
        return new ModelAndView("/management/rebate/list_rebaterule");
View Full Code Here

  }
 
  @RequestMapping("/rebate/deleterebaterule.do")
  public ModelAndView deleteRebateruleInit(HttpServletRequest request,HttpServletResponse response){
    String re_id = request.getParameter("rrid");
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    if(re_id!=null&&re_id.length()>0){
      if(rtUser.getUsertype()==User.USER_TYPE_GSYG){
        Rebaterule rr = rechargeRebateService.getRebateRule(Long.parseLong(re_id));
        rechargeRebateService.deleteRebateRule(rr);
      }
    }
    return new ModelAndView("/management/rebate/list_rebaterule");
View Full Code Here

    return new ModelAndView("/management/rebate/list_rebaterule");
  }
 
  @RequestMapping("/rebate/saverebate.do")
  public String saveRebateRule(HttpServletRequest request,HttpServletResponse response){
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    String fllv = request.getParameter("fllv");
    String fllx = request.getParameter("fllx");
    String flzt = request.getParameter("flzt");
    String flid = request.getParameter("rrid");
    Rebaterule rr = null;
    if(rtUser.getUsertype()==User.USER_TYPE_GSYG){
      if(flid!=null&&flid.length()>0&&!flid.equals("0")){
        long id = Long.parseLong(flid);
        rr = rechargeRebateService.getRebateRule(id);
        rr.setDELETEFLAG(flzt);
        rr.setFLLX(fllx);
View Full Code Here

TOP

Related Classes of com.lgx8.management.entities.Rechargehistory

Copyright © 2018 www.massapicom. 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.