diff --git a/dax-pay/src/main/java/cn/bootx/platform/daxpay/core/cashier/service/CashierService.java b/dax-pay/src/main/java/cn/bootx/platform/daxpay/core/cashier/service/CashierService.java index 425a2c35f..c0fdb0d88 100644 --- a/dax-pay/src/main/java/cn/bootx/platform/daxpay/core/cashier/service/CashierService.java +++ b/dax-pay/src/main/java/cn/bootx/platform/daxpay/core/cashier/service/CashierService.java @@ -79,7 +79,10 @@ public class CashierService { String extraParamsJson = PayWaylUtil.buildExtraParamsJson(param.getPayChannel(), map); payWayParam.setExtraParamsJson(extraParamsJson); - PayParam payParam = new PayParam().setTitle(param.getTitle()) + PayParam payParam = new PayParam() + .setMchCode(param.getMchCode()) + .setMchAppCode(param.getMchAppCode()) + .setTitle(param.getTitle()) .setBusinessId(param.getBusinessId()) .setPayWayList(Collections.singletonList(payWayParam)); PayResult payResult = payService.pay(payParam); diff --git a/dax-pay/src/main/java/cn/bootx/platform/daxpay/core/channel/alipay/entity/AlipayConfig.java b/dax-pay/src/main/java/cn/bootx/platform/daxpay/core/channel/alipay/entity/AlipayConfig.java index d1e173e4f..8b034c629 100644 --- a/dax-pay/src/main/java/cn/bootx/platform/daxpay/core/channel/alipay/entity/AlipayConfig.java +++ b/dax-pay/src/main/java/cn/bootx/platform/daxpay/core/channel/alipay/entity/AlipayConfig.java @@ -2,7 +2,9 @@ package cn.bootx.platform.daxpay.core.channel.alipay.entity; import cn.bootx.mybatis.table.modify.annotation.DbColumn; import cn.bootx.mybatis.table.modify.annotation.DbTable; +import cn.bootx.mybatis.table.modify.mybatis.mysq.annotation.DbMySqlFieldType; import cn.bootx.mybatis.table.modify.mybatis.mysq.annotation.DbMySqlIndex; +import cn.bootx.mybatis.table.modify.mybatis.mysq.constants.MySqlFieldTypeEnum; import cn.bootx.platform.common.core.annotation.BigField; import cn.bootx.platform.common.core.annotation.EncryptionField; import cn.bootx.platform.common.core.function.EntityBaseFunction; @@ -79,24 +81,28 @@ public class AlipayConfig extends MpBaseEntity implements EntityBaseFunction page(PageParam pageParam, WeChatPayConfigParam param) { Page mpPage = MpUtil.getMpPage(pageParam, WeChatPayConfig.class); - return lambdaQuery().select(WeChatPayConfig.class, MpUtil::excludeBigField) - .like(StrUtil.isNotBlank(param.getName()), WeChatPayConfig::getName, param.getName()) - .like(StrUtil.isNotBlank(param.getAppId()), WeChatPayConfig::getWxAppId, param.getAppId()) - .like(StrUtil.isNotBlank(param.getAppId()), WeChatPayConfig::getWxMchId, param.getMchId()) - .orderByDesc(MpIdEntity::getId) - .page(mpPage); + QueryWrapper wrapper = QueryGenerator.generator(param); + wrapper.orderByDesc(MpIdEntity.Id.id); + return this.page(mpPage,wrapper); } } diff --git a/dax-pay/src/main/java/cn/bootx/platform/daxpay/core/channel/wechat/entity/WeChatPayConfig.java b/dax-pay/src/main/java/cn/bootx/platform/daxpay/core/channel/wechat/entity/WeChatPayConfig.java index 3f2233bb2..d4b6ef00f 100644 --- a/dax-pay/src/main/java/cn/bootx/platform/daxpay/core/channel/wechat/entity/WeChatPayConfig.java +++ b/dax-pay/src/main/java/cn/bootx/platform/daxpay/core/channel/wechat/entity/WeChatPayConfig.java @@ -51,10 +51,6 @@ public class WeChatPayConfig extends MpBaseEntity implements EntityBaseFunction< @DbColumn(comment = "微信商户号") private String wxMchId; - /** 微信商户应用Id */ - @DbColumn(comment = "商户应用Id") - private Long wxMchAppId; - /** 微信应用appId */ @DbColumn(comment = "微信应用appId") private String wxAppId; diff --git a/dax-pay/src/main/java/cn/bootx/platform/daxpay/core/payment/entity/Payment.java b/dax-pay/src/main/java/cn/bootx/platform/daxpay/core/payment/entity/Payment.java index 0be76f567..2c57e7700 100644 --- a/dax-pay/src/main/java/cn/bootx/platform/daxpay/core/payment/entity/Payment.java +++ b/dax-pay/src/main/java/cn/bootx/platform/daxpay/core/payment/entity/Payment.java @@ -3,6 +3,8 @@ package cn.bootx.platform.daxpay.core.payment.entity; import cn.bootx.mybatis.table.modify.annotation.DbColumn; import cn.bootx.mybatis.table.modify.annotation.DbComment; import cn.bootx.mybatis.table.modify.annotation.DbTable; +import cn.bootx.mybatis.table.modify.mybatis.mysq.annotation.DbMySqlFieldType; +import cn.bootx.mybatis.table.modify.mybatis.mysq.constants.MySqlFieldTypeEnum; import cn.bootx.platform.common.core.annotation.BigField; import cn.bootx.platform.common.core.function.EntityBaseFunction; import cn.bootx.platform.common.mybatisplus.base.MpBaseEntity; @@ -29,7 +31,7 @@ import java.util.List; * @author xxm * @date 2020/12/8 */ -@DbTable(isAppend = true) +@DbTable @EqualsAndHashCode(callSuper = true) @Data @DbComment("支付记录") @@ -39,6 +41,7 @@ import java.util.List; public class Payment extends MpBaseEntity implements EntityBaseFunction { /** 关联的业务id */ + @DbColumn(comment = "商户编码") private String businessId; /** 商户编码 */ @@ -82,6 +85,7 @@ public class Payment extends MpBaseEntity implements EntityBaseFunction payChannelInfo; /** @@ -90,6 +94,7 @@ public class Payment extends MpBaseEntity implements EntityBaseFunction refundableInfo; /** diff --git a/dax-pay/src/main/java/cn/bootx/platform/daxpay/dto/channel/wechat/WeChatPayConfigDto.java b/dax-pay/src/main/java/cn/bootx/platform/daxpay/dto/channel/wechat/WeChatPayConfigDto.java index 872681fac..532272a7e 100644 --- a/dax-pay/src/main/java/cn/bootx/platform/daxpay/dto/channel/wechat/WeChatPayConfigDto.java +++ b/dax-pay/src/main/java/cn/bootx/platform/daxpay/dto/channel/wechat/WeChatPayConfigDto.java @@ -25,11 +25,11 @@ public class WeChatPayConfigDto extends BaseDto implements Serializable { @Schema(description = "微信商户号") @SensitiveInfo - private String mchId; + private String wxMchId; @Schema(description = "微信应用appId") @SensitiveInfo - private String appId; + private String wxAppId; @Schema(description = "商户平台「API安全」中的 APIv2 密钥") @SensitiveInfo @@ -76,7 +76,7 @@ public class WeChatPayConfigDto extends BaseDto implements Serializable { private Boolean activity; @Schema(description = "状态") - private Integer state; + private String state; @Schema(description = "备注") private String remark; diff --git a/dax-pay/src/main/java/cn/bootx/platform/daxpay/dto/payment/PaymentDto.java b/dax-pay/src/main/java/cn/bootx/platform/daxpay/dto/payment/PaymentDto.java index b5e6f9e50..8e76e44fa 100644 --- a/dax-pay/src/main/java/cn/bootx/platform/daxpay/dto/payment/PaymentDto.java +++ b/dax-pay/src/main/java/cn/bootx/platform/daxpay/dto/payment/PaymentDto.java @@ -52,7 +52,7 @@ public class PaymentDto extends BaseDto implements Serializable { * @see PayStatusCode */ @Schema(description = "支付状态") - private int payStatus; + private String payStatus; @Schema(description = "金额") private BigDecimal amount; diff --git a/dax-pay/src/main/java/cn/bootx/platform/daxpay/param/cashier/CashierSinglePayParam.java b/dax-pay/src/main/java/cn/bootx/platform/daxpay/param/cashier/CashierSinglePayParam.java index c92667d1a..819936db0 100644 --- a/dax-pay/src/main/java/cn/bootx/platform/daxpay/param/cashier/CashierSinglePayParam.java +++ b/dax-pay/src/main/java/cn/bootx/platform/daxpay/param/cashier/CashierSinglePayParam.java @@ -17,6 +17,9 @@ import java.math.BigDecimal; @Schema(title = "结算台单支付参数") public class CashierSinglePayParam { + @Schema(description = "商户编码") + private String mchCode; + @Schema(description = "商户应用编码") private String mchAppCode; diff --git a/dax-pay/src/main/java/cn/bootx/platform/daxpay/param/channel/wechat/WeChatPayConfigParam.java b/dax-pay/src/main/java/cn/bootx/platform/daxpay/param/channel/wechat/WeChatPayConfigParam.java index 2c37ea3ea..407d7f591 100644 --- a/dax-pay/src/main/java/cn/bootx/platform/daxpay/param/channel/wechat/WeChatPayConfigParam.java +++ b/dax-pay/src/main/java/cn/bootx/platform/daxpay/param/channel/wechat/WeChatPayConfigParam.java @@ -1,5 +1,6 @@ package cn.bootx.platform.daxpay.param.channel.wechat; +import cn.bootx.platform.common.core.annotation.QueryParam; import cn.bootx.platform.daxpay.code.paymodel.WeChatPayCode; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -14,6 +15,7 @@ import java.util.List; * @date 2022/7/7 */ @Data +@QueryParam(type = QueryParam.CompareTypeEnum.LIKE) @Accessors(chain = true) @Schema(title = "微信支付配置参数") public class WeChatPayConfigParam { @@ -31,10 +33,10 @@ public class WeChatPayConfigParam { private String mchAppCode; @Schema(description = "微信商户号") - private String mchId; + private String wxMchId; @Schema(description = "微信应用appId") - private String appId; + private String wxAppId; /** * @see WeChatPayCode#API_V2