Commit 95a5e593 by vega

Merge branch 'feature/1.9.35-支付超时时间设置-肖家炜' into develop

# Conflicts:
#	order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
#	order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
parents e945390a 4fc93b07
......@@ -119,7 +119,7 @@
<dependency>
<artifactId>assortment-data-manager</artifactId>
<groupId>com.freemud.sdk.api.assortment</groupId>
<version>4.6.8.RELEASE</version>
<version>5.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.freemud.commons</groupId>
......@@ -320,7 +320,7 @@
<dependency>
<groupId>com.freemud.sdk.api.assortment</groupId>
<artifactId>assortment-payment-sdk</artifactId>
<version>2.5.5-RELEASE</version>
<version>2.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.apache.rocketmq</groupId>
......
......@@ -37,10 +37,7 @@ import cn.freemud.enums.*;
import cn.freemud.interceptor.ServiceException;
import cn.freemud.request.wechat.dto.SignMessageBuilder;
import cn.freemud.service.impl.OrderCommonService;
import cn.freemud.utils.LogUtil;
import cn.freemud.utils.QrCodeUtil;
import cn.freemud.utils.RSAUtils;
import cn.freemud.utils.WebUtil;
import cn.freemud.utils.*;
import com.alibaba.fastjson.JSONObject;
import com.freemud.api.assortment.datamanager.entity.db.AssortmentOpenPlatformPartnerWxappConfig;
import com.freemud.api.assortment.datamanager.entity.vo.AssortmentCustomerInfoVo;
......
......@@ -56,4 +56,9 @@ public class RedisKeyConstant {
* 点餐门店绑定的商城门店redis的key前缀
*/
public final static String OPENSTORE_MICROMALL_BIND_STOREID_PREFIX = "openstore:micromall:bind:storeId:";
/**
* 商户订单支付超时时间设置key
*/
public final static String PARTNER_PAY_OVERTIME = "partner_pay_overtime";
}
......@@ -2909,4 +2909,19 @@ public class OrderServiceImpl implements Orderservice {
return ResponseUtil.success(responses.getResult());
}
/**
* 获取商户支付超时时间
* @param partnerId 商户Id
* @return 超时时间
*/
private String getPartnerPayOvertime(String partnerId) {
return Optional.ofNullable(openPlatformPartnerConfigManager.selectPartnerConfigByPartnerKey(partnerId, RedisKeyConstant.PARTNER_PAY_OVERTIME))
.orElseGet(() -> {
AssortmentOpenPlatformPartnerConfig config = new AssortmentOpenPlatformPartnerConfig();
config.setPartnerValue("30");
openPlatformPartnerConfigManager.addPartnerConfig(partnerId, RedisKeyConstant.PARTNER_PAY_OVERTIME, config);
return config;
}).getPartnerValue();
}
}
......@@ -460,4 +460,10 @@ public class OrderServiceTest {
System.out.println("param:"+JSON.toJSONString(createOrderResponse));
}
// @Test
// public void testGetPartnerPayOvertime() {
// String partnerPayOvertime = orderService.getPartnerPayOvertime("1864");
// System.out.println("partnerPayOvertime:" + partnerPayOvertime);
// }
}
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