From 0849ec5d0ba9934035e78f490357366ca7e84224 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 26 七月 2019 17:41:06 +0800
Subject: [PATCH] 维权订单相关修改
---
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserShareGoodsRecordServiceImpl.java | 32 +++++++++++++++++++++++++++-----
1 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserShareGoodsRecordServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserShareGoodsRecordServiceImpl.java
index 4f6a5c4..005f9da 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserShareGoodsRecordServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserShareGoodsRecordServiceImpl.java
@@ -197,6 +197,28 @@
}
}
}
+
+ String shareType = shareRecord.getShareType();
+ if (StringUtil.isNullOrEmpty(shareType)) {
+ shareRecord.setShareType(UserShareGoodsRecord.SHARETYPE_SINGLE);
+ }
+
+ BigDecimal totalMoney = shareRecord.getTotalMoney();
+ if (totalMoney == null) {
+ shareRecord.setTotalMoney(new BigDecimal(0));
+ }
+ }
+ } else {
+ for (UserShareGoodsRecord shareRecord : list) {
+ String shareType = shareRecord.getShareType();
+ if (StringUtil.isNullOrEmpty(shareType)) {
+ shareRecord.setShareType(UserShareGoodsRecord.SHARETYPE_SINGLE);
+ }
+
+ BigDecimal totalMoney = shareRecord.getTotalMoney();
+ if (totalMoney == null) {
+ shareRecord.setTotalMoney(new BigDecimal(0));
+ }
}
}
}
@@ -621,7 +643,7 @@
recordDTO.setSource(ShareSourceTypeEnum.goodsDetail);
// 鍒嗕韩id
- String key = StringUtil.Md5(uid + "#" + auctionId);
+ String key = StringUtil.Md5(uid + "#GoodsDetail#" + auctionId);
redisManager.cacheCommonString(key, JsonUtil.getSimpleGson().toJson(recordDTO), 60 * 20);
recordDTO.setRedisKey(key);
@@ -659,7 +681,7 @@
recordDTO.setSource(ShareSourceTypeEnum.storage);
// 缂撳瓨鍒嗕韩鍟嗗搧淇℃伅
- String key = StringUtil.Md5(uid + "##" + id);
+ String key = StringUtil.Md5(uid + "#GoodsStorage#" + id);
recordDTO.setRedisKey(key);
redisManager.cacheCommonString(key, JsonUtil.getSimpleGson().toJson(recordDTO), 60 * 20);
@@ -698,7 +720,7 @@
recordDTO.setSharePictureUrl(uploadResult.getUrl());
recordDTO.setSource(ShareSourceTypeEnum.activity);
// 缂撳瓨鍒嗕韩鍟嗗搧淇℃伅
- String key = StringUtil.Md5(uid + "##" + id);
+ String key = StringUtil.Md5(uid + "#Activity#" + id);
recordDTO.setRedisKey(key);
redisManager.cacheCommonString(key, JsonUtil.getSimpleGson().toJson(recordDTO), 60 * 20);
@@ -734,7 +756,7 @@
recordDTO.setSource(ShareSourceTypeEnum.activity);
// 缂撳瓨鍒嗕韩鍟嗗搧淇℃伅
- String key = StringUtil.Md5(uid + "##" + id);
+ String key = StringUtil.Md5(uid + "#Dynamic#" + id);
recordDTO.setRedisKey(key);
redisManager.cacheCommonString(key, JsonUtil.getSimpleGson().toJson(recordDTO), 60 * 20);
@@ -867,7 +889,7 @@
}
}
- InputStream inputStream = ImageUtil.drawGoodsShareBigImg(erCodeInputStream, portrait, listGoods);
+ InputStream inputStream = ImageUtil.drawGoodsSharePicture(erCodeInputStream, portrait, listGoods);
FileUploadResult shareImg = COSManager.getInstance().uploadInputStream(inputStream,
"sharegoods/share_" + uid + "_" + shareId + "_" + System.currentTimeMillis() + ".png");
--
Gitblit v1.8.0