Package com.lgx8.management.entities

Examples of com.lgx8.management.entities.Merchant


    String adId = request.getParameter("adId");
    String merchantNo = request.getParameter("merchantNo");
    String tplx = request.getParameter("tplx");
    String tpmx = request.getParameter("description");
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    Merchant merchant = null;
    if(merchantNo!=null&&isNumber(merchantNo)){
      merchant = merchantDao.getMerchantById(Long.parseLong(merchantNo.trim()));
    }
    if(null!=merchant){
      File picture = fileUpload(request,"picture",merchant);
View Full Code Here


  public ModelAndView delMerchant(HttpServletRequest request,HttpServletResponse response) {
    //准备删除的联盟商
        String[] delMerchantIds = this.getKeyStoreArray(request);
    if (delMerchantIds.length > 0) {
        for (int i = 0 ; i < delMerchantIds.length ; i++) {
          Merchant m = merchantDao.getMerchantById(Long.parseLong(delMerchantIds[i]));
          if(m != null)
        {
            m.setDELETEFLAG("1");
              merchantDao.updateMerchant(m);
        }
        }
      }
    this.clearKeyStore(request);
View Full Code Here

  }
 
  @RequestMapping("/merchant/modifyMerchantIni.do")
  public ModelAndView modifyMerchantIni(HttpServletRequest request,HttpServletResponse response) {
    String SJID = request.getParameter("id");//商家id
    Merchant mr = merchantDao.getMerchantById(Integer.parseInt(SJID));
    /**
     * 初始化推荐组织机构
     */
    List<Organization> organizations = organizationDao.listAllOrganizations();
    request.setAttribute("orgs", organizations);
View Full Code Here

  }
 
  @RequestMapping("/merchant/setMerchantCard.do")
  public ModelAndView setMerchantCard(HttpServletRequest request,HttpServletResponse response) {
    String SJID = request.getParameter("id");//商家id
    Merchant mr = merchantDao.getMerchantById(Integer.parseInt(SJID));
    /**
     * 初始化推荐组织机构
     */
    List<Organization> organizations = organizationDao.listAllOrganizations();
    request.setAttribute("orgs", organizations);
View Full Code Here

     
      u = userDao.findUserByUserName(SJFRDB);
      u.setUsertype(User.USER_TYPE_MERCHANT);
    }
    if (!StrUtil.isNullStr(SJID) && !"0".equals(SJID)){
      Merchant mr = merchantDao.getMerchantById(Integer.parseInt(SJID));
      mr.setSJMC(SJMC);
      mr.setSJLX(SJLX);
      mr.setSFSHSM(SFSHSM);
      mr.setYYKSSJ(YYKSSJ);
      mr.setYYJSSJ(YYJSSJ);
      mr.setSJFWXJ(SJFWXJ);
      mr.setSJDZ(SJDZ);
      mr.setSJDHHM(SJDHHM);
      mr.setSJGSZCBH(SJGSZCBH);
      if(o != null)mr.setOrganization(o);
      if(o != null)mr.setAreaNode(o.getJGSZQY());
      mr.setSJFRDB(u);
      mr.setUser(rtUser);
      mr.setRESERVATION01(RESERVATION01);
      mr.setRESERVATION02(RESERVATION02);
      mr.setRESERVATION03(RESERVATION03);
      mr.setRESERVATION04(RESERVATION04);
      mr.setRESERVATION05(RESERVATION05);
      mr.setRESERVATION06(RESERVATION06);
      mr.setDELETEFLAG("0");
     
      mr.setProvince(d0 != null ? d0.getDETAIL():province);
      mr.setCity(d1 != null ? d1.getDETAIL():city);
      mr.setCounty(d2 != null ? d2.getDETAIL():county);
     
      merchantDao.updateMerchant(mr);
     
      u.setOrganizationid(mr.getID());
     
      userDao.updateUser(u);
    } else {
      Merchant mr = new Merchant();
      mr.setSJMC(SJMC);
      mr.setSJLX(SJLX);
      mr.setSFSHSM(SFSHSM);
      mr.setYYKSSJ(YYKSSJ);
      mr.setYYJSSJ(YYJSSJ);
      mr.setSJFWXJ(SJFWXJ);
      mr.setSJDZ(SJDZ);
      mr.setSJDHHM(SJDHHM);
      mr.setSJGSZCBH(SJGSZCBH);
      if(o != null)mr.setOrganization(o);
      if(o != null)mr.setAreaNode(o.getJGSZQY());
      mr.setSJFRDB(u);
      mr.setUser(rtUser);
      mr.setSJTJSJ(new Date());
      mr.setRESERVATION01(RESERVATION01);
      mr.setRESERVATION02(RESERVATION02);
      mr.setRESERVATION03(RESERVATION03);
      mr.setRESERVATION04(RESERVATION04);
      mr.setRESERVATION05(RESERVATION05);
      mr.setRESERVATION06(RESERVATION06);
      mr.setDELETEFLAG("0");
     
      mr.setProvince(d0 != null ? d0.getDETAIL():province);
      mr.setCity(d1 != null ? d1.getDETAIL():city);
      mr.setCounty(d2 != null ? d2.getDETAIL():county);
     
      merchantDao.createMerchant(mr);
     
      u.setOrganizationid(mr.getID());
     
      userDao.updateUser(u);
    }
   
    if (!"".equals(posturl) && posturl != null) {
View Full Code Here

  @RequestMapping("/rebate/hdtjinit.do")
  public String hdtjInitPage(HttpServletRequest request,HttpServletResponse response){
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    if(rtUser!=null&&rtUser.getUsertype()!=User.USER_TYPE_GSYG&&rtUser.getUsertype()!=User.USER_TYPE_NORMAL){
      if(rtUser.getUsertype()==User.USER_TYPE_MERCHANT){
        Merchant _m = merchantDao.getMerchantById(rtUser.getOrganizationid());
        request.setAttribute("merchant", _m);
      }else{
        Organization _or = organizationDao.getOrganizationById(rtUser.getOrganizationid());
        request.setAttribute("organization", _or);
      }
View Full Code Here

      ci.setDhtjr(rtUser);
      ci.setDhtjrq(new Date());
      ci.setDhjfs(Double.parseDouble(dhjf));
      ci.setDhzt(ChargeIndex.CHARGEINDEX_DHZT_INIT);
      if(rtUser.getUsertype()==User.USER_TYPE_MERCHANT){
        Merchant _m = merchantDao.getMerchantById(rtUser.getOrganizationid());
        ci.setDhlx(ChargeIndex.CHARGEINDEX_DHLX_MERCHANT);
        ci.setMerchantId(_m);
        double qbsl = _m.getFlqb();
        _m.setFlqb(qbsl-Double.parseDouble(dhjf));
        merchantDao.updateMerchant(_m);
      }else{
        Organization _or = organizationDao.getOrganizationById(rtUser.getOrganizationid());
        if(_or.getJGLX().equals("3")){
          ci.setDhlx(ChargeIndex.CHARGEINDEX_DHLX_TGZ);
View Full Code Here

    if(rtUser!=null&&rtUser.getUsertype()==User.USER_TYPE_GSYG&&id!=0){
      ci = chargeIndexDao.getChargeIndex(id);
      if(ci!=null){
        String lx = ci.getDhlx();
        if(lx.equals(ChargeIndex.CHARGEINDEX_DHLX_MERCHANT)){
          Merchant _m = ci.getMerchantId();
          if(confirm.equals("0")){
            double flqb = _m.getFlqb();
            _m.setFlqb(flqb+ci.getDhjfs());
            ci.setDeleteflag("1");
          }else{
            if(ci.getDhfs().equals(ChargeIndex.CHARGEINDEX_DHFS_HANDLERJF)){
              double syjf = _m.getSYJFSL();
              _m.setSYJFSL(syjf+ci.getDhjfs());
              //ci.setHdjes(ci.getDhjfs());
            }
            ci.setDhjes(ci.getDhjfs());
          }
          merchantDao.updateMerchant(_m);
View Full Code Here

    return null;
  }
 
  public void confirmRechargehistory(User u,Rechargehistory rh,String confirmLx){
    if(rh!=null&&rh.getCzzt()!=Rechargehistory.RECHARGEHISTORY_OVER){
      Merchant _m = rh.getMerchant();
      Organization _or = _m.getOrganization();
      if(confirmLx.equals("1")){
        rh.setCZQDR(u);
        rh.setCzqdrq(new Date());
        rh.setCzzt(Rechargehistory.RECHARGEHISTORY_OVER);
        double flje = 0.0;
        double czjfs=rh.getCZDHJFS();
        Rebaterule re_rule = null;
        if(_or != null&&!rh.getRESERVATION02().equals("02"))
        {
          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);
            }
          }
        }
        rechargehistoryDao.updateRechargeHistory(rh);
        double syjf = _m.getSYJFSL();
        _m.setSYJFSL(syjf+rh.getCZDHJFS());
        merchantDao.updateMerchant(_m);
      }else{
        rh.setDELETEFLAG("1");
        rechargehistoryDao.updateRechargeHistory(rh);
      }
View Full Code Here

    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);
View Full Code Here

TOP

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

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.