Commit 5f031f9a by chongfu.liang

Merge remote-tracking branch 'origin/develop' into develop

parents c3982ad2 480df441
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>assortment-ordercenter-sdk</artifactId> <artifactId>assortment-ordercenter-sdk</artifactId>
<version>2.1.7-SNAPSHOT</version> <version>2.1.8-SNAPSHOT</version>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<dependency> <dependency>
<artifactId>promotioncenter-sdk</artifactId> <artifactId>promotioncenter-sdk</artifactId>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
<version>2.6.5.SNAPSHOT</version> <version>2.7.RELEASE</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
......
...@@ -93,3 +93,4 @@ ...@@ -93,3 +93,4 @@
| 2.1.3-SNAPSHOT| redis工具类添加解锁方法 | 刘鹏飞 | 2020-11-10 | | 2.1.3-SNAPSHOT| redis工具类添加解锁方法 | 刘鹏飞 | 2020-11-10 |
| 2.1.6-SNAPSHOT| 升级ordercenter-sdk | lixixoaer | 2020-11-10 | | 2.1.6-SNAPSHOT| 升级ordercenter-sdk | lixixoaer | 2020-11-10 |
| 2.1.7-SNAPSHOT| 混合支付退款 | lixixoaer | 2020-11-11 | | 2.1.7-SNAPSHOT| 混合支付退款 | lixixoaer | 2020-11-11 |
| 2.1.8-SNAPSHOT| 退款增加自动退款配置的null判断 | 刘鹏飞 | 2020-11-12 |
\ No newline at end of file
...@@ -557,7 +557,11 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService { ...@@ -557,7 +557,11 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService {
*/ */
private OrderTaskReq setAfterSalesOrderTimeOutTask(StoreResponse.Configuration configuration) { private OrderTaskReq setAfterSalesOrderTimeOutTask(StoreResponse.Configuration configuration) {
if(configuration != null && (configuration.getTimeTypeOfRefund() != null && 2 == configuration.getTimeTypeOfRefund().intValue()) || configuration.getTimeTypeOfRefund() == null){// 48小时之后 if(configuration == null ){
return null;
}
if((configuration.getTimeTypeOfRefund() != null && 2 == configuration.getTimeTypeOfRefund().intValue()) || configuration.getTimeTypeOfRefund() == null){// 48小时之后
OrderTaskReq orderTask = new OrderTaskReq(); OrderTaskReq orderTask = new OrderTaskReq();
orderTask.setTaskType(4); orderTask.setTaskType(4);
orderTask.setTimeout(1); orderTask.setTimeout(1);
...@@ -571,7 +575,7 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService { ...@@ -571,7 +575,7 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService {
orderTask.setProcessingTime(DateUtil.convert2String(processingDate, DateUtil.FORMAT_YYYY_MM_DD_HHMMSS)); orderTask.setProcessingTime(DateUtil.convert2String(processingDate, DateUtil.FORMAT_YYYY_MM_DD_HHMMSS));
return orderTask; return orderTask;
}else if(configuration != null && configuration.getTimeTypeOfRefund() != null && 1 == configuration.getTimeTypeOfRefund().intValue()){// 指定时间 }else if(configuration.getTimeTypeOfRefund() != null && 1 == configuration.getTimeTypeOfRefund().intValue()){// 指定时间
OrderTaskReq orderTask = new OrderTaskReq(); OrderTaskReq orderTask = new OrderTaskReq();
orderTask.setTaskType(4); orderTask.setTaskType(4);
orderTask.setTimeout(1); orderTask.setTimeout(1);
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<dependency> <dependency>
<groupId>cn.freemud</groupId> <groupId>cn.freemud</groupId>
<artifactId>assortment-ordercenter-sdk</artifactId> <artifactId>assortment-ordercenter-sdk</artifactId>
<version>2.1.7-SNAPSHOT</version> <version>2.1.8-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<dependency> <dependency>
<artifactId>promotioncenter-sdk</artifactId> <artifactId>promotioncenter-sdk</artifactId>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
<version>2.6.5.SNAPSHOT</version> <version>2.7.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.freemud.sdk.api.assortment</groupId> <groupId>com.freemud.sdk.api.assortment</groupId>
......
...@@ -104,22 +104,22 @@ public class OrderController { ...@@ -104,22 +104,22 @@ public class OrderController {
/** /**
* 订单支付成功后通知 * 订单支付成功后通知
*/
@ApiAnnotation(logMessage = "paySuccessCallback") @ApiAnnotation(logMessage = "paySuccessCallback")
@PostMapping("/paySuccessCallback") @PostMapping("/paySuccessCallback")
public String paySuccessCallback(@LogParams @RequestBody PaysuccessNoticeMessage message) { public String paySuccessCallback(@LogParams @RequestBody PaysuccessNoticeMessage message) {
return orderAdapterService.paySuccessCallback(message); return orderAdapterService.paySuccessCallback(message);
} }
*/
/** /**
* 订单支付成功后通知 * 订单支付成功后通知
*/
@ApiAnnotation(logMessage = "newPaySuccessCallback") @ApiAnnotation(logMessage = "newPaySuccessCallback")
@PostMapping({"/newPaySuccessCallback","/openStoreQueryPaymentCallback"}) @PostMapping({"/newPaySuccessCallback","/openStoreQueryPaymentCallback"})
public String newPaySuccessCallback(@LogParams @RequestBody NewPaysuccessNoticeMessage message) { public String newPaySuccessCallback(@LogParams @RequestBody NewPaysuccessNoticeMessage message) {
return orderservice.newPaySuccessCallback(message); return orderservice.newPaySuccessCallback(message);
} }
*/
/** /**
* 麦咖啡订单支付成功后通知 * 麦咖啡订单支付成功后通知
*/ */
......
...@@ -157,12 +157,10 @@ public class OrderAdapterServiceImpl implements OrderAdapterService { ...@@ -157,12 +157,10 @@ public class OrderAdapterServiceImpl implements OrderAdapterService {
} }
return orderService.createOrderNew(createOrderVo); return orderService.createOrderNew(createOrderVo);
} catch (Exception e) { } catch (Exception e) {
log.error("创建订单失败,trackingNo:{}", LogTreadLocal.getTrackingNo()); throw e;
} finally { } finally {
LockUtils.unlock(redisCache.getRedisTemplate(),createOrderKey); //LockUtils.unlock(redisCache.getRedisTemplate(),createOrderKey);
} }
return ResponseUtil.error(ResponseResult.ORDER_CREATE_ERROR);
} }
......
...@@ -47,6 +47,7 @@ import cn.freemud.entities.dto.shoppingCart.ShoppingCartGoodsDto; ...@@ -47,6 +47,7 @@ import cn.freemud.entities.dto.shoppingCart.ShoppingCartGoodsDto;
import cn.freemud.entities.vo.*; import cn.freemud.entities.vo.*;
import cn.freemud.enums.*; import cn.freemud.enums.*;
import cn.freemud.interceptor.ServiceException; import cn.freemud.interceptor.ServiceException;
import cn.freemud.management.thirdparty.MulitiPaymentClient;
import cn.freemud.redis.RedisCache; import cn.freemud.redis.RedisCache;
import cn.freemud.service.*; import cn.freemud.service.*;
import cn.freemud.service.thirdparty.*; import cn.freemud.service.thirdparty.*;
...@@ -135,7 +136,6 @@ import org.springframework.beans.BeanUtils; ...@@ -135,7 +136,6 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import tk.mybatis.mapper.util.StringUtil; import tk.mybatis.mapper.util.StringUtil;
...@@ -258,8 +258,6 @@ public class OrderServiceImpl implements Orderservice { ...@@ -258,8 +258,6 @@ public class OrderServiceImpl implements Orderservice {
@Autowired @Autowired
private PaymentApplicationClient paymentApplicationClient; private PaymentApplicationClient paymentApplicationClient;
@Autowired @Autowired
private RedisTemplate redisTemplate;
@Autowired
private MulitiPaymentClient mulitiPaymentClient; private MulitiPaymentClient mulitiPaymentClient;
@Autowired @Autowired
......
package cn.freemud.service.impl; package cn.freemud.service.impl;
import cn.freemud.service.thirdparty.MulitiPaymentClient; import cn.freemud.management.thirdparty.MulitiPaymentClient;
import com.freemud.sdk.api.assortment.order.request.order.MultiOrderRefundRequest; import com.freemud.sdk.api.assortment.order.request.order.MultiOrderRefundRequest;
import com.freemud.sdk.api.assortment.order.response.order.MultiOrderRefundResponse; import com.freemud.sdk.api.assortment.order.response.order.MultiOrderRefundResponse;
import org.junit.Test; import org.junit.Test;
......
...@@ -5,7 +5,7 @@ import cn.freemud.management.entities.dto.request.order.OrderManagerRequest; ...@@ -5,7 +5,7 @@ import cn.freemud.management.entities.dto.request.order.OrderManagerRequest;
import cn.freemud.management.entities.dto.response.pay.PayRefundResponse; import cn.freemud.management.entities.dto.response.pay.PayRefundResponse;
import cn.freemud.management.enums.ResponseResult; import cn.freemud.management.enums.ResponseResult;
import cn.freemud.management.intercept.OrderServiceException; import cn.freemud.management.intercept.OrderServiceException;
import cn.freemud.management.thirdparty.MulitiOrderPaymentClient; import cn.freemud.management.thirdparty.MulitiPaymentClient;
import cn.freemud.management.util.RedisUtil; import cn.freemud.management.util.RedisUtil;
import cn.freemud.redis.RedisCache; import cn.freemud.redis.RedisCache;
import com.freemud.application.sdk.api.base.BaseResponse; import com.freemud.application.sdk.api.base.BaseResponse;
...@@ -53,7 +53,7 @@ public class PaymentHandle { ...@@ -53,7 +53,7 @@ public class PaymentHandle {
@Autowired @Autowired
private OrderSdkService orderSdkService; private OrderSdkService orderSdkService;
@Autowired @Autowired
private MulitiOrderPaymentClient mulitiOrderPaymentClient; private MulitiPaymentClient mulitiPaymentClient;
@Autowired @Autowired
private RedisCache redisCache; private RedisCache redisCache;
/** /**
...@@ -145,7 +145,7 @@ public class PaymentHandle { ...@@ -145,7 +145,7 @@ public class PaymentHandle {
public PayRefundResponse multiRefund(QueryOrdersResponse.DataBean.OrderBean orderBean){ public PayRefundResponse multiRefund(QueryOrdersResponse.DataBean.OrderBean orderBean){
PayRefundStatus refundStatus=PayRefundStatus.SUCCESS; PayRefundStatus refundStatus=PayRefundStatus.SUCCESS;
MultiOrderRefundRequest multiOrderRefundRequest = paymentSdkAdapter.getMultiOrderPayRefundRequest(orderBean); MultiOrderRefundRequest multiOrderRefundRequest = paymentSdkAdapter.getMultiOrderPayRefundRequest(orderBean);
MultiOrderRefundResponse<MultiOrderRefundResponse.Data> multiOrderRefundResponse = mulitiOrderPaymentClient.paymentApplicationRefund(multiOrderRefundRequest,orderBean.getCompanyId()); MultiOrderRefundResponse<MultiOrderRefundResponse.Data> multiOrderRefundResponse = mulitiPaymentClient.paymentApplicationRefund(multiOrderRefundRequest,orderBean.getCompanyId());
if (multiOrderRefundResponse == null || multiOrderRefundResponse.getData() == null || !com.freemud.sdk.api.assortment.order.domain.ResponseCodeConstant.ORDER_PAY_RESPONSE_SUCCESS.equals(multiOrderRefundResponse.getCode())) { if (multiOrderRefundResponse == null || multiOrderRefundResponse.getData() == null || !com.freemud.sdk.api.assortment.order.domain.ResponseCodeConstant.ORDER_PAY_RESPONSE_SUCCESS.equals(multiOrderRefundResponse.getCode())) {
throw new OrderServiceException(ResponseResult.REFUND_EXCEPTION); throw new OrderServiceException(ResponseResult.REFUND_EXCEPTION);
} }
......
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @Title: OrderClient
* @Package cn.freemud.service.thirdparty
* @Description:
* @author: liming.guo
* @date: 2018/8/10 16:06
* @version V1.0
* @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
package cn.freemud.management.thirdparty;
import com.freemud.sdk.api.assortment.order.request.order.MultiOrderRefundRequest;
import com.freemud.sdk.api.assortment.order.response.order.MultiOrderRefundResponse;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
@FeignClient(name = "payment-center-application-api",url = "${saas.paymentcenter.application.api.feign.url}")
@RequestMapping(produces = {"application/json;charset=UTF-8"})
public interface MulitiOrderPaymentClient {
/**
* 统一活动查询接口
*/
@PostMapping("/payment/application/refund")
MultiOrderRefundResponse paymentApplicationRefund(MultiOrderRefundRequest multiOrderRefundRequest, @RequestHeader("partnerId") String partnerId);
}
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* @Copyright: 2018 www.freemud.cn Inc. All rights reserved. * @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目 * 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/ */
package cn.freemud.service.thirdparty; package cn.freemud.management.thirdparty;
import com.freemud.sdk.api.assortment.order.request.order.MultiOrderRefundRequest; import com.freemud.sdk.api.assortment.order.request.order.MultiOrderRefundRequest;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment