Commit 91bb892f by 蒋小洋

Merge branch '3.0.21-剩余支付时间-20221010-jxy' into qa

# Conflicts:
#	order-application-service/src/main/java/cn/freemud/service/impl/PayServiceImpl.java
parents 4c6d8328 d91cb2be
......@@ -129,4 +129,13 @@ public class ExposureOrderController {
return ResponseUtil.success(exposureOrderService.getVirtualStore(req.getAppId(), req.getType()));
}
/**
* 查询支付配置paycode
*/
@ApiAnnotation(logMessage = "查询支付配置paycode")
@PostMapping("/getPayCode")
public BaseResponse<String> getPayCode(@Validated @LogParams @RequestBody GetPayCodeVo req) {
return ResponseUtil.success(exposureOrderService.getPayCode(req));
}
}
package cn.freemud.entities.vo;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@Data
public class GetPayCodeVo {
@NotBlank(message = "商户号不能为空")
private String partnerId;
@NotBlank(message = "门店id不能为空")
private String storeId;
@NotBlank(message = "小程序id不能为空")
private String appId;
private String channel;
}
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.entities.vo.GetPaySuccessDataV2Request;
import cn.freemud.entities.vo.*;
import cn.freemud.entities.vo.order.PayConfigVo;
import cn.freemud.entities.vo.order.PaySuccessDataVo;
import cn.freemud.entities.vo.order.QueryByKeysReq;
......@@ -136,4 +133,11 @@ public class ExposureOrderService {
AssortmentOpenPlatformIappWxappStore wxAppStore = payService.getIappWxappStoreInfo(appId, type);
return wxAppStore == null ? "" : wxAppStore.getStoreId();
}
/**
* 查询支付配置paycode
*/
public String getPayCode(GetPayCodeVo req) {
return payService.getPayCode(req.getAppId(), req.getStoreId(), req.getChannel());
}
}
......@@ -1711,4 +1711,16 @@ public class PayServiceImpl {
return refundResponse;
}
public String getPayCode(String wxAppid, String storeId, String channel) {
PayChannelType byIndex = PayChannelType.getByIndex(Byte.parseByte(channel));
if (byIndex.getEbcode() == null) return "";
AssortmentOpenPlatformIappWxappStore wxAppStore = assortmentOpenPlatformIappWxappStoreManager.selectWxappStoreByWxAppIdAndStoreId(wxAppid
, storeId
, byIndex.getEbcode());
if (wxAppStore != null && StringUtils.isNotBlank(wxAppStore.getPayCode())) {
return wxAppStore.getPayCode();
}
return "9";
}
}
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