| | |
| | | giveRecord.setState(RedPackGiveRecord.STATE_RECEIVE);
|
| | | // 领取人增加红包
|
| | | try {
|
| | | redPackBalanceService.addRedPack(uid, giveRecord.getAmount(), RedPackDetailFactory.createGiveOthers(giveRecord));
|
| | | redPackBalanceService.addRedPack(uid, giveRecord.getAmount(), RedPackDetailFactory.createGiveOthersReceive(giveRecord));
|
| | | } catch (Exception e) {
|
| | | throw new RedPackGiveRecordException(1, "红包领取失败");
|
| | | }
|
| | |
| | | try {
|
| | | String identifyCode = StringUtil.Md5(RedPackDetailTypeEnum.giveOthers.name() + ":" + giveRecord.getId());
|
| | | RedPackDetail redPackDetail = redPackDetailService.getByIdentifyCode(identifyCode);
|
| | | |
| | | RedPackDetail updateDetail = RedPackDetailFactory.createGiveOthersSucceed(redPackDetail.getId(), giveRecord);
|
| | | redPackDetailService.updateByPrimaryKeySelective(updateDetail);
|
| | | } catch (Exception e) {
|