From b63cc5c46404ba8c149f9f7527e9af11e0b44360 Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期三, 16 十月 2019 18:02:21 +0800
Subject: [PATCH] 淘礼金获得 + 赠送 + 相关活动清理

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/tlj/UserTaoLiJinReportServiceImpl.java |  112 --------------------------------------------------------
 1 files changed, 0 insertions(+), 112 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 f29e2a1..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,13 +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.MoneyBigDecimalUtil;
 import com.yeshi.fanli.util.StringUtil;
-import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
 
 @Service
 public class UserTaoLiJinReportServiceImpl implements UserTaoLiJinReportService{
@@ -51,8 +46,6 @@
 	}
 	
 	
-	
-	
 	@Override
 	public void updateByPrimaryKeySelective(UserTaoLiJinReport record) {
 		if (record == null || record.getId() == null) {
@@ -63,111 +56,6 @@
 		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);
-			}
-		}
-	}
-	
-	
-	@Override
-	public void refundNotWin() {
-		List<UserTaoLiJinReport> list = userTaoLiJinReportMapper.refundNotWin();
-		if (list == null || list.size() == 0) {
-			return;
-		}
-		
-		for (UserTaoLiJinReport report: list) {
-			// 鎬讳釜鏁�
-			Integer totalNum = report.getTotalNum();
-			BigDecimal preFace = report.getPreFace();
-			
-			// 鎬婚噾棰�
-			BigDecimal money = MoneyBigDecimalUtil.mul(new BigDecimal(totalNum), preFace);
-			
-			report.setRefundNum(totalNum);
-			report.setRefundAmount(money);
-			report.setUpdateTime(new Date());
-			
-			try {
-				// 閫�鍥炴窐绀奸噾
-				userTaoLiJinOriginService.refundMoney(report);
-				
-			} catch (UserTaoLiJinOriginException e) {
-				LogHelper.errorDetailInfo(e);
-				continue;
-			}
-			
-			// 鏇存柊鎶ュ憡
-			userTaoLiJinReportMapper.updateByPrimaryKeySelective(report);
-		}
-	}
 	
 	@Override
 	public UserTaoLiJinReport selectByPrimaryKey(String id) {

--
Gitblit v1.8.0