Commit 803f985b by 周晓航

Merge branch 'feature/zxh/【【华莱士】储值对账功能优化】-20220913' into qa

parents 27b77a88 ac3bc32a
......@@ -61,15 +61,15 @@ public class CombPayRequest {
/**
* 商家POS机编号(可以使用固定值,扫码付必传)
*/
private String station_id = "1";;
private String station_id = "1";
private String appId;
private String payCode;
private String payTimeOutTime;
private String ebCode;
private String cardCode;
private Boolean disable_service_goods_tag = false;
private String request_source ="V1";
private String ver ="10";
private String request_source = "V1";
private String ver = "10";
private String storeName;
private Long merchantDiscount;
......@@ -87,4 +87,19 @@ public class CombPayRequest {
* 支付类型编码 TWX:微信 TZFB:支付宝
*/
private String payTypeCode;
/**
* 订单号
*/
private String orderId;
/**
* 手机号
*/
private String mobile;
/**
* 会员编号
*/
private String memberId;
}
......@@ -61,14 +61,15 @@ public class MultiPayRequest {
/**
* 商家POS机编号(可以使用固定值,扫码付必传)
*/
private String station_id = "1";;
private String station_id = "1";
;
private String appId;
private String payCode;
private String payTimeOutTime;
private String ebCode;
private Boolean disable_service_goods_tag = false;
private String request_source ="V1";
private String ver ="10";
private String request_source = "V1";
private String ver = "10";
private String storeName;
private Long merchantDiscount;
......@@ -89,4 +90,20 @@ public class MultiPayRequest {
* 支付类型编码 TWX:微信 TZFB:支付宝
*/
private String payTypeCode;
/**
* 订单号
*/
private String orderId;
/**
* 手机号
*/
private String mobile;
/**
* 会员编号
*/
private String memberId;
}
......@@ -36,10 +36,7 @@ import cn.freemud.interceptor.ServiceException;
import cn.freemud.management.entities.dto.request.BatchOrderRefundV2Request;
import cn.freemud.management.entities.dto.request.pay.PayRefundRequestDto;
import cn.freemud.redis.RedisCache;
import cn.freemud.utils.AppLogUtil;
import cn.freemud.utils.BarcodeUtil;
import cn.freemud.utils.QrCodeUtil;
import cn.freemud.utils.WebUtil;
import cn.freemud.utils.*;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
......@@ -3442,6 +3439,9 @@ public class OrderAdapter {
, String channel
, Integer totalAmount) {
CombPayRequest orderPayDto = new CombPayRequest();
orderPayDto.setOrderId(orderBean.getOid());
orderPayDto.setMobile(orderBean.getPhone());
orderPayDto.setMemberId(orderBean.getUserId());
orderPayDto.setEbCode(paymentRequest.getPayCode());
orderPayDto.setPartner_id(orderBean.getCompanyId());
orderPayDto.setBody(paymentRequest.getPrincipalName());
......@@ -4083,57 +4083,10 @@ public class OrderAdapter {
, String clientCode
, String channel
, Integer totalAmount) {
CombPayRequest combPayRequest = this.convent2CombPayOrderRequest(null, orderBean, paymentRequest, partnerPayOvertime, clientCode, channel, totalAmount);
MultiPayRequest orderPayDto = new MultiPayRequest();
orderPayDto.setEbCode(paymentRequest.getPayCode());
orderPayDto.setPartner_id(orderBean.getCompanyId());
orderPayDto.setBody(paymentRequest.getPrincipalName());
orderPayDto.setNotify_url(paymentRequest.getReverseNotifyiDcUrl());
orderPayDto.setStore_id(orderBean.getShopId());
orderPayDto.setOpen_id(paymentRequest.getOpenId());
String businessDate = com.freemud.application.sdk.api.util.DateUtil.convert2String(new Date(), "yyyyMMdd");
orderPayDto.setBusiness_date(businessDate);
orderPayDto.setAmount(totalAmount.longValue());
orderPayDto.setVip_amount(0L);
orderPayDto.setAppId(paymentRequest.getWxAppId());
orderPayDto.setPayCode(paymentRequest.getPayCode());
orderPayDto.setVer("V1");
orderPayDto.setStoreName(orderBean.getShopName());
orderPayDto.setPayTimeOutTime(StringUtils.defaultIfBlank(partnerPayOvertime, "30"));
List<ProductVO> productVOS = new ArrayList<ProductVO>();
if (CollectionUtils.isNotEmpty(orderBean.getProductList())) {
for (ProductBeanV1 product : orderBean.getProductList()) {
ProductVO productBean = new ProductVO();
productBean.setId(product.getProductId());
productBean.setQuantity(product.getNumber());
productBean.setSeq(product.getSequence());
productBean.setSalesType("NORMAL");
productBean.setPrice(product.getPrice());
productBean.setName(product.getProductName());
productVOS.add(productBean);
}
}
orderPayDto.setMerchantDiscount(orderBean.getOriginalAmount().longValue() - orderBean.getAmount());
orderPayDto.setProducts(productVOS);
List<PayPlatformVO> platforms = new ArrayList<>();
PayPlatformVO payPlatformVO = new PayPlatformVO();
payPlatformVO.setClientCode(PayChannelType.SVC.getEbcode());
payPlatformVO.setEbcode(PayChannelType.SVC.getEbcode());
payPlatformVO.setAmount(0L);
platforms.add(payPlatformVO);
String ebcode = PayChannelType.getByIndex(Byte.parseByte(channel)).getEbcode();
payPlatformVO = new PayPlatformVO();
payPlatformVO.setAmount(0L);
payPlatformVO.setClientCode(clientCode);
payPlatformVO.setEbcode(ebcode);
platforms.add(payPlatformVO);
orderPayDto.setPlatforms(platforms);
orderPayDto.setOut_order_no(orderBean.getOid());
BeanUtil.convertBean(combPayRequest, orderPayDto);
orderPayDto.setCardItems(cardCodes);//多卡支付
orderPayDto.setApplicationType(getPayApplicationType(orderBean.getOrderClient()));
orderPayDto.setSubAppid(orderBean.getAppId());
orderPayDto.setPayTypeCode(convertPayTypeCode(orderBean.getOrderClient()));
return orderPayDto;
}
......
......@@ -44,4 +44,20 @@ public class FacePayRequestDto {
private List<PayProductDto> products;
/**
* 订单号
*/
private String orderId;
/**
* 手机号
*/
private String mobile;
/**
* 会员编号
*/
private String memberId;
}
......@@ -515,6 +515,9 @@ public class PayServiceImpl {
request.setOperatorId("2");
request.setVer("2");
request.setMerchantDiscount(orderBean.getOriginalAmount().longValue() - orderBean.getAmount());
request.setOrderId(orderBean.getOid());
request.setMobile(orderBean.getPhone());
request.setMemberId(orderBean.getUserId());
com.freemud.application.sdk.api.base.BaseResponse<UnifiedPayResponseDto> responseBase = paymentNewClient.codePay(request);
if (responseBase == null || !ResponseCodeConstant.RESPONSE_SUCCESS_STR.equals(responseBase.getCode()) || responseBase.getData() == null) {
// 需要把2种特殊情况抛给用户
......@@ -797,6 +800,9 @@ public class PayServiceImpl {
request.setVer("2");
request.setMerchantDiscount(orderBean.getOriginalAmount().longValue() - orderBean.getAmount());
request.setApplicationType(orderAdapter.getPayApplicationType(orderBean.getOrderClient()));
request.setOrderId(orderBean.getOid());
request.setMobile(orderBean.getPhone());
request.setMemberId(orderBean.getUserId());
SVCCardAmountRequestDto svcRequest = new SVCCardAmountRequestDto();
svcRequest.setPartnerId(partnerId);
svcRequest.setCardCodes(Arrays.asList(cardCode));
......
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