| | |
| | | UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
|
| | | if (userInfoExtra == null || userInfoExtra.getFirstLoginTime() == null)
|
| | | throw new UserTaoLiJinNewbiesException(1001, "你不是“新用户”无法使用新人红包0元购买。");
|
| | | |
| | | |
| | | // 验证是否激活
|
| | | if (StringUtil.isNullOrEmpty(userInfoExtra.getInviteCode()))
|
| | | throw new UserTaoLiJinNewbiesException(1002, "邀请码未激活,无法使用新人红包0元购买。");
|
| | | |
| | | // 验证是否已超出新用户定义
|
| | | try {
|
| | | int days = DateUtil.daysBetween2(userInfoExtra.getFirstLoginTime(), new Date());
|
| | |
| | | } catch (ParseException e1) {
|
| | | throw new UserTaoLiJinNewbiesException(1, "日期信息计算失败");
|
| | | }
|
| | | |
| | | |
| | | // 验证余额
|
| | | UserTaoLiJinNewbies taoLiJinNewbies = userTaoLiJinNewbiesMapper.selectForUpdate(uid);
|
| | | if (taoLiJinNewbies == null || taoLiJinNewbies.getMoney() == null ||
|
| | |
| | | }
|
| | |
|
| | |
|
| | | @Transactional
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | private String createTaoLiJin(Long auctionId, BigDecimal perface, int totalNum, String pid) throws UserTaoLiJinNewbiesException {
|
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
| | | SimpleDateFormat formatStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|