From 88b54772dbcf5ecab1e2316e4e4626ac901b8908 Mon Sep 17 00:00:00 2001
From: yujian <yujian>
Date: 星期二, 22 一月 2019 15:58:24 +0800
Subject: [PATCH] 邀请码添加返回状态

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/AccountDetailsHongBaoMapServiceImpl.java |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/AccountDetailsHongBaoMapServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/AccountDetailsHongBaoMapServiceImpl.java
index 2338e60..91d03fb 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/AccountDetailsHongBaoMapServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/AccountDetailsHongBaoMapServiceImpl.java
@@ -1,9 +1,11 @@
 package com.yeshi.fanli.service.impl.hongbao;
 
 import java.util.Date;
+import java.util.List;
 
 import javax.annotation.Resource;
 
+import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import com.yeshi.fanli.dao.mybatis.money.AccountDetailHongBaoMapMapper;
@@ -12,6 +14,7 @@
 import com.yeshi.fanli.entity.money.AccountDetailHongBaoMap;
 import com.yeshi.fanli.service.inter.hongbao.AccountDetailsHongBaoMapService;
 
+@Service
 public class AccountDetailsHongBaoMapServiceImpl implements AccountDetailsHongBaoMapService {
 
 	@Resource
@@ -27,13 +30,21 @@
 		AccountDetailHongBaoMap map = new AccountDetailHongBaoMap();
 		map.setAccountDetails(new AccountDetails(accountDetailsId));
 		map.setCreateTime(new Date());
-		map.setHongBao(new HongBao());
+		map.setHongBao(new HongBao(hongBaoId));
 		map.setUpdateTime(new Date());
 		AccountDetailHongBaoMap oldMap = accountDetailHongBaoMapMapper.selectByHongBaoId(hongBaoId);
 		if (oldMap == null) {
-			accountDetailHongBaoMapMapper.insertSelective(oldMap);
+			accountDetailHongBaoMapMapper.insertSelective(map);
 		}
 
 	}
 
+	@Transactional
+	@Override
+	public void saveAccountDetailsHongBaoMap(List<Long> hongBaoIdList, Long accountDetailsId) {
+		if (hongBaoIdList != null)
+			for (Long hongBaoId : hongBaoIdList)
+				saveAccountDetailsHongBaoMap(hongBaoId, accountDetailsId);
+	}
+
 }

--
Gitblit v1.8.0