merge conflict origin/master

This commit is contained in:
paulGao 2022-01-27 11:22:59 +08:00
commit 1b44bedf42
3 changed files with 52 additions and 4 deletions

View File

@ -0,0 +1,40 @@
package cn.lili.modules.order.order.entity.enums;
/**
* 订单状态枚举
*
* @author Chopper
* @since 2020/11/17 7:27 下午
*/
public enum OrderStatusEnum {
/**
* 订单状态
*/
UNPAID("未付款"),
PAID("已付款"),
UNDELIVERED("待发货"),
DELIVERED("已发货"),
COMPLETED("已完成"),
/**
* 虚拟订单需要核验商品
*/
TAKE("待核验"),
CANCELLED("已取消");
private final String description;
OrderStatusEnum(String description) {
this.description = description;
}
public String getDescription() {
return description;
}
public String description() {
return this.description;
}
}

View File

@ -39,7 +39,6 @@ import cn.lili.modules.payment.kit.plugin.wechat.model.*;
import cn.lili.modules.payment.service.PaymentService;
import cn.lili.modules.payment.service.RefundLogService;
import cn.lili.modules.system.entity.dos.Setting;
import cn.lili.modules.system.entity.dto.connect.dto.WechatConnectSettingItem;
import cn.lili.modules.system.entity.dto.payment.WechatPaymentSetting;
import cn.lili.modules.system.entity.enums.SettingEnum;
import cn.lili.modules.system.service.SettingService;
@ -258,6 +257,9 @@ public class WechatPlugin implements Payment {
WechatPaymentSetting setting = wechatPaymentSetting();
String appid = setting.getAppId();
if (appid == null) {
throw new ServiceException(ResultCode.WECHAT_PAYMENT_NOT_SETTING);
}
UnifiedOrderModel unifiedOrderModel = new UnifiedOrderModel()
.setAppid(appid)
.setMchid(setting.getMchId())
@ -323,6 +325,9 @@ public class WechatPlugin implements Payment {
WechatPaymentSetting setting = wechatPaymentSetting();
String appid = setting.getServiceAppId();
if (appid == null) {
throw new ServiceException(ResultCode.WECHAT_PAYMENT_NOT_SETTING);
}
UnifiedOrderModel unifiedOrderModel = new UnifiedOrderModel()
.setAppid(appid)
.setMchid(setting.getMchId())
@ -391,6 +396,9 @@ public class WechatPlugin implements Payment {
//微信小程序appid 需要单独获取这里读取了联合登陆配置的appid 实际场景小程序自动登录所以这个appid是最为保险的做法
//如果有2开需求这里需要调整修改这个appid的获取途径即可
String appid = wechatPaymentSetting().getMpAppId();
if (StringUtils.isEmpty(appid)) {
throw new ServiceException(ResultCode.WECHAT_PAYMENT_NOT_SETTING);
}
String attach = URLEncoder.createDefault().encode(JSONUtil.toJsonStr(payParam), StandardCharsets.UTF_8);
WechatPaymentSetting setting = wechatPaymentSetting();

View File

@ -53,7 +53,7 @@ public class WechatPaymentSetting {
*/
private String apiKey3;
public String getAppId() {
public String getAppIdValue() {
if (StringUtils.isEmpty(appId)) {
throw new ServiceException(ResultCode.WECHAT_PAYMENT_NOT_SETTING);
@ -61,14 +61,14 @@ public class WechatPaymentSetting {
return appId;
}
public String getMpAppId() {
public String getMpAppIdValue() {
if (StringUtils.isEmpty(mpAppId)) {
throw new ServiceException(ResultCode.WECHAT_PAYMENT_NOT_SETTING);
}
return mpAppId;
}
public String getServiceAppId() {
public String getServiceAppIdValue() {
if (StringUtils.isEmpty(serviceAppId)) {
throw new ServiceException(ResultCode.WECHAT_PAYMENT_NOT_SETTING);
}