Package com.lgx8.gateway.entities

Examples of com.lgx8.gateway.entities.Card


    String mobile = request.getParameter("mobile");
    String email = request.getParameter("email");
   
    long car3 = Long.parseLong(card);
   
    Card temp = null;
   
    for(int i=1;i<=count;i++,car3++)
    {
      //生成卡号且卡号唯一
      String car = car3+"";
      temp = cardDao.createUserByCard(car.toUpperCase(), score, rtUser.getUsertype(), 1l, rtUser.getOrganizationid(), rtUser, rtUser,count==1?mobile:null,count==1?email:null);
    }
   
    if(count == 1 &&(mobile != null && !"".equals(mobile)) && temp != null)
    {
      //当开卡成功后发短信到手机尊敬的会员您的乐共享登录名13036780222,卡/号818800010022密/码abc123,请登录www.lgx8.com【乐共享】
      String content = "您的乐共享卡号是:"+temp.getId()+",密码是:"+temp.getPassword() + ",请登录后继续完善帐号信息。";
      SendSms.sendSms(mobile, content);
    }
   
    try {
      PrintWriter out = response.getWriter();
View Full Code Here


      user.setLocked(false);
      user.setCardEnd("0");
      user.setCardStart("0");
      user.setCurMaxCard("0");
      if(cardNum!=null&&cardNum.length()!=0){
        Card card = cardDao.findCard(cardNum);
        userCardService.createUser(user,card);
      }else{
//        User ru = userDao.findUserById(rtUser.getId());
//       
//        String cardStart = ru.getCardStart();
//        String cardCur = ru.getCurMaxCard();
//        if("0".equals(cardCur))
//        {
//          cardCur = cardStart;
//        }else
//        {
//          cardCur = Long.parseLong(cardCur)+1l+"";
//        }
        Card card = cardDao.createCard();
        userCardService.createUser(user,card);
       
//        ru.setCurMaxCard(cardCur);
//        userCardService.updateUser(ru);
      }
View Full Code Here

public class GiftRecordDao extends BaseDao implements IGiftRecordDao {

  @Transactional
  public void giftScoreToUser(User from, User to, Double score, String content) {
   
    Card fc = from.getCard();
    Card tc = to.getCard();
   
    double fs = fc.getScore();
    double ts = tc.getScore();
   
    fc.setScore(fs-score);
    this.getHibernateTemplate().update(fc);
   
    tc.setScore(ts+score);
    this.getHibernateTemplate().update(tc);
   
    GiftRecord gift = new GiftRecord();
    gift.setFrom(from);
    gift.setTo(to);
View Full Code Here

        {
          HSSFRow rowdata = sheet.createRow(n);
          int i = (n-1)+((t-1)*number);
          if(i < size)
          {
            Card card = cards.get(i);
            HSSFCell cell0 = rowdata.createCell(0);
            HSSFRichTextString text0 = new HSSFRichTextString(card.getId());
            cell0.setCellValue(text0);
            cell0.setCellStyle(styledata);
           
            HSSFCell cell1 = rowdata.createCell(1);
//            HSSFRichTextString text1 = new HSSFRichTextString(card.getPassword());
            cell1.setCellValue(card.getPassword());
            cell1.setCellStyle(styledata);
           
            HSSFCell cell2 = rowdata.createCell(2);
//            HSSFRichTextString text2 = new HSSFRichTextString(card.getScore().toString());
            cell2.setCellValue(card.getScore());
            cell2.setCellStyle(styledata);
          }
        }
      }
      workbook.write(out);
View Full Code Here

    {
      request.setAttribute("errmsg", "该积分卡已过期,不能再进行充值。");
      return new ModelAndView(MemberURLConst.URL_BASE);
    }
   
    Card  c = currentUser.getCard();
    c.setScore(c.getScore() + scorecard.getScore());
    cardDao.updateCard(c);
   
    MemberRecord record = new MemberRecord();
    record.setRecordDate(new Date());
    record.setRecorder(currentUser);
View Full Code Here

   * 创建一个新用户,自动为其生产卡号,用于网站注册
   * @param user
   */
  @Transactional
  public void createUser(User user) {
    Card card = cardDao.createCard();
    card.setStatus(Card.CARD_INUSE);
    user.setCard(card);
    cardDao.updateCard(card);
    userDao.createUser(user);
  }
View Full Code Here

    userDao.updateUser(rtUser);
  }

  @Transactional
  public void registerUser(User user) {
    Card card = cardDao.createCard();
    card.setStatus(Card.CARD_INUSE);
    user.setCard(card);
    cardDao.updateCard(card);
    userDao.createUser(user);
  }
View Full Code Here

//        cardCur = cardStart;
//      }else
//      {
//        cardCur = Long.parseLong(cardCur)+1l+"";
//      }
      Card card = cardDao.findCard(cardid);
      if(card == null )card = cardDao.createCard(cardid);
       
      userCardService.createUser(user,card);

//      ru.setCurMaxCard(cardCur);
View Full Code Here

    getHibernateTemplate().bulkUpdate("delete from Category c where c.id="+id);
  }
 
  public List<Category> findAllCategoryList(long id) {
    List<Category> list = new ArrayList<Category>();
    Category category = getHibernateTemplate().get(Category.class, id);
    if(category!=null) {
      list.add(category);
      List<Category> childs = findAllChilds(list);
      while(childs!=null&&childs.size()>0) {
        for(Category c:childs) {
View Full Code Here

    return findByPage4Report(hql, new Object[]{}, argment.getCurPage(), argment.getPageSize());
  }

  public List<Category> findAllCategoryList(long id) {
    List<Category> list = new ArrayList<Category>();
    Category category = findCategory(id);
    if(category!=null) {
      list.add(category);
      List<Category> childs = findAllChilds(list);
      while(childs!=null&&childs.size()>0) {
        for(Category c:childs) {
View Full Code Here

TOP

Related Classes of com.lgx8.gateway.entities.Card

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.