rename
catch redis exception
Showing
1 changed file
with
12 additions
and
7 deletions
@@ -146,7 +146,7 @@ public class SellerOrderCancelService { | @@ -146,7 +146,7 @@ public class SellerOrderCancelService { | ||
146 | 146 | ||
147 | SellerOrderStatusNode statusNode = SellerOrderStatusNode.builder() | 147 | SellerOrderStatusNode statusNode = SellerOrderStatusNode.builder() |
148 | .exceptStatus(SellerOrderStatus.WAITING_PAY).targetStatus(targetSOStatus).build(); | 148 | .exceptStatus(SellerOrderStatus.WAITING_PAY).targetStatus(targetSOStatus).build(); |
149 | - result = cancelBeforePayAction(uid, orderCode, skup, statusNode); | 149 | + result = cancelBeforeBuyerPayAction(uid, orderCode, skup, statusNode); |
150 | } | 150 | } |
151 | 151 | ||
152 | //case 2: 支付完成,没有买家下单 | 152 | //case 2: 支付完成,没有买家下单 |
@@ -180,7 +180,7 @@ public class SellerOrderCancelService { | @@ -180,7 +180,7 @@ public class SellerOrderCancelService { | ||
180 | SellerOrderStatusNode statusNode = SellerOrderStatusNode.builder() | 180 | SellerOrderStatusNode statusNode = SellerOrderStatusNode.builder() |
181 | .exceptStatus(SellerOrderStatus.WAITING_PAY) | 181 | .exceptStatus(SellerOrderStatus.WAITING_PAY) |
182 | .targetStatus(targetSOStatus).build(); | 182 | .targetStatus(targetSOStatus).build(); |
183 | - result = cancelBeforePayAction(uid, orderCode, sellerOrder.getSkup(), statusNode); | 183 | + result = cancelBeforeBuyerPayAction(uid, orderCode, sellerOrder.getSkup(), statusNode); |
184 | } | 184 | } |
185 | 185 | ||
186 | return result; | 186 | return result; |
@@ -192,7 +192,7 @@ public class SellerOrderCancelService { | @@ -192,7 +192,7 @@ public class SellerOrderCancelService { | ||
192 | SellerOrderStatus exceptStatus; | 192 | SellerOrderStatus exceptStatus; |
193 | } | 193 | } |
194 | 194 | ||
195 | - private int cancelBeforePayAction(int uid, long orderCode, Integer skup, SellerOrderStatusNode statusNode){ | 195 | + private int cancelBeforeBuyerPayAction(int uid, long orderCode, Integer skup, SellerOrderStatusNode statusNode){ |
196 | SellerOrderStatus targetSOStatus = statusNode.targetStatus; | 196 | SellerOrderStatus targetSOStatus = statusNode.targetStatus; |
197 | SellerOrderStatus exceptStatus = statusNode.exceptStatus; | 197 | SellerOrderStatus exceptStatus = statusNode.exceptStatus; |
198 | logger.info("in seller cancel before Buy Action, uid {} skup {} orderCode {} targetSOStatus {}, exceptStatus {}", | 198 | logger.info("in seller cancel before Buy Action, uid {} skup {} orderCode {} targetSOStatus {}, exceptStatus {}", |
@@ -236,9 +236,14 @@ public class SellerOrderCancelService { | @@ -236,9 +236,14 @@ public class SellerOrderCancelService { | ||
236 | logger.warn("in seller cancel before Buy Action syncSkup fail, uid {}, skup {}", uid, skup, ex); | 236 | logger.warn("in seller cancel before Buy Action syncSkup fail, uid {}, skup {}", uid, skup, ex); |
237 | } | 237 | } |
238 | 238 | ||
239 | - cacheCleaner.cleanList(uid, TabType.SELL.getValue()); | ||
240 | - SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(skup); | ||
241 | - cacheCleaner.cleanSellerDetail(psog); | 239 | + try{ |
240 | + cacheCleaner.cleanList(uid, TabType.SELL.getValue()); | ||
241 | + SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(skup); | ||
242 | + cacheCleaner.cleanSellerDetail(psog); | ||
243 | + }catch (Exception ex){ | ||
244 | + logger.warn("in seller cancel before Buy Action clean cache of list and detail fail, uid {}, skup {}", | ||
245 | + uid, skup, ex); | ||
246 | + } | ||
242 | } | 247 | } |
243 | 248 | ||
244 | return result; | 249 | return result; |
@@ -263,7 +268,7 @@ public class SellerOrderCancelService { | @@ -263,7 +268,7 @@ public class SellerOrderCancelService { | ||
263 | 268 | ||
264 | SellerOrderStatusNode statusNode = SellerOrderStatusNode.builder().targetStatus(targetSOStatus) | 269 | SellerOrderStatusNode statusNode = SellerOrderStatusNode.builder().targetStatus(targetSOStatus) |
265 | .exceptStatus(expectStatus).build(); | 270 | .exceptStatus(expectStatus).build(); |
266 | - int result = cancelBeforePayAction(sellerUid, orderCode, skup, statusNode); | 271 | + int result = cancelBeforeBuyerPayAction(sellerUid, orderCode, skup, statusNode); |
267 | 272 | ||
268 | if(result > 0 ){ | 273 | if(result > 0 ){ |
269 | double earnestMoney = sellerOrder.getEarnestMoney().doubleValue(); | 274 | double earnestMoney = sellerOrder.getEarnestMoney().doubleValue(); |
-
Please register or login to post a comment