Commit 7ab4d09d by xiaoer.li@freemud.com

增加超时退款入口

parent aec12131
...@@ -364,5 +364,15 @@ public class OrderController { ...@@ -364,5 +364,15 @@ public class OrderController {
return orderservice.mcCafePollingPickUpCode(vo); return orderservice.mcCafePollingPickUpCode(vo);
} }
/**
* timeOutRefund
* @param timeOutOrderVo
* @return
*/
@ApiAnnotation(logMessage = "timeOutOrderRefund")
@PostMapping("/timeOutOrderRefund")
public BaseResponse timeOutOrderRefund(@Validated @LogParams @RequestBody TimeOutOrderVo timeOutOrderVo){
return orderservice.timeOutOrderRefund(timeOutOrderVo);
}
} }
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @Title: GetProductVo
* @Package cn.freemud.entities.vo
* @Description:
* @author: liming.guo
* @date: 2018/5/16 17:35
* @version V1.0
* @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
package cn.freemud.entities.vo;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;
@Data
public class TimeOutOrderVo {
@NotEmpty(message = "订单编号不能为空")
private String oid;
private String partnerId;
}
...@@ -142,4 +142,6 @@ public interface Orderservice { ...@@ -142,4 +142,6 @@ public interface Orderservice {
* @return * @return
*/ */
BaseResponse queryCollageOrderById(Integer operation,String sessionId, String oid, String partnerId,String channel); BaseResponse queryCollageOrderById(Integer operation,String sessionId, String oid, String partnerId,String channel);
BaseResponse timeOutOrderRefund(TimeOutOrderVo timeOutOrderVo);
} }
...@@ -134,6 +134,7 @@ import com.google.gson.Gson; ...@@ -134,6 +134,7 @@ import com.google.gson.Gson;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringBuilder;
...@@ -1154,6 +1155,20 @@ public class OrderServiceImpl implements Orderservice { ...@@ -1154,6 +1155,20 @@ public class OrderServiceImpl implements Orderservice {
} }
@Override
public BaseResponse timeOutOrderRefund(TimeOutOrderVo timeOutOrderVo) {
Map<String, QueryOrdersResponseDto.DataBean.OrderBean> orderBeans = this.getOrderBeanByOrderId(timeOutOrderVo.getOid());
if (MapUtils.isEmpty(orderBeans)) {
ResponseUtil.error("404","订单不存在");
}
QueryOrdersResponseDto.DataBean.OrderBean orderBean = orderBeans.get(OrderBeanType.SAASORDER.getCode());
if (!PayStatus.NOT_PAY.getCode().equals(orderBean.getPayStatus())){
this.timeOutRefund(orderBean);
}
return ResponseUtil.success();
}
private String getRedpacketsPicture(String activityId) { private String getRedpacketsPicture(String activityId) {
if (StringUtils.isNotBlank(activityId)) { if (StringUtils.isNotBlank(activityId)) {
try { try {
...@@ -3567,4 +3582,5 @@ public class OrderServiceImpl implements Orderservice { ...@@ -3567,4 +3582,5 @@ public class OrderServiceImpl implements Orderservice {
} }
} }
} }
} }
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