diff --git a/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/pay/tm/TmPayService.java b/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/pay/tm/TmPayService.java index 996eed75..c087585c 100644 --- a/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/pay/tm/TmPayService.java +++ b/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/pay/tm/TmPayService.java @@ -8,7 +8,6 @@ import com.ruoyi.common.pay.tm.vo.RefundInfo; import com.ruoyi.common.pay.tm.vo.TmTradeInfo; import com.ruoyi.common.pay.wx.domain.Payable; import com.ruoyi.common.pay.wx.domain.RefundAble; -import com.ruoyi.common.utils.http.AliHttpUtils; import com.ruoyi.common.utils.http.HttpUtils; import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPaymentResponse; import org.springframework.beans.factory.annotation.Autowired; @@ -83,9 +82,9 @@ public class TmPayService { } /** - * 小程序支付 + * 微信小程序支付 */ - public PrepayWithRequestPaymentResponse pay(Payable payable) { + public PrepayWithRequestPaymentResponse wxPay(Payable payable) { HashMap body = new HashMap<>(); body.put("payAmount", String.valueOf(payable.payableMoney())); body.put("terminalType", "1"); diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/payBill/service/impl/PayBillServiceImpl.java b/smart-switch-service/src/main/java/com/ruoyi/ss/payBill/service/impl/PayBillServiceImpl.java index 0f5c4e1c..735c25c4 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/payBill/service/impl/PayBillServiceImpl.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/payBill/service/impl/PayBillServiceImpl.java @@ -346,7 +346,7 @@ public class PayBillServiceImpl implements PayBillService } else if (TransactionBillPayType.TL_WX.getType().equals(bill.getChannelId())) { vo.setPayParams(sybPayService.prepayWxApp(bill)); } else if (TransactionBillPayType.TM_WX.getType().equals(bill.getChannelId())) { - vo.setPayParams(tmPayService.pay(bill)); + vo.setPayParams(tmPayService.wxPay(bill)); } else { throw new ServiceException("暂不支持该支付方式"); } diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/vip/domain/Vip.java b/smart-switch-service/src/main/java/com/ruoyi/ss/vip/domain/Vip.java index c0a4e625..4cf5137e 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/vip/domain/Vip.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/vip/domain/Vip.java @@ -3,6 +3,7 @@ package com.ruoyi.ss.vip.domain; import java.time.LocalDateTime; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.core.domain.ValidGroup; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder; @@ -11,6 +12,8 @@ import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; import org.springframework.format.annotation.DateTimeFormat; +import javax.validation.constraints.NotNull; + /** * 会员对象 ss_vip * @@ -34,6 +37,7 @@ public class Vip extends BaseEntity @Excel(name = "会员等级ID") @ApiModelProperty("会员等级ID") + @NotNull(message = "会员等级不允许为空", groups = {ValidGroup.Create.class}) private Long levelId; @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/vip/domain/VipQuery.java b/smart-switch-service/src/main/java/com/ruoyi/ss/vip/domain/VipQuery.java index 5453b8c1..afd370ef 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/vip/domain/VipQuery.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/vip/domain/VipQuery.java @@ -3,6 +3,8 @@ package com.ruoyi.ss.vip.domain; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + /** * @author wjh * 2024/12/9 @@ -13,4 +15,7 @@ public class VipQuery extends VipVO{ @ApiModelProperty("排除ID") private Long excludeId; + @ApiModelProperty("VIP等级ID列表") + private List vipLevelIds; + } diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/vip/domain/VipVO.java b/smart-switch-service/src/main/java/com/ruoyi/ss/vip/domain/VipVO.java index ee355fb8..02411ed4 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/vip/domain/VipVO.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/vip/domain/VipVO.java @@ -20,8 +20,8 @@ public class VipVO extends Vip{ private String vipLevelName; @ApiModelProperty("店铺商户ID") - private String storeMchId; + private Long storeMchId; @ApiModelProperty("VIP商户ID") - private String vipMchId; + private Long vipMchId; } diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/vip/mapper/VipMapper.xml b/smart-switch-service/src/main/java/com/ruoyi/ss/vip/mapper/VipMapper.xml index 8cfefccd..10de081e 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/vip/mapper/VipMapper.xml +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/vip/mapper/VipMapper.xml @@ -34,6 +34,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and ss.name like concat('%',#{query.storeName},'%') and svl.name like concat('%',#{query.vipLevelName},'%') and sv.id != #{query.excludeId} + + and sv.level_id in + + #{item} + +