|
@@ -826,7 +826,7 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
|
|
|
detailVo.setTempId(storeProduct.getTempId());
|
|
|
detailVo.setIsSub(storeProduct.getIsSub());
|
|
|
detailVo.setProductType(Constants.PRODUCT_TYPE_NORMAL);
|
|
|
- detailVo.setVipPrice(detailVo.getPrice());
|
|
|
+ detailVo.setVipPrice(attrValue.getPrice());
|
|
|
detailVo.setGiveIntegral(storeProduct.getGiveIntegral());
|
|
|
// if (ObjectUtil.isNotNull(userLevel)) {
|
|
|
// detailVo.setVipPrice(detailVo.getPrice());
|
|
@@ -1051,12 +1051,13 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
|
|
|
// }
|
|
|
// }
|
|
|
// // 积分部分
|
|
|
- // BigDecimal payPrice = orderInfoVo.getProTotalFee().add(priceResponse.getFreightFee()).subtract(priceResponse.getCouponFee());
|
|
|
+ priceResponse.setCouponFee(BigDecimal.ZERO);
|
|
|
+ BigDecimal payPrice = orderInfoVo.getProTotalFee().add(priceResponse.getFreightFee()).subtract(priceResponse.getCouponFee());
|
|
|
priceResponse.setProTotalFee(orderInfoVo.getProTotalFee());
|
|
|
// 不使用积分
|
|
|
priceResponse.setDeductionPrice(BigDecimal.ZERO);
|
|
|
// priceResponse.setSurplusIntegral(user.getIntegral());
|
|
|
- // priceResponse.setPayFee(payPrice);
|
|
|
+ priceResponse.setPayFee(payPrice);
|
|
|
priceResponse.setUsedIntegral(0);
|
|
|
return priceResponse;
|
|
|
// // 使用积分
|
|
@@ -1657,7 +1658,7 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
|
|
|
if (result.getCode().equals(ResultCode.SUCCESS.getCode())) {
|
|
|
AccountDTO accountDTO = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), AccountDTO.class);
|
|
|
if (accountDTO.getBalance().compareTo(storeOrder.getPayPrice()) < 0) {
|
|
|
- throw new ServiceException(ResultCode.INSUFFICIENT_BALANCE);
|
|
|
+ throw new ServiceException(ResultCode.INSUFFICIENT_BALANCE.getMessage()+"uid:"+storeOrder.getUid());
|
|
|
}
|
|
|
} else {
|
|
|
throw new ServiceException("获取用户钱包账户失败");
|
|
@@ -1673,7 +1674,10 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
|
|
|
openParam.setTransTime(new Date());
|
|
|
|
|
|
//
|
|
|
- // accountDubboServiceClient.openGroup(openParam);
|
|
|
+ Result result1 = accountDubboServiceClient.openGroup(openParam);
|
|
|
+ if(!result1.getCode().equals("200")){
|
|
|
+ throw new ServiceException("支付失败"+result1.getMessage());
|
|
|
+ }
|
|
|
updateOrderStatus(storeOrder.getId(), pinkOrderStatusEnum.getKey());
|
|
|
storePinkService.pinkSuccess(storeOrder.getPinkId(), storeOrder);
|
|
|
// goOpen(dto.getOrderId());
|
|
@@ -1685,7 +1689,10 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
|
|
|
joinParam.setUserId(storeOrder.getUid());
|
|
|
joinParam.setAmount(storeOrder.getPayPrice());
|
|
|
joinParam.setTransTime(new Date());
|
|
|
- // accountDubboServiceClient.joinGroup(joinParam);
|
|
|
+ Result result1 = accountDubboServiceClient.joinGroup(joinParam);
|
|
|
+ if(!result1.getCode().equals("200")){
|
|
|
+ throw new ServiceException("支付失败"+result1.getMessage());
|
|
|
+ }
|
|
|
updateOrderStatus(storeOrder.getId(), pinkOrderStatusEnum.getKey());
|
|
|
storePinkService.pinkSuccess(storeOrder.getPinkId(), storeOrder);
|
|
|
// goPink(dto);
|
|
@@ -1741,15 +1748,15 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
|
|
|
AccomplishParam param = new AccomplishParam();
|
|
|
param.setBizNo(storeOrder.getOrderId());
|
|
|
param.setBizId(storeOrder.getId().toString());
|
|
|
- List<Long> userIds = CollUtil.newArrayList();
|
|
|
+ List<Long> userIds = CollUtil.newArrayList(storeOrder.getUid());
|
|
|
param.setUserIds(userIds);
|
|
|
- param.setAmount(storePink.getTotalPrice());
|
|
|
+ param.setAmount(storeOrder.getPayPrice());
|
|
|
param.setTransTime(date);
|
|
|
-// Result result = accountDubboServiceClient.accomplishGroup(param);
|
|
|
-// boolean equals = result.getCode().equals("200");
|
|
|
-// if(!equals){
|
|
|
-// throw new ServiceException("退款失败请重新发起");
|
|
|
-// }
|
|
|
+ Result result = accountDubboServiceClient.accomplishGroup(param);
|
|
|
+ boolean equals = result.getCode().equals("200");
|
|
|
+ if(!equals){
|
|
|
+ throw new ServiceException("退款失败请重新发起");
|
|
|
+ }
|
|
|
updateOrderStatus(storeOrder.getId(), pinkOrderStatusEnum.getKey());
|
|
|
//订单状态回退
|
|
|
//拼团状态回退
|
|
@@ -1841,15 +1848,15 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
|
|
|
AccomplishParam param = new AccomplishParam();
|
|
|
param.setBizNo(storeOrder.getOrderId());
|
|
|
param.setBizId(storeOrder.getId().toString());
|
|
|
- List<Long> userIds = CollUtil.newArrayList();
|
|
|
+ List<Long> userIds = CollUtil.newArrayList(storeOrder.getUid());
|
|
|
param.setUserIds(userIds);
|
|
|
- param.setAmount(storePink.getTotalPrice());
|
|
|
+ param.setAmount(storeOrder.getPayPrice());
|
|
|
param.setTransTime(date);
|
|
|
-// Result result = accountDubboServiceClient.accomplishGroup(param);
|
|
|
-// boolean equals = result.getCode().equals("200");
|
|
|
-// if(!equals){
|
|
|
-// throw new ServiceException("退款失败请重新发起");
|
|
|
-// }
|
|
|
+ Result result = accountDubboServiceClient.accomplishGroup(param);
|
|
|
+ boolean equals = result.getCode().equals("200");
|
|
|
+ if(!equals){
|
|
|
+ throw new ServiceException("退款失败请重新发起orderId:"+storeOrder.getOrderId());
|
|
|
+ }
|
|
|
|
|
|
updateOrderStatus(storeOrder.getId(), pinkOrderStatusEnum.getKey());
|
|
|
|