pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SePaymentMethodMapper.java
@@ -2,6 +2,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.dy.pipIrrGlobal.pojoSe.SePaymentMethod; import com.dy.pipIrrGlobal.voSe.VoPaymentMethod; import java.util.List; @@ -30,4 +31,10 @@ * @return 未删除付款方式 */ List<SePaymentMethod> getPaymentMethods(); /** * 充值机用获取支付方式 * @return */ List<VoPaymentMethod> getPayMethods(); } pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoPaymentMethod.java
New file @@ -0,0 +1,30 @@ package com.dy.pipIrrGlobal.voSe; import com.alibaba.fastjson2.annotation.JSONField; import com.alibaba.fastjson2.writer.ObjectWriterImplToString; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import lombok.Data; /** * @author ZhuBaoMin * @date 2025-06-25 10:58 * @LastEditTime 2025-06-25 10:58 * @Description 充值机用付款方式视图对象 */ @Data @JsonPropertyOrder({"startupMode", "planStartTime", "duration"}) public class VoPaymentMethod { public static final long serialVersionUID = 202506251100001L; /** * 支付方式ID */ @JSONField(serializeUsing= ObjectWriterImplToString.class) private Long id; /** * 支付方式名称 */ private String name; } pipIrr-platform/pipIrr-global/src/main/resources/mapper/SePaymentMethodMapper.xml
@@ -94,4 +94,13 @@ <select id="getPaymentMethods" resultType="com.dy.pipIrrGlobal.pojoSe.SePaymentMethod"> SELECT * FROM se_payment_method WHERE deleted = 0 </select> <!--充值机用获取支付方式--> <select id="getPayMethods" resultType="com.dy.pipIrrGlobal.voSe.VoPaymentMethod"> SELECT id, name FROM se_payment_method WHERE deleted = 0 </select> </mapper> pipIrr-platform/pipIrr-web/pipIrr-web-terminal/src/main/java/com/dy/pipIrrTerminal/paymentmethod/PaymentMethodCtrl.java
New file @@ -0,0 +1,46 @@ package com.dy.pipIrrTerminal.paymentmethod; import com.dy.common.aop.SsoAop; import com.dy.common.webUtil.BaseResponse; import com.dy.common.webUtil.BaseResponseUtils; import com.dy.common.webUtil.QueryResultVo; import com.dy.pipIrrGlobal.pojoSe.SePaymentMethod; import com.dy.pipIrrGlobal.voSe.VoPaymentMethod; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * @author ZhuBaoMin * @date 2025-06-25 11:08 * @LastEditTime 2025-06-25 11:08 * @Description */ @Slf4j @RestController @RequestMapping(path="paymentmethod") @RequiredArgsConstructor public class PaymentMethodCtrl { private final PaymentMethodSv paymentMethodSv; /** * 充值机用获取支付方式 * @return */ @GetMapping(path = "/get") @SsoAop() public BaseResponse<List<VoPaymentMethod>> getPaymentMethods(){ try { return BaseResponseUtils.buildSuccess(paymentMethodSv.getPayMethods()); } catch (Exception e) { log.error("获取支付方式记录异常", e); return BaseResponseUtils.buildException(e.getMessage()) ; } } } pipIrr-platform/pipIrr-web/pipIrr-web-terminal/src/main/java/com/dy/pipIrrTerminal/paymentmethod/PaymentMethodSv.java
New file @@ -0,0 +1,33 @@ package com.dy.pipIrrTerminal.paymentmethod; import com.dy.common.webUtil.QueryResultVo; import com.dy.pipIrrGlobal.daoSe.SePaymentMethodMapper; import com.dy.pipIrrGlobal.pojoSe.SePaymentMethod; import com.dy.pipIrrGlobal.voSe.VoPaymentMethod; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * @author ZhuBaoMin * @date 2025-06-25 11:09 * @LastEditTime 2025-06-25 11:09 * @Description */ @Slf4j @Service public class PaymentMethodSv { @Autowired private SePaymentMethodMapper sePaymentMethodMapper; /** * 充值机用获取支付方式 * @return */ public List<VoPaymentMethod> getPayMethods() { return sePaymentMethodMapper.getPayMethods(); } }