Commit 97d84ff2 by 徐光兴

Merge branch 'feature/V2.0.52_储值卡支持购买虚拟商品' into qa

# Conflicts:
#	order-application-service/src/main/java/cn/freemud/service/impl/SellCouponOrderServiceImpl.java
parents d9b29703 22d7fb64
...@@ -3,6 +3,7 @@ package cn.freemud.controller; ...@@ -3,6 +3,7 @@ package cn.freemud.controller;
import cn.freemud.base.entity.BaseResponse; import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.vo.NgsSellCouponCreateOrderVo; import cn.freemud.entities.vo.NgsSellCouponCreateOrderVo;
import cn.freemud.entities.vo.SellCouponCreateOrderVo; import cn.freemud.entities.vo.SellCouponCreateOrderVo;
import cn.freemud.entities.vo.SellCouponSvcConfigVo;
import cn.freemud.service.impl.SellCouponOrderServiceImpl; import cn.freemud.service.impl.SellCouponOrderServiceImpl;
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;
...@@ -43,6 +44,15 @@ public class CreateOrderController { ...@@ -43,6 +44,15 @@ public class CreateOrderController {
} }
/** /**
* 卖券订单创建查询是否支持储值卡 (临时方案,后续)
*/
@ApiAnnotation(logMessage = "svcConfig")
@PostMapping("/sellCouponOrder/svcConfig")
public BaseResponse svcConfig(@Validated @LogParams @RequestBody SellCouponSvcConfigVo requestVo) {
return sellCouponOrderService.svcConfig(requestVo);
}
/**
* 农工商卖券订单创建 * 农工商卖券订单创建
*/ */
@ApiAnnotation(logMessage = "sellCouponOrderCreate") @ApiAnnotation(logMessage = "sellCouponOrderCreate")
......
package cn.freemud.entities.vo;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;
@Data
public class SellCouponSvcConfigVo {
@NotEmpty(message = "sessionId 不能为空")
private String sessionId;
}
package cn.freemud.entities.vo;
import lombok.Data;
@Data
public class SvcConfigResponse {
private boolean svcPay;
public SvcConfigResponse() {
}
public SvcConfigResponse(boolean svcPay) {
this.svcPay = svcPay;
}
}
...@@ -202,6 +202,7 @@ public enum ResponseResult { ...@@ -202,6 +202,7 @@ public enum ResponseResult {
* 支付 * 支付
*/ */
PAY_BACKEND_CONFIG_ERROR("58003", "支付交易异常","Abnormal payment transaction"), PAY_BACKEND_CONFIG_ERROR("58003", "支付交易异常","Abnormal payment transaction"),
PAY_SVC_CONFIG_ERROR("58004", "不支持储值卡",""),
/** /**
* 优惠券活动 * 优惠券活动
*/ */
......
...@@ -150,6 +150,9 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService { ...@@ -150,6 +150,9 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
private List<String> buyProductOncePartnerIds; private List<String> buyProductOncePartnerIds;
@Value("#{'${virtual.product.svc.pay.partnerId}'.split(',')}")
private List<String> virtualProductSvcPayPartnerId;
private final String SUCCESS = "100"; private final String SUCCESS = "100";
private final String ngsCouponProductId = "76161384"; private final String ngsCouponProductId = "76161384";
...@@ -282,6 +285,21 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService { ...@@ -282,6 +285,21 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
} }
/** /**
* 获取用户所在的商户是否支持储值卡买券
*
* @param requestVo
* @return
*/
public BaseResponse svcConfig(SellCouponSvcConfigVo requestVo) {
// 查询用户信息
AssortmentCustomerInfoVo userLoginInfoDto = checkOrder.checkOrderByMemberNew(requestVo.getSessionId());
if (CollectionUtils.isNotEmpty(virtualProductSvcPayPartnerId) && !virtualProductSvcPayPartnerId.contains(userLoginInfoDto.getPartnerId())) {
return ResponseUtil.success(new SvcConfigResponse(false));
}
return ResponseUtil.success(new SvcConfigResponse(true));
}
/**
* 卖券订单创建 * 卖券订单创建
*/ */
public BaseResponse createOrder(SellCouponCreateOrderVo requestVo){ public BaseResponse createOrder(SellCouponCreateOrderVo requestVo){
...@@ -296,6 +314,9 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService { ...@@ -296,6 +314,9 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
String openId = userLoginInfoDto.getOpenId(); String openId = userLoginInfoDto.getOpenId();
String appId = userLoginInfoDto.getAppId(); String appId = userLoginInfoDto.getAppId();
if (CollectionUtils.isNotEmpty(virtualProductSvcPayPartnerId) && !virtualProductSvcPayPartnerId.contains(partnerId)) {
return ResponseUtil.error(ResponseResult.PAY_SVC_CONFIG_ERROR);
}
//查询门店信息 //查询门店信息
StoreInfoRequest storeInfoRequest = new StoreInfoRequest(partnerId, storeId,null); StoreInfoRequest storeInfoRequest = new StoreInfoRequest(partnerId, storeId,null);
StoreResponse storeResponse = storeCenterService.getStoreInfo(storeInfoRequest, trackingNo); StoreResponse storeResponse = storeCenterService.getStoreInfo(storeInfoRequest, trackingNo);
......
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