From 98b1a0affd69bbe63223c21fdd2c404e8bedfccb Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 20 五月 2020 17:25:08 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/div' into 2.1.2

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/tlj/UserTaoLiJinReportServiceImpl.java |   78 +-------------------------------------
 1 files changed, 3 insertions(+), 75 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/tlj/UserTaoLiJinReportServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/tlj/UserTaoLiJinReportServiceImpl.java
index bcde9dc..bbc0e3a 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/tlj/UserTaoLiJinReportServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/tlj/UserTaoLiJinReportServiceImpl.java
@@ -2,7 +2,6 @@
 
 import java.math.BigDecimal;
 import java.util.Date;
-import java.util.List;
 
 import javax.annotation.Resource;
 
@@ -10,12 +9,9 @@
 
 import com.yeshi.fanli.dao.mybatis.tlj.UserTaoLiJinReportMapper;
 import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinReport;
-import com.yeshi.fanli.exception.tlj.UserTaoLiJinOriginException;
-import com.yeshi.fanli.log.LogHelper;
 import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinOriginService;
 import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinReportService;
 import com.yeshi.fanli.util.StringUtil;
-import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
 
 @Service
 public class UserTaoLiJinReportServiceImpl implements UserTaoLiJinReportService{
@@ -50,8 +46,6 @@
 	}
 	
 	
-	
-	
 	@Override
 	public void updateByPrimaryKeySelective(UserTaoLiJinReport record) {
 		if (record == null || record.getId() == null) {
@@ -62,76 +56,10 @@
 		userTaoLiJinReportMapper.updateByPrimaryKeySelective(record);
 	}
 	
+	
 	@Override
-	public void needUpdateReport() {
-		List<UserTaoLiJinReport> list = userTaoLiJinReportMapper.needUpdateReport();
-		if (list == null || list.size() == 0) {
-			return;
-		}
-		
-		for (UserTaoLiJinReport report: list) {
-			UserTaoLiJinReport taoLiJinReport = null;
-			try {
-				taoLiJinReport = TaoKeApiUtil.getTaoLiJinEffective(report.getId());
-			} catch (Exception e) {
-				LogHelper.errorDetailInfo(e);
-				continue;
-			}
-			
-			if (taoLiJinReport == null) {
-				continue;
-			}
-			
-			// 鏄惁闇�瑕佹洿鏂�
-			boolean needUpdate = false;
-			
-			if(taoLiJinReport.getWinNum() != report.getWinNum()){
-				needUpdate = true;
-			}
-			if(taoLiJinReport.getWinAmount() != report.getWinAmount()){
-				needUpdate = true;
-			}
-			if(taoLiJinReport.getUnfreezeNum() != report.getUnfreezeNum()){
-				needUpdate = true;
-			}
-			if(taoLiJinReport.getUnfreezeAmount() != report.getUnfreezeAmount()){
-				needUpdate = true;
-			}
-			if(taoLiJinReport.getPreCommissionAmount() != report.getPreCommissionAmount()){
-				needUpdate = true;
-			}
-			if(taoLiJinReport.getUseNum() != report.getUseNum()){
-				needUpdate = true;
-			}
-			if(taoLiJinReport.getUseAmount() != report.getUseAmount()){
-				needUpdate = true;
-			}
-			
-			if(taoLiJinReport.getAlipayAmount() != report.getAlipayAmount()){
-				needUpdate = true;
-			}
-			
-			if(taoLiJinReport.getRefundNum() != report.getRefundNum()){
-				needUpdate = true;
-			}
-			
-			// 澶辨晥閫�鍥為噾棰濆彂鐢熷彉鍖�
-			BigDecimal refundAmount = taoLiJinReport.getRefundAmount();
-			if(refundAmount.compareTo(report.getRefundAmount()) > 0) {
-				needUpdate = true;
-				try {
-					userTaoLiJinOriginService.refundMoney(taoLiJinReport);
-				} catch (UserTaoLiJinOriginException e) {
-					e.printStackTrace();
-				}
-			}
-			
-			// 鏇存柊鎶ュ憡
-			if(needUpdate) {
-				taoLiJinReport.setUpdateTime(new Date());
-				userTaoLiJinReportMapper.updateByPrimaryKeySelective(taoLiJinReport);
-			}
-		}
+	public UserTaoLiJinReport selectByPrimaryKey(String id) {
+		return userTaoLiJinReportMapper.selectByPrimaryKeyStr(id);
 	}
 	
 }

--
Gitblit v1.8.0