Commit b9b87053 by ping.wu

saas 微信视频号直播门店查询配置

parent bf344b6b
......@@ -21,7 +21,7 @@ public class SellCouponCreateOrderVo {
@NotEmpty(message = "sessionId 不能为空")
private String sessionId;
@NotEmpty(message = "shopId 门店号不能为空")
// @NotEmpty(message = "shopId 门店号不能为空")
private String shopId;
//一键买券必传
......
package cn.freemud.enums;
public enum AggregationTypeEnum {
//6-会员、7-微商城、8-一键购买 9:积分商城
TYPE_1("1", ""),
TYPE_2("2", ""),
TYPE_3("3", ""),
TYPE_4("4", ""),
TYPE_5("5", ""),
/**
* 会员卡支付门店
*/
TYPE_6("6","会员卡支付门店"),
/**
* 微商城支付门店
*/
TYPE_7("7","微商城支付门店"),
/**
* 微商城一键购买门店
*/
TYPE_8("8","微商城一键购买门店"),
/**
* 积分商城支付门店
*/
TYPE_9("9","积分商城支付门店"),
/**
* 抖音卖券支付门店
*/
TYPE_10("10","抖音卖券支付门店"),
/**
* 虚拟卖券分账支付门店
*/
TYPE_11("11","虚拟卖券分账支付门店"),
TYPE_12("12",""),
/**
* 视频号卖券支付门店
*/
TYPE_13("13","视频号卖券支付门店"),
TYPE_14("14", "");
private String code;
private String desc;
AggregationTypeEnum(String code, String desc) {
this.code = code;
this.desc = desc;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}
......@@ -203,7 +203,7 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
}
String skuId = createOrderVo.getProducts().get(0).getSkuId();
//10-抖音卖券门店
AssortmentOpenPlatformIappWxappStore wxAppStore = payService.getIappWxappStoreInfo(wxAppId,"10");
AssortmentOpenPlatformIappWxappStore wxAppStore = payService.getIappWxappStoreInfo(wxAppId,AggregationTypeEnum.TYPE_10.getCode());
if ((wxAppStore == null || wxAppStore.getClientCode() == null)) {
return ResponseUtil.error(ResponseCodeConstant.RESPONSE_ERROR_STR, "支付门店未配置");
}
......@@ -323,6 +323,16 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
if (StringUtils.isNotBlank(requestVo.getCardCode()) && CollectionUtils.isNotEmpty(virtualProductSvcPayPartnerId) && !virtualProductSvcPayPartnerId.contains(partnerId)) {
return ResponseUtil.error(ResponseResult.PAY_SVC_CONFIG_ERROR);
}
AssortmentOpenPlatformIappWxappStore wxAppStore = null;
//微信视频号门店查询后台配置
if(StringUtils.isEmpty(requestVo.getShopId()) && StringUtils.isNotBlank(requestVo.getScene()) && CreateOrderSceneEnum.verifySceneOrder.contains(requestVo.getScene())){
wxAppStore = payService.getIappWxappStoreInfo(userLoginInfoDto.getWxAppId(),AggregationTypeEnum.TYPE_13.getCode());
if (wxAppStore == null) {
return ResponseUtil.error(ResponseCodeConstant.RESPONSE_ERROR_STR, "支付门店未配置");
}
storeId = wxAppStore.getStoreId();
}
// 获取门店信息
StoreMixResponseDto storeMixResponseDto = storeService.getStoreInfoNew(partnerId, storeId, false,false);
if (storeMixResponseDto == null || storeMixResponseDto.getStoreInfo() == null) {
......@@ -463,11 +473,11 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
//查询虚拟商品卖券支付配置中的分账门店信息
//如果需要分账查询支付配置中的分账门店信息,否则查询sdk
AssortmentOpenPlatformIappWxappStore wxAppStore = new AssortmentOpenPlatformIappWxappStore();
// AssortmentOpenPlatformIappWxappStore wxAppStore = new AssortmentOpenPlatformIappWxappStore();
if(createOrderRequest.getIsSplitAccount() != null && createOrderRequest.getIsSplitAccount() == 1){
//11-虚拟卖券门店
wxAppStore = payService.getIappWxappStoreInfo(userLoginInfoDto.getWxAppId(),"11");
}else {
wxAppStore = payService.getIappWxappStoreInfo(userLoginInfoDto.getWxAppId(),AggregationTypeEnum.TYPE_11.getCode());
}else if(wxAppStore == null){
wxAppStore = assortmentOpenPlatformIappWxappStoreManager.selectWxappStoreByWxAppIdAndStoreId(userLoginInfoDto.getWxAppId(),storeId);
}
if ((wxAppStore == null || wxAppStore.getClientCode() == null)) {
......
......@@ -12,6 +12,8 @@
*/
package cn.freemud.service.thirdparty;
import cn.freemud.annotations.LogIgnoreFeign;
import cn.freemud.constant.ResponseCodeKeyConstant;
import cn.freemud.entities.dto.store.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
......@@ -57,12 +59,14 @@ public interface StoreClient {
/**
* 查询门店信息
*/
@LogIgnoreFeign(logMessage="getStoreMix",messageFieldName= ResponseCodeKeyConstant.MSG,statusCodeFieldName=ResponseCodeKeyConstant.STATUS_CODE)
@PostMapping(value = "/api/v2/organization/getStoreMix", produces = MediaType.APPLICATION_JSON_UTF8_VALUE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
StoreBaseResponseDto<StoreMixResponseDto> getStoreInfoNew(@RequestBody StoreInfoRequestDto request);
/**
* 查询门店信息
*/
@LogIgnoreFeign(logMessage="getListByCodes",messageFieldName= ResponseCodeKeyConstant.MSG,statusCodeFieldName=ResponseCodeKeyConstant.STATUS_CODE)
@PostMapping(value = "/storecenter/store/v2/getListByCodes", produces = MediaType.APPLICATION_JSON_UTF8_VALUE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
StoreBaseResponseDto<StoreListResponse> getListByCodes(@RequestBody GetStoreListbyCodesRequest request);
}
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