From b7bdc8f55aa7e5c3646084eb2c2a8801eeec6c5b Mon Sep 17 00:00:00 2001
From: admin <2780501319@qq.com>
Date: 星期五, 28 二月 2020 14:11:27 +0800
Subject: [PATCH] 缓存根据淘口令获取商品ID
---
fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractServiceImpl.java | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractServiceImpl.java
index 4f32552..3d47565 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractServiceImpl.java
@@ -53,6 +53,7 @@
import com.yeshi.fanli.entity.common.AdminUser;
import com.yeshi.fanli.entity.money.UserMoneyDetail;
import com.yeshi.fanli.entity.money.UserMoneyDetail.UserMoneyDetailTypeEnum;
+import com.yeshi.fanli.entity.system.ConfigKeyEnum;
import com.yeshi.fanli.exception.ExtractException;
import com.yeshi.fanli.exception.NotExistObjectException;
import com.yeshi.fanli.exception.ObjectStateException;
@@ -172,10 +173,10 @@
updateExtract.setId(id);
updateExtract.setState(Extract.STATE_PROCESSING);
extractMapper.updateByPrimaryKeySelective(updateExtract);
- //TODO 鏂扮増閮ㄧ讲鍚庡垹闄�
+ // TODO 鏂扮増閮ㄧ讲鍚庡垹闄�
// 鏀瑰彉璧勯噾璁板綍鐘舵��
- UserMoneyDetail detail = userMoneyDetailService
- .selectByTypeAndUidAndIdentifyCode(UserMoneyDetailTypeEnum.extract, find.getUserInfo().getId(), find.getId());
+ UserMoneyDetail detail = userMoneyDetailService.selectByTypeAndUidAndIdentifyCode(
+ UserMoneyDetailTypeEnum.extract, find.getUserInfo().getId(), find.getId());
if (detail != null) {
UserMoneyDetail update = new UserMoneyDetail(detail.getId());
update.setShow(true);
@@ -188,7 +189,7 @@
return null;
}
- @Transactional
+ @Transactional(rollbackFor = Exception.class)
public synchronized void rejectExtract(long id, String reason, AdminUser admin)
throws ObjectStateException, NotExistObjectException {
Extract find = extractMapper.selectByPrimaryKey(id);
@@ -268,9 +269,9 @@
&& (System.currentTimeMillis() - history.getCreateTime().getTime()) < 1000 * 60 * 60 * 24 * 7L)
return 111;
- final String autoExtract = configService.get("extract_way"); // 鏄惁鑷姩杞处
- final String maxCount = configService.get("extract_count_day");
- final String maxMoney = configService.get("extract_money_day");
+ final String autoExtract = configService.get(ConfigKeyEnum.extractWay.getKey()); // 鏄惁鑷姩杞处
+ final String maxCount = configService.get(ConfigKeyEnum.extractDayCount.getKey());
+ final String maxMoney = configService.get(ConfigKeyEnum.extractMoneyDay.getKey());
UserInfo user = userInfoMapper.selectByPrimaryKeyForUpdate(extract.getUserInfo().getId());
// 浣欓涓嶈冻
@@ -426,7 +427,7 @@
response = alipayClient.execute(request);
LogHelper.userErrorInfo("鎻愮幇:鏀粯瀹濋�氳繃鎻愮幇鎴愬姛-" + extract.getId());
} catch (AlipayApiException e) {
- e.printStackTrace();
+ LogHelper.errorDetailInfo(e, "鏀粯瀹濊浆璐﹀紓甯�:" + extract.getId(), "");
LogHelper.userErrorInfo("鎻愮幇:鏀粯瀹濇彁鐜板紓甯革細" + response + ",鎻愮幇淇℃伅" + GsonUtil.toJson(extract));
}
@@ -541,7 +542,7 @@
return extractMapper.selectByPrimaryKey(id);
}
- @Transactional
+ @Transactional(rollbackFor = Exception.class)
@Override
public void checkExtract(Long uid) throws ExtractException {
BigDecimal compensateMoney = extractMapper.computeCompensateByUid(uid);
@@ -1086,8 +1087,7 @@
}
return listOpendIDs;
}
-
-
+
@Override
public List<UserInfo> preAutoUserTo1212() throws Exception {
int page = 0;
@@ -1139,7 +1139,7 @@
}
return list;
}
-
+
@Override
public List<String> getAutoExtractOpenIdsTo1212() throws Exception {
int page = 0;
--
Gitblit v1.8.0