Commit 8ed39cbe by 查志伟

v1.0.14 change

parent 39c32f72
...@@ -2,10 +2,10 @@ package cn.freemud.controller; ...@@ -2,10 +2,10 @@ package cn.freemud.controller;
import cn.freemud.base.entity.BaseResponse; import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.vo.*; import cn.freemud.entities.vo.*;
import cn.freemud.entities.vo.order.PayConfigVo;
import cn.freemud.enums.OrderTackCodeFactory; import cn.freemud.enums.OrderTackCodeFactory;
import cn.freemud.enums.TakeCodeOrderType; import cn.freemud.enums.TakeCodeOrderType;
import cn.freemud.manager.OrderTackCodeManager; import cn.freemud.manager.OrderTackCodeManager;
import cn.freemud.service.business.OrderBusinessService;
import cn.freemud.service.business.impl.OrderBusinessServiceImpl; import cn.freemud.service.business.impl.OrderBusinessServiceImpl;
import cn.freemud.service.impl.OrderQueueService; import cn.freemud.service.impl.OrderQueueService;
import cn.freemud.service.impl.OrderServiceImpl; import cn.freemud.service.impl.OrderServiceImpl;
...@@ -14,7 +14,6 @@ import cn.freemud.utils.ResponseUtil; ...@@ -14,7 +14,6 @@ import cn.freemud.utils.ResponseUtil;
import com.freemud.application.sdk.api.log.ApiAnnotation; import com.freemud.application.sdk.api.log.ApiAnnotation;
import com.freemud.application.sdk.api.log.LogParams; import com.freemud.application.sdk.api.log.LogParams;
import com.freemud.application.sdk.api.ordercenter.adapter.OrderCenterSdkAdapter; import com.freemud.application.sdk.api.ordercenter.adapter.OrderCenterSdkAdapter;
import com.freemud.sdk.api.assortment.message.enums.OrderType;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -48,30 +47,12 @@ public class ExposureOrderController { ...@@ -48,30 +47,12 @@ public class ExposureOrderController {
*/ */
@ApiAnnotation(logMessage = "创建支付单,查询支付配置") @ApiAnnotation(logMessage = "创建支付单,查询支付配置")
@PostMapping("/getPayConfig") @PostMapping("/getPayConfig")
public BaseResponse<String> getPayConfig(@Validated @LogParams @RequestBody GetPayConfigVo getPayConfigVo) { public BaseResponse<PayConfigVo> getPayConfig(@Validated @LogParams @RequestBody GetPayConfigVo req) {
String payConfig = payService.getPayConfig(getPayConfigVo.getPartnerId(), getPayConfigVo.getAppId()); PayConfigVo vo = new PayConfigVo();
return ResponseUtil.success(payConfig); 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 ResponseUtil.success(vo);
* 创建支付单,查询超时时间
*/
@ApiAnnotation(logMessage = "创建支付单,查询超时时间")
@PostMapping("/getPayTimeout")
public BaseResponse<String> getPayTimeout(@Validated @LogParams @RequestBody GetPayTimeoutVo getPayTimeoutVo) {
String partnerPayOvertime = payService.getPartnerPayOvertime(getPayTimeoutVo.getPartnerId());
return ResponseUtil.success(partnerPayOvertime);
}
/**
* 创建支付单,查询payCode
*/
@ApiAnnotation(logMessage = "创建支付单,查询payCode")
@PostMapping("/getPayCodeByChanel")
public BaseResponse<String> getPayCodeByChanel(@Validated @LogParams @RequestBody GetPayCodeByChanelVo getPayCodeByChanelVo) {
String payCodeByCondition = payService.getPayCodeByCondition(getPayCodeByChanelVo.getAppId(), getPayCodeByChanelVo.getStoreId(), getPayCodeByChanelVo.getChannel());
return ResponseUtil.success(payCodeByCondition);
} }
/** /**
......
...@@ -10,6 +10,11 @@ public class GetPayConfigVo { ...@@ -10,6 +10,11 @@ public class GetPayConfigVo {
@NotBlank(message = "商户号不能为空") @NotBlank(message = "商户号不能为空")
private String partnerId; private String partnerId;
@NotBlank(message = "门店id不能为空")
private String storeId;
@NotBlank(message = "小程序id不能为空") @NotBlank(message = "小程序id不能为空")
private String appId; private String appId;
private String channel;
} }
package cn.freemud.entities.vo.order;
import lombok.Data;
/**
* @author Clover.z
* @version 1.0.0
* @since 1.0.0
*/
@Data
public class PayConfigVo {
/**
* 商户支付主体名称
*/
private String principalName;
/**
* 支付超时时间
*/
private String payTimeOut;
/**
* 门店支付编号
*/
private String payCode;
}
...@@ -449,7 +449,7 @@ public class PayServiceImpl { ...@@ -449,7 +449,7 @@ public class PayServiceImpl {
/** /**
* 查询支付配置 * 查询支付配置
*/ */
private String getPaymentPrincipalName(String partnerId, String appId) { public String getPaymentPrincipalName(String partnerId, String appId) {
String redisKey = MessageFormat.format(OrderRedisKeyConstant.PARTNER_PAYMENT_PRINCIPAL_NAME, partnerId); String redisKey = MessageFormat.format(OrderRedisKeyConstant.PARTNER_PAYMENT_PRINCIPAL_NAME, partnerId);
// 先从redis中查询支付商户名称 // 先从redis中查询支付商户名称
String principalName = redisCache.hashGet(redisKey, appId); String principalName = redisCache.hashGet(redisKey, appId);
...@@ -473,10 +473,6 @@ public class PayServiceImpl { ...@@ -473,10 +473,6 @@ public class PayServiceImpl {
return principalName; return principalName;
} }
public String getPayConfig(String partnerId, String appId) {
return this.getPaymentPrincipalName(partnerId, appId);
}
/** /**
* 电子风味卡支付 * 电子风味卡支付
......
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