From df300df7832cc3d24f1b09297998e8bee8cfd126 Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期二, 20 八月 2019 18:06:43 +0800
Subject: [PATCH] 签到弹框bug

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralTaskRecordServiceImpl.java |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralTaskRecordServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralTaskRecordServiceImpl.java
index 074b27b..729ee6a 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralTaskRecordServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralTaskRecordServiceImpl.java
@@ -121,6 +121,45 @@
 	
 	
 	@Override
+	public List<IntegralTaskRecord> listNotReceivedExcludeId(int count, long uid, Set<Long> idList) {
+		if (idList != null && idList.size() == 0) {
+			idList = null;
+		}
+		return integralTaskRecordMapper.listNotReceivedExcludeId(count, uid, idList);
+	}
+	
+	
+	@Override
+	@Transactional
+	public Integer receiveGoldCoinALL(Long uid) throws IntegralTaskRecordException	{
+		UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
+		if (userInfoExtra == null) 
+			throw new IntegralTaskRecordException(1, "鐢ㄦ埛淇℃伅涓嶅叏");
+		
+		int totalGoldCoin = integralTaskRecordMapper.countTotalGoldCoin(uid);
+		if (totalGoldCoin > 0) {
+			integralTaskRecordMapper.updateReceived(uid);
+		}
+		
+		Integer goldCoin = userInfoExtra.getGoldCoin();
+		if (goldCoin == null) 
+			goldCoin = 0;
+		
+		UserInfoExtra extra = new UserInfoExtra();
+		extra.setId(userInfoExtra.getId());
+		extra.setGoldCoin(goldCoin + totalGoldCoin);
+		try {
+			userInfoExtraService.saveUserInfoExtra(extra);
+		} catch (UserInfoExtraException e) {
+			throw new IntegralTaskRecordException(1, "鐢ㄦ埛淇℃伅涓嶅叏");
+		}
+		
+		return extra.getGoldCoin();
+	}
+	
+	
+	
+	@Override
 	@Transactional
 	public Integer receiveGoldCoin(Long uid, Set<Long> idList) throws IntegralTaskRecordException	{
 		if(idList == null || idList.size() == 0) {

--
Gitblit v1.8.0