示例#1
0
 private void addMoney(long uid, long jinbi, String type) {
   Usermoney usermoney = userMoneyDao.getUsermoney(uid);
   usermoney.setAlljifeng(usermoney.getAlljifeng() + jinbi);
   boolean b = userMoneyDao.updateMoney(usermoney);
   if (b) {
     addJilu(jinbi, type);
   }
 }
示例#2
0
  private UserBean changeBean(User user, Usermoney usermoney) {
    UserBean user2 = new UserBean();
    user2.setId(user.getId());
    user2.setIsok(user.getIsok());
    user2.setMac(user.getMac());
    user2.setName(user.getNicheng());
    user2.setTg(user.getTj());
    user2.setXinshou(user.getXinshou());
    user2.setQq(user.getQq());
    user2.setPhone(user.getPhone());
    user2.setZhifubao(user.getZhifubao());
    double tgMoney = usermoney.getTjmoney() / 1000.00;
    String TG = new String(tgMoney + "");
    TG = TG.substring(0, TG.indexOf(".") + 2);
    user2.setTGMoney(TG);
    if (user.getShangjia1() != null) {
      user2.setShangjia1(user.getShangjia1());
    }
    if (user.getShangjia2() != null) {
      user2.setShangjia2(user.getShangjia2());
    }
    if (user.getShangjia3() != null) {
      user2.setShangjia3(user.getShangjia3());
    }
    if (user.getShangjia4() != null) {
      user2.setShangjia4(user.getShangjia4());
    }
    if (user.getShangjia5() != null) {
      user2.setShangjia5(user.getShangjia5());
    }
    if (usermoney != null) {
      user2.setAllMoney(usermoney.getAllmoney());
      user2.setKedoubi(usermoney.getAlljifeng());
    }
    user2.setChoujiang(user.getChoujiang());

    return user2;
  }