| | |
| | | }
|
| | | return detail;
|
| | | }
|
| | | |
| | | |
| | | public static UserMoneyDetail createScoreConvert(BigDecimal money, UserInfo user)
|
| | | throws UserMoneyDetailException {
|
| | | if (user == null)
|
| | | throw new UserMoneyDetailException(1, "UID不能为空");
|
| | | if (money == null)
|
| | | throw new UserMoneyDetailException(1, "金额不能为空");
|
| | |
|
| | | UserMoneyDetail detail = new UserMoneyDetail();
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setIdentifyCode(StringUtil.Md5(
|
| | | UserMoneyDetailTypeEnum.scoreConvert.name() + "-" + System.currentTimeMillis() + "-" + user.getId()));
|
| | | detail.setMoney(money);
|
| | | detail.setTitle(UserMoneyDetailTypeEnum.scoreConvert.getDesc());
|
| | | detail.setType(UserMoneyDetailTypeEnum.scoreConvert);
|
| | | detail.setUpdateTime(new Date());
|
| | | detail.setUserInfo(user);
|
| | | |
| | | return detail;
|
| | | }
|
| | |
|
| | | }
|