Commit 79362c00 by jiangxiaoyang

getPayCode

parent 2bd92949
...@@ -122,4 +122,13 @@ public class ExposureOrderController { ...@@ -122,4 +122,13 @@ public class ExposureOrderController {
return ResponseUtil.success(exposureOrderService.getVirtualStore(req.getAppId(), req.getType())); 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;
}
...@@ -3,6 +3,8 @@ package cn.freemud.service; ...@@ -3,6 +3,8 @@ package cn.freemud.service;
import cn.freemud.entities.vo.GetMallPayConfigVo; import cn.freemud.entities.vo.GetMallPayConfigVo;
import cn.freemud.entities.vo.GetPayConfigVo; import cn.freemud.entities.vo.GetPayConfigVo;
import cn.freemud.entities.vo.GetPaySuccessDataRequest; import cn.freemud.entities.vo.GetPaySuccessDataRequest;
import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.vo.*;
import cn.freemud.entities.vo.order.PayConfigVo; import cn.freemud.entities.vo.order.PayConfigVo;
import cn.freemud.entities.vo.order.PaySuccessDataVo; import cn.freemud.entities.vo.order.PaySuccessDataVo;
import cn.freemud.enums.AggregationTypeEnum; import cn.freemud.enums.AggregationTypeEnum;
...@@ -84,4 +86,11 @@ public class ExposureOrderService { ...@@ -84,4 +86,11 @@ public class ExposureOrderService {
AssortmentOpenPlatformIappWxappStore wxAppStore = payService.getIappWxappStoreInfo(appId, type); AssortmentOpenPlatformIappWxappStore wxAppStore = payService.getIappWxappStoreInfo(appId, type);
return wxAppStore == null ? "" : wxAppStore.getStoreId(); 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 { ...@@ -1711,4 +1711,16 @@ public class PayServiceImpl {
return payTypeCode; return payTypeCode;
} }
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