Commit b113ca49 by 查志伟

去掉支付超时时间查询

parent 5aed9206
......@@ -57,12 +57,6 @@ public class ExposureOrderController {
@ApiAnnotation(logMessage = "获取超时时间, 生成取餐码")
@PostMapping("/getPaySuccessData")
public BaseResponse<PaySuccessDataVo> generateTackCode(@Validated @LogParams @RequestBody GetPaySuccessDataRequest request) {
return ResponseUtil.success(exposureOrderService.getPaySuccessData(request));
}
@ApiAnnotation(logMessage = "获取超时时间, 生成取餐码,上线后删除getPaySuccessData")
@PostMapping("/getPaySuccessDataV2")
public BaseResponse<PaySuccessDataVo> getPaySuccessDataV2(@Validated @LogParams @RequestBody GetPaySuccessDataV2Request request) {
return ResponseUtil.success(exposureOrderService.getPaySuccessDataV2(request));
......
package cn.freemud.entities.vo;
import lombok.Data;
@Data
public class GetPaySuccessDataRequest {
private Integer orderType;
private String orderClient;
private String partnerId;
private String storeId;
}
......@@ -16,11 +16,6 @@ public class PayConfigVo {
private String principalName;
/**
* 支付超时时间
*/
private String payTimeOut;
/**
* 门店支付编号
*/
private String payCode;
......
package cn.freemud.service;
import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.vo.GetMallPayConfigVo;
import cn.freemud.entities.vo.GetPayConfigVo;
import cn.freemud.entities.vo.GetPaySuccessDataRequest;
import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.vo.*;
import cn.freemud.entities.vo.GetPaySuccessDataV2Request;
import cn.freemud.entities.vo.order.PayConfigVo;
import cn.freemud.entities.vo.order.PaySuccessDataVo;
import cn.freemud.entities.vo.order.QueryByKeysReq;
......@@ -48,31 +43,13 @@ public class ExposureOrderService {
public PayConfigVo getPayConfig(GetPayConfigVo req) {
PayConfigVo vo = new PayConfigVo();
vo.setPrincipalName(payService.getPaymentPrincipalName(req.getPartnerId(), req.getAppId()));
vo.setPayTimeOut(payService.getPartnerPayOvertime(req.getPartnerId()));
vo.setPayCode(payService.getPayCodeByCondition(req.getAppId(), req.getStoreId(), req.getChannel()));
return vo;
}
public PaySuccessDataVo getPaySuccessData(GetPaySuccessDataRequest reqVo) {
Integer type = TakeCodeOrderType.getTakeCodeOrderType(reqVo.getOrderType());
String takeCode = orderTackCodeManager.generateTackCode(type,
reqVo.getPartnerId(),
reqVo.getStoreId(),
null,
OrderTackCodeFactory.getByOrderClient(reqVo.getOrderClient()).getGenerateTackCodeFunc());
Integer v1Type = orderCenterSdkAdapter.getOldOrderType(reqVo.getOrderType());
Integer timeout = orderBusinessService.getPaySuccessTimeout(reqVo.getPartnerId(),
reqVo.getStoreId(),
v1Type);
PaySuccessDataVo vo = new PaySuccessDataVo();
vo.setTakeCode(takeCode);
vo.setTimeout(timeout);
return vo;
}
/**
* 获取超时时间, 生成取餐码,上线后删除getPaySuccessData
* 获取超时时间, 生成取餐码
* @param reqVo
* @return
*/
......@@ -84,7 +61,7 @@ public class ExposureOrderService {
null,
OrderTackCodeFactory.getByOrderClient(reqVo.getOrderClient()).getGenerateTackCodeFunc());
Integer timeout = 0;
int timeout = 0;
//查询待支付订单时效配置
BaseResponse<List<QueryByKeysResp>> listBaseResponse = orderServiceClient.queryByKeys(new QueryByKeysReq(reqVo.getPartnerId()));
if (listBaseResponse == null || !Objects.equals("100", listBaseResponse.getCode())) {
......@@ -94,15 +71,15 @@ public class ExposureOrderService {
for(QueryByKeysResp resp : listBaseResponse.getResult()){
// 外卖订单
if (Objects.equals(v1Type, OrderTypeV1.TAKE_OUT.getCode()) && Objects.equals("UNPAID_TIMEOUT_CLOSE_TIME_WMXF",resp.getConfigName())) {
timeout = Integer.valueOf(resp.getConfigValue());
timeout = Integer.parseInt(resp.getConfigValue());
}else if(Objects.equals(reqVo.getBizType(), BizTypeEnum.ORDINARY.getBizType()) && (Objects.equals(reqVo.getMarketingType(), MarketTypeEnum.ORDER.getIndex()) || Objects.equals(reqVo.getMarketingType(), MarketTypeEnum.CASHIER.getIndex()) )
&& Objects.equals("UNPAID_TIMEOUT_CLOSE_TIME_TSXF",resp.getConfigName())){
//堂食先付
timeout = Integer.valueOf(resp.getConfigValue());
timeout = Integer.parseInt(resp.getConfigValue());
}else if(Objects.equals(reqVo.getBizType(), BizTypeEnum.ORDINARY.getBizType()) && Objects.equals(reqVo.getMarketingType(), MarketTypeEnum.POST_ORDER.getIndex())
&& Objects.equals("UNPAID_TIMEOUT_CLOSE_TIME_TSHF",resp.getConfigName())){
//堂食后付
timeout = Integer.valueOf(resp.getConfigValue());
timeout = Integer.parseInt(resp.getConfigValue());
}
}
PaySuccessDataVo vo = new PaySuccessDataVo();
......@@ -118,7 +95,6 @@ public class ExposureOrderService {
public PayConfigVo getMallPayConfig(GetMallPayConfigVo req) {
PayConfigVo vo = new PayConfigVo();
vo.setPrincipalName(payService.getPaymentPrincipalName(req.getPartnerId(), req.getAppId()));
vo.setPayTimeOut(payService.getPartnerPayOvertime(req.getPartnerId()));
AssortmentOpenPlatformIappWxappStore wxAppStore = payService.getIappWxappStoreInfo(req.getAppId(), AggregationTypeEnum.TYPE_7.getCode());
if (wxAppStore == null) {
wxAppStore = new AssortmentOpenPlatformIappWxappStore();
......
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