Browse Source

代码调整

baolei 6 months ago
parent
commit
6051cc3c90
15 changed files with 886 additions and 44 deletions
  1. 68 0
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/utils/RMBUtil.java
  2. 74 8
      08.src/Xingxi/xingxi-miniprogram-api/src/main/java/com/xingxi/api/controller/HomepageApiController.java
  3. 8 1
      08.src/Xingxi/xingxi-miniprogram-api/src/main/java/com/xingxi/api/model/HomeProdResponse.java
  4. 33 2
      08.src/Xingxi/xingxi-mq-server/src/main/java/com/xingxi/mq/consumer/order/OrderCloseConsumer.java
  5. 1 1
      08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/NewProd/domain/NewProd.java
  6. 2 2
      08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/PopularProd/domain/PopularProd.java
  7. 109 0
      08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/RefundInfo/domain/RefundInfo.java
  8. 95 0
      08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/RefundInfo/mapper/RefundInfoMapper.java
  9. 94 0
      08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/RefundInfo/service/IRefundInfoService.java
  10. 147 0
      08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/RefundInfo/service/impl/RefundInfoServiceImpl.java
  11. 1 1
      08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/SuggestProd/domain/SuggestProd.java
  12. 10 10
      08.src/Xingxi/xingxi-system/src/main/resources/mapper/business/NewProdMapper.xml
  13. 10 10
      08.src/Xingxi/xingxi-system/src/main/resources/mapper/business/PopularProdMapper.xml
  14. 225 0
      08.src/Xingxi/xingxi-system/src/main/resources/mapper/business/RefundInfoMapper.xml
  15. 9 9
      08.src/Xingxi/xingxi-system/src/main/resources/mapper/business/SuggestProdMapper.xml

+ 68 - 0
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/utils/RMBUtil.java

@@ -0,0 +1,68 @@
+package com.xingxi.common.utils;
+
+import java.math.BigDecimal;
+import java.text.DecimalFormat;
+import java.text.NumberFormat;
+import java.util.Locale;
+
+public final class RMBUtil {
+
+    static final BigDecimal BASE = new BigDecimal("100");
+    static final NumberFormat FORMAT = NumberFormat.getCurrencyInstance(Locale.CHINA);
+
+    private RMBUtil() {
+        throw new RuntimeException("工具类");
+    }
+
+    public static BigDecimal yuanToFen(BigDecimal yuan) {
+        if (yuan == null) {
+            return null;
+        } else {
+            return yuan.multiply(BASE);
+        }
+    }
+
+    public static BigDecimal fenToYuan(BigDecimal fen) {
+        return fenToYuan(fen, 2);
+    }
+
+    public static BigDecimal fenToYuan(BigDecimal fen, int scale) {
+        if (fen == null) {
+            return null;
+        } else {
+            return fen.divide(BASE, scale, BigDecimal.ROUND_HALF_UP);
+        }
+    }
+
+    /**
+     * 人民币格式化
+     * @param amount 原金额
+     * @param digits 几位小数
+     * @return
+     */
+    public static String format(BigDecimal amount, int digits){
+        FORMAT.setMinimumFractionDigits(digits);
+        return FORMAT.format(amount);
+    }
+
+    public static String formatComma(BigDecimal amount) {
+        DecimalFormat df = new DecimalFormat("#,##0.00");
+        return df.format(amount);
+    }
+//
+//    public static void main(String[] args) {
+//        System.out.println(formatComma(new BigDecimal("1123344.789")));
+//        System.out.println(formatComma(new BigDecimal("0.789")));
+//        System.out.println(format(new BigDecimal("123344.45"), 0));
+//        System.out.println(format(new BigDecimal("123344.00"), 0));
+//        System.out.println(format(new BigDecimal("123344"), 0));
+//
+////        ¥123,344.99
+////        ¥123,344.45
+////        ¥123,344
+////        ¥123,344
+//
+//
+//    }
+
+}

+ 74 - 8
08.src/Xingxi/xingxi-miniprogram-api/src/main/java/com/xingxi/api/controller/HomepageApiController.java

@@ -2,7 +2,6 @@ package com.xingxi.api.controller;
 
 import com.xingxi.api.common.BaseApiController;
 import com.xingxi.api.model.*;
-import com.xingxi.api.service.ProdServiceI;
 import com.xingxi.business.Banner.domain.Banner;
 import com.xingxi.business.Banner.service.IBannerService;
 import com.xingxi.business.NewProd.domain.NewProd;
@@ -12,12 +11,20 @@ import com.xingxi.business.PopularProd.service.IPopularProdService;
 import com.xingxi.business.SuggestProd.domain.SuggestProd;
 import com.xingxi.business.SuggestProd.service.ISuggestProdService;
 import com.xingxi.common.enums.EDelFlag;
+import com.xingxi.common.enums.ERoleKey;
+import com.xingxi.common.utils.RMBUtil;
 import com.xingxi.master.ipInfo.domain.IpInfo;
 import com.xingxi.master.ipInfo.service.IIpInfoService;
+import com.xingxi.master.merchant.domain.MerchantProd;
+import com.xingxi.master.merchant.service.IMerchantProdService;
+import com.xingxi.master.product.domain.Prod;
+import com.xingxi.master.product.domain.ProdAttrPrice;
 import com.xingxi.master.product.domain.ProdClass;
 import com.xingxi.master.product.domain.ProdPic;
+import com.xingxi.master.product.service.IProdAttrPriceService;
 import com.xingxi.master.product.service.IProdClassService;
 import com.xingxi.master.product.service.IProdPicService;
+import com.xingxi.master.product.service.IProdService;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -43,7 +50,9 @@ public class HomepageApiController extends BaseApiController {
     private final ISuggestProdService middleProdService;
     private final INewProdService rightProdService;
     private final IProdPicService prodPicService;
-    private final ProdServiceI prodService;
+    private final IProdService prodService;
+    private final IProdAttrPriceService prodAttrPriceService;
+    private final IMerchantProdService merchantProdService;
 
     /**
      * 获取Banner信息
@@ -95,13 +104,32 @@ public class HomepageApiController extends BaseApiController {
         List<HomeProdResponse> prodList = new ArrayList<>();
 
         for (PopularProd leftProd : leftprodList) {
+
+            MerchantProd mercProd = merchantProdService.selectMerchantProdByMercProdId(leftProd.getMercProdId());
+
             HomeProdResponse prodResponse = new HomeProdResponse();
             prodResponse.setId(leftProd.getId());
-            prodResponse.setProdId(leftProd.getProdId());
+            prodResponse.setMercProdId(leftProd.getMercProdId());
             prodResponse.setSort(leftProd.getSort());
 
+            Prod prod = prodService.selectProdById(mercProd.getProdId());
+            prodResponse.setProdName(prod.getProdName());
+
+            ProdAttrPrice condProdAttrPrice = new ProdAttrPrice();
+            condProdAttrPrice.setProdId(mercProd.getProdId());
+            condProdAttrPrice.setSellerId(mercProd.getMercId());
+            condProdAttrPrice.setBuyerId(100L);
+            condProdAttrPrice.setBuyerRoleKey(ERoleKey.CUSTOMER.getCode());
+            condProdAttrPrice.setDelFlag(EDelFlag.NO.getVal());
+
+            List<ProdAttrPrice> attrPriceList = prodAttrPriceService.selectProdAttrPriceList(condProdAttrPrice);
+
+            if (attrPriceList != null && !attrPriceList.isEmpty()) {
+                prodResponse.setProdPrice(RMBUtil.fenToYuan(attrPriceList.get(0).getPrice()));
+            }
+
             ProdPic condPic = new ProdPic();
-            condPic.setProdId(leftProd.getProdId());
+            condPic.setProdId(mercProd.getProdId());
             condPic.setDelFlag(EDelFlag.NO.getVal());
 
             List<ProdPic> picList = prodPicService.selectProdPicList(condPic);
@@ -127,13 +155,32 @@ public class HomepageApiController extends BaseApiController {
         List<HomeProdResponse> prodList = new ArrayList<>();
 
         for (SuggestProd leftProd : leftprodList) {
+
+            MerchantProd mercProd = merchantProdService.selectMerchantProdByMercProdId(leftProd.getMercProdId());
+
             HomeProdResponse prodResponse = new HomeProdResponse();
             prodResponse.setId(leftProd.getId());
-            prodResponse.setProdId(leftProd.getProdId());
+            prodResponse.setMercProdId(leftProd.getMercProdId());
             prodResponse.setSort(leftProd.getSort());
 
+            Prod prod = prodService.selectProdById(mercProd.getProdId());
+            prodResponse.setProdName(prod.getProdName());
+
+            ProdAttrPrice condProdAttrPrice = new ProdAttrPrice();
+            condProdAttrPrice.setProdId(mercProd.getProdId());
+            condProdAttrPrice.setSellerId(mercProd.getMercId());
+            condProdAttrPrice.setBuyerId(100L);
+            condProdAttrPrice.setBuyerRoleKey(ERoleKey.CUSTOMER.getCode());
+            condProdAttrPrice.setDelFlag(EDelFlag.NO.getVal());
+
+            List<ProdAttrPrice> attrPriceList = prodAttrPriceService.selectProdAttrPriceList(condProdAttrPrice);
+
+            if (attrPriceList != null && !attrPriceList.isEmpty()) {
+                prodResponse.setProdPrice(RMBUtil.fenToYuan(attrPriceList.get(0).getPrice()));
+            }
+
             ProdPic condPic = new ProdPic();
-            condPic.setProdId(leftProd.getProdId());
+            condPic.setProdId(mercProd.getProdId());
             condPic.setDelFlag(EDelFlag.NO.getVal());
 
             List<ProdPic> picList = prodPicService.selectProdPicList(condPic);
@@ -159,13 +206,32 @@ public class HomepageApiController extends BaseApiController {
         List<HomeProdResponse> prodList = new ArrayList<>();
 
         for (NewProd leftProd : leftprodList) {
+
+            MerchantProd mercProd = merchantProdService.selectMerchantProdByMercProdId(leftProd.getMercProdId());
+
             HomeProdResponse prodResponse = new HomeProdResponse();
             prodResponse.setId(leftProd.getId());
-            prodResponse.setProdId(leftProd.getProdId());
+            prodResponse.setMercProdId(leftProd.getMercProdId());
             prodResponse.setSort(leftProd.getSort());
 
+            Prod prod = prodService.selectProdById(mercProd.getProdId());
+            prodResponse.setProdName(prod.getProdName());
+
+            ProdAttrPrice condProdAttrPrice = new ProdAttrPrice();
+            condProdAttrPrice.setProdId(mercProd.getProdId());
+            condProdAttrPrice.setSellerId(mercProd.getMercId());
+            condProdAttrPrice.setBuyerId(100L);
+            condProdAttrPrice.setBuyerRoleKey(ERoleKey.CUSTOMER.getCode());
+            condProdAttrPrice.setDelFlag(EDelFlag.NO.getVal());
+
+            List<ProdAttrPrice> attrPriceList = prodAttrPriceService.selectProdAttrPriceList(condProdAttrPrice);
+
+            if (attrPriceList != null && !attrPriceList.isEmpty()) {
+                prodResponse.setProdPrice(RMBUtil.fenToYuan(attrPriceList.get(0).getPrice()));
+            }
+
             ProdPic condPic = new ProdPic();
-            condPic.setProdId(leftProd.getProdId());
+            condPic.setProdId(mercProd.getProdId());
             condPic.setDelFlag(EDelFlag.NO.getVal());
 
             List<ProdPic> picList = prodPicService.selectProdPicList(condPic);

+ 8 - 1
08.src/Xingxi/xingxi-miniprogram-api/src/main/java/com/xingxi/api/model/HomeProdResponse.java

@@ -3,6 +3,7 @@ package com.xingxi.api.model;
 import com.xingxi.master.product.domain.ProdPic;
 import lombok.Data;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 @Data
@@ -11,7 +12,13 @@ public class HomeProdResponse {
     private Long id;
 
     // 商品ID
-    private Long prodId;
+    private Long mercProdId;
+
+    // 商品ID
+    private String prodName;
+
+    // 商品价格
+    private BigDecimal prodPrice;
 
     // 顺序
     private Long sort;

+ 33 - 2
08.src/Xingxi/xingxi-mq-server/src/main/java/com/xingxi/mq/consumer/order/OrderCloseConsumer.java

@@ -1,6 +1,7 @@
 package com.xingxi.mq.consumer.order;
 
 import com.alibaba.fastjson.JSON;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.github.binarywang.wxpay.bean.request.WxPayOrderQueryV3Request;
 import com.github.binarywang.wxpay.bean.request.WxPayRefundV3Request;
 import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderV3Request;
@@ -16,6 +17,9 @@ import com.xingxi.business.PaymentInfo.domain.PaymentInfo;
 import com.xingxi.business.PaymentInfo.service.IPaymentInfoService;
 import com.xingxi.business.ProdInventory.mapper.ProdInventoryBillMapper;
 import com.xingxi.business.ProdInventory.mapper.ProdInventoryMapper;
+import com.xingxi.business.RefundInfo.domain.RefundInfo;
+import com.xingxi.business.RefundInfo.service.impl.RefundInfoServiceImpl;
+import com.xingxi.common.annotation.Excel;
 import com.xingxi.common.enums.EDelFlag;
 import com.xingxi.common.enums.EOrderDetailStatus;
 import com.xingxi.common.enums.EOrderStatus;
@@ -36,6 +40,7 @@ import org.springframework.context.annotation.Bean;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
 
@@ -60,6 +65,8 @@ public class OrderCloseConsumer extends AbstractRabbitConsumer {
     @Autowired
     private WxPayService wxPayService;
     private WxPayConfig config;
+    @Autowired
+    private RefundInfoServiceImpl refundInfoServiceImpl;
 
     @Bean(OrderMqKey.EDIT_QUEUE_DELAY_FOR_UNPAID)
     @Override
@@ -122,9 +129,10 @@ public class OrderCloseConsumer extends AbstractRabbitConsumer {
             if (ETradeState.SUCCESS.getVal().equals(rtn.getTradeState())) {
 
                 // 如果支付成功并且微信支付没有回调成功就在这里退款 TODO
+                String outRefundNo = "REFUND" + orgOrder.getOrderNo();
                 WxPayRefundV3Request wxRefundRequest = new WxPayRefundV3Request();
                 wxRefundRequest.setOutTradeNo(orgOrder.getOrderNo());
-                wxRefundRequest.setOutRefundNo("REFUND" + orgOrder.getOrderNo());
+                wxRefundRequest.setOutRefundNo(outRefundNo);
                 wxRefundRequest.setReason(orderBO.getOrderNo() + "退款");
 
                 WxPayRefundV3Request.Amount refundAmount = new WxPayRefundV3Request.Amount();
@@ -136,7 +144,30 @@ public class OrderCloseConsumer extends AbstractRabbitConsumer {
                 WxPayRefundV3Result refundV3Result = wxPayService.refundV3(wxRefundRequest);
 
                 // TODO 增加退款表,保存退款信息
-
+                RefundInfo refundInfo = new RefundInfo();
+                refundInfo.setTransactionId(refundV3Result.getTransactionId());
+                refundInfo.setOutTradeNo(orgOrder.getOrderNo());
+                refundInfo.setOutRefundNo(outRefundNo);
+                refundInfo.setReason(orderBO.getOrderNo() + "退款");
+                // TODO
+                refundInfo.setNotifyUrl("");
+                refundInfo.setAmountRefund(new BigDecimal(refundV3Result.getAmount().getRefund()));
+                refundInfo.setAmountTotal(new BigDecimal(refundV3Result.getAmount().getTotal()));
+                refundInfo.setRefundId(refundV3Result.getRefundId());
+
+                refundInfo.setChannel(refundV3Result.getChannel());
+                refundInfo.setUserReceivedAccount(refundV3Result.getUserReceivedAccount());
+                refundInfo.setSuccessTime(refundV3Result.getSuccessTime());
+                refundInfo.setRefundTime(nowDate.toString());
+                refundInfo.setStatus(refundV3Result.getStatus());
+                refundInfo.setFundsAccount(refundV3Result.getFundsAccount());
+                refundInfo.setPayerTotal(new BigDecimal(refundV3Result.getAmount().getPayerTotal()));
+                refundInfo.setPayerRefund(new BigDecimal(refundV3Result.getAmount().getPayerRefund()));
+                refundInfo.setSettlementRefund(new BigDecimal(refundV3Result.getAmount().getSettlementRefund()));
+                refundInfo.setSettlementTotal(new BigDecimal(refundV3Result.getAmount().getSettlementTotal()));
+                refundInfo.setDiscountRefund(new BigDecimal(refundV3Result.getAmount().getDiscountRefund()));
+
+                refundInfoServiceImpl.insertRefundInfo(refundInfo);
 
             }
 

+ 1 - 1
08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/NewProd/domain/NewProd.java

@@ -23,7 +23,7 @@ public class NewProd extends BaseEntity {
 
     // 商品ID
     @Excel(name = "商品ID")
-    private Long prodId;
+    private Long mercProdId;
 
     // 顺序
     @Excel(name = "顺序")

+ 2 - 2
08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/PopularProd/domain/PopularProd.java

@@ -22,8 +22,8 @@ public class PopularProd extends BaseEntity {
     private Long id;
 
     // 商品ID
-    @Excel(name = "商品ID")
-    private Long prodId;
+    @Excel(name = "商户商品ID")
+    private Long mercProdId;
 
     // 顺序
     @Excel(name = "顺序")

+ 109 - 0
08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/RefundInfo/domain/RefundInfo.java

@@ -0,0 +1,109 @@
+package com.xingxi.business.RefundInfo.domain;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.xingxi.common.annotation.Excel;
+import com.xingxi.common.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+
+/**
+ * 退款信息对象 t_refund_info
+ * 
+ * @author Xingxi
+ * @date 2025-05-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString
+public class RefundInfo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 删除标志 */
+    @Excel(name = "删除标志")
+    private String delFlag;
+
+    /** 微信支付订单号 */
+    @Excel(name = "微信支付订单号")
+    private String transactionId;
+
+    /** 商户订单号 */
+    @Excel(name = "商户订单号")
+    private String outTradeNo;
+
+    /** 商户退款单号 */
+    @Excel(name = "商户退款单号")
+    private String outRefundNo;
+
+    /** 退款原因 */
+    @Excel(name = "退款原因")
+    private String reason;
+
+    /** 退款结果回调url */
+    @Excel(name = "退款结果回调url")
+    private String notifyUrl;
+
+    /** 退款金额 */
+    @Excel(name = "退款金额")
+    private BigDecimal amountRefund;
+
+    /** 原订单金额 */
+    @Excel(name = "原订单金额")
+    private BigDecimal amountTotal;
+
+    /** 微信支付退款单号 */
+    @Excel(name = "微信支付退款单号")
+    private String refundId;
+
+    /** 退款渠道 */
+    @Excel(name = "退款渠道")
+    private String channel;
+
+    /** 退款入账账户 */
+    @Excel(name = "退款入账账户")
+    private String userReceivedAccount;
+
+    /** 退款成功时间 */
+    @Excel(name = "退款成功时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private String successTime;
+
+    /** 退款创建时间 */
+    @Excel(name = "退款创建时间")
+    private String refundTime;
+
+    /** 退款状态 */
+    @Excel(name = "退款状态")
+    private String status;
+
+    /** 资金账户 */
+    @Excel(name = "资金账户")
+    private String fundsAccount;
+
+    /** 用户实际支付金额 */
+    @Excel(name = "用户实际支付金额")
+    private BigDecimal payerTotal;
+
+    /** 用户退款金额 */
+    @Excel(name = "用户退款金额")
+    private BigDecimal payerRefund;
+
+    /** 应结退款金额 */
+    @Excel(name = "应结退款金额")
+    private BigDecimal settlementRefund;
+
+    /** 应结订单金额 */
+    @Excel(name = "应结订单金额")
+    private BigDecimal settlementTotal;
+
+    /** 优惠退款金额 */
+    @Excel(name = "优惠退款金额")
+    private BigDecimal discountRefund;
+
+
+}

+ 95 - 0
08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/RefundInfo/mapper/RefundInfoMapper.java

@@ -0,0 +1,95 @@
+package com.xingxi.business.RefundInfo.mapper;
+
+import java.util.List;
+import com.xingxi.business.RefundInfo.domain.RefundInfo;
+
+/**
+ * 退款信息Mapper接口
+ * 
+ * @author Xingxi
+ * @date 2025-05-12
+ */
+public interface RefundInfoMapper 
+{
+    /**
+     * 查询退款信息
+     * 
+     * @param id 退款信息主键
+     * @return 退款信息
+     */
+    public RefundInfo selectRefundInfoById(Long id);
+
+    /**
+     * 查询退款信息列表
+     * 
+     * @param refundInfo 退款信息
+     * @return 退款信息集合
+     */
+    public List<RefundInfo> selectRefundInfoList(RefundInfo refundInfo);
+
+    /**
+     * 新增退款信息
+     * 
+     * @param refundInfo 退款信息
+     * @return 结果
+     */
+    public int insertRefundInfo(RefundInfo refundInfo);
+
+    /**
+     * 批量新增退款信息
+     *
+     * @param refundInfoList 退款信息
+     * @return 结果
+     */
+    public int batchInsertRefundInfo(List<RefundInfo> refundInfoList);
+
+    /**
+     * 修改退款信息
+     * 
+     * @param refundInfo 退款信息
+     * @return 结果
+     */
+    public int updateRefundInfo(RefundInfo refundInfo);
+
+    /**
+     * 删除退款信息
+     * 
+     * @param id 退款信息主键
+     * @return 结果
+     */
+    public int deleteRefundInfoById(Long id);
+
+    /**
+     * 批量删除退款信息
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteRefundInfoByIds(String[] ids);
+
+
+    /**
+     * 逻辑删除退款信息
+     *
+     * @param id 退款信息主键
+     * @return 结果
+     */
+    public int logicDeleteRefundInfoById(Long id);
+
+    /**
+     * 逻辑批量删除退款信息
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int logicDeleteRefundInfoByIds(String[] ids);
+
+    /**
+     * 逻辑批量删除退款信息
+     *
+     * @param refundInfo 退款信息
+     * @return 结果
+     */
+    public int logicDeleteRefundInfoByCondition(RefundInfo refundInfo);
+
+}

+ 94 - 0
08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/RefundInfo/service/IRefundInfoService.java

@@ -0,0 +1,94 @@
+package com.xingxi.business.RefundInfo.service;
+
+import java.util.List;
+import com.xingxi.business.RefundInfo.domain.RefundInfo;
+
+/**
+ * 退款信息Service接口
+ * 
+ * @author Xingxi
+ * @date 2025-05-12
+ */
+public interface IRefundInfoService 
+{
+    /**
+     * 查询退款信息
+     * 
+     * @param id 退款信息主键
+     * @return 退款信息
+     */
+    public RefundInfo selectRefundInfoById(Long id);
+
+    /**
+     * 查询退款信息列表
+     * 
+     * @param refundInfo 退款信息
+     * @return 退款信息集合
+     */
+    public List<RefundInfo> selectRefundInfoList(RefundInfo refundInfo);
+
+    /**
+     * 新增退款信息
+     * 
+     * @param refundInfo 退款信息
+     * @return 结果
+     */
+    public int insertRefundInfo(RefundInfo refundInfo);
+
+    /**
+     * 新增退款信息
+     *
+     * @param refundInfoList 退款信息
+     * @return 结果
+     */
+    public int batchInsertRefundInfo(List<RefundInfo> refundInfoList);
+
+    /**
+     * 修改退款信息
+     * 
+     * @param refundInfo 退款信息
+     * @return 结果
+     */
+    public int updateRefundInfo(RefundInfo refundInfo);
+
+    /**
+     * 批量删除退款信息
+     * 
+     * @param ids 需要删除的退款信息主键集合
+     * @return 结果
+     */
+    public int deleteRefundInfoByIds(String ids);
+
+    /**
+     * 删除退款信息信息
+     * 
+     * @param id 退款信息主键
+     * @return 结果
+     */
+    public int deleteRefundInfoById(Long id);
+
+    /**
+     * 逻辑删除退款信息
+     *
+     * @param id 退款信息主键
+     * @return 结果
+     */
+    public int logicDeleteRefundInfoById(Long id);
+
+    /**
+     * 逻辑批量删除退款信息
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int logicDeleteRefundInfoByIds(String[] ids);
+
+    /**
+     * 逻辑批量删除退款信息
+     *
+     * @param refundInfo 退款信息
+     * @return 结果
+     */
+    public int logicDeleteRefundInfoByCondition(RefundInfo refundInfo);
+
+}

+ 147 - 0
08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/RefundInfo/service/impl/RefundInfoServiceImpl.java

@@ -0,0 +1,147 @@
+package com.xingxi.business.RefundInfo.service.impl;
+
+import java.util.List;
+
+import com.xingxi.common.core.text.Convert;
+import com.xingxi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.xingxi.business.RefundInfo.mapper.RefundInfoMapper;
+import com.xingxi.business.RefundInfo.domain.RefundInfo;
+import com.xingxi.business.RefundInfo.service.IRefundInfoService;
+
+/**
+ * 退款信息Service业务层处理
+ * 
+ * @author Xingxi
+ * @date 2025-05-12
+ */
+@Service
+public class RefundInfoServiceImpl implements IRefundInfoService 
+{
+    @Autowired
+    private RefundInfoMapper refundInfoMapper;
+
+    /**
+     * 查询退款信息
+     * 
+     * @param id 退款信息主键
+     * @return 退款信息
+     */
+    @Override
+    public RefundInfo selectRefundInfoById(Long id)
+    {
+        return refundInfoMapper.selectRefundInfoById(id);
+    }
+
+    /**
+     * 查询退款信息列表
+     * 
+     * @param refundInfo 退款信息
+     * @return 退款信息
+     */
+    @Override
+    public List<RefundInfo> selectRefundInfoList(RefundInfo refundInfo)
+    {
+        return refundInfoMapper.selectRefundInfoList(refundInfo);
+    }
+
+    /**
+     * 新增退款信息
+     * 
+     * @param refundInfo 退款信息
+     * @return 结果
+     */
+    @Override
+    public int insertRefundInfo(RefundInfo refundInfo)
+    {
+        refundInfo.setCreateTime(DateUtils.getNowDate());
+        return refundInfoMapper.insertRefundInfo(refundInfo);
+    }
+
+    /**
+     * 新增退款信息
+     *
+     * @param refundInfoList 退款信息
+     * @return 结果
+     */
+    @Override
+    public int batchInsertRefundInfo(List<RefundInfo> refundInfoList)
+    {
+        return refundInfoMapper.batchInsertRefundInfo(refundInfoList);
+    }
+
+    /**
+     * 修改退款信息
+     * 
+     * @param refundInfo 退款信息
+     * @return 结果
+     */
+    @Override
+    public int updateRefundInfo(RefundInfo refundInfo)
+    {
+        refundInfo.setUpdateTime(DateUtils.getNowDate());
+        return refundInfoMapper.updateRefundInfo(refundInfo);
+    }
+
+    /**
+     * 批量删除退款信息
+     * 
+     * @param ids 需要删除的退款信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteRefundInfoByIds(String ids)
+    {
+        return refundInfoMapper.deleteRefundInfoByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除退款信息信息
+     * 
+     * @param id 退款信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteRefundInfoById(Long id)
+    {
+        return refundInfoMapper.deleteRefundInfoById(id);
+    }
+
+    /**
+     * 逻辑删除退款信息
+     *
+     * @param id 退款信息主键
+     * @return 结果
+     */
+    @Override
+    public int logicDeleteRefundInfoById(Long id)
+    {
+        return refundInfoMapper.logicDeleteRefundInfoById(id);
+    }
+
+    /**
+     * 逻辑批量删除退款信息
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    @Override
+    public int logicDeleteRefundInfoByIds(String[] ids)
+    {
+        return refundInfoMapper.logicDeleteRefundInfoByIds(ids);
+    }
+
+    /**
+     * 逻辑批量删除退款信息
+     *
+     * @param refundInfo 退款信息
+     * @return 结果
+     */
+    @Override
+    public int logicDeleteRefundInfoByCondition(RefundInfo refundInfo)
+    {
+        return refundInfoMapper.logicDeleteRefundInfoByCondition(refundInfo);
+    }
+
+}

+ 1 - 1
08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/SuggestProd/domain/SuggestProd.java

@@ -23,7 +23,7 @@ public class SuggestProd extends BaseEntity {
 
     // 商品ID
     @Excel(name = "商品ID")
-    private Long prodId;
+    private Long mercProdId;
 
     // 顺序
     @Excel(name = "顺序")

+ 10 - 10
08.src/Xingxi/xingxi-system/src/main/resources/mapper/business/NewProdMapper.xml

@@ -3,7 +3,7 @@
 <mapper namespace="com.xingxi.business.NewProd.mapper.NewProdMapper">
     <resultMap type="NewProd" id="NewProdResult">
         <result property="id"    column="id"    />
-        <result property="prodId"    column="prodId"    />
+        <result property="mercProdId"    column="mercProdId"    />
         <result property="sort"    column="sort"    />
         <result property="delFlag"    column="delFlag"    />
         <result property="createUser"    column="createUser"    />
@@ -13,13 +13,13 @@
     </resultMap>
 
     <sql id="selectNewProd">
-        select id, prodId, sort, delFlag, createUser, createTime, updateUser, updateTime from t_new_prod
+        select id, mercProdId, sort, delFlag, createUser, createTime, updateUser, updateTime from t_new_prod
     </sql>
 
     <sql id="selectNewProdExt">
         select
             ${tableAlias}.id,
-            ${tableAlias}.prodId,
+            ${tableAlias}.mercProdId,
             ${tableAlias}.sort,
             ${tableAlias}.delFlag,
             ${tableAlias}.createUser,
@@ -32,7 +32,7 @@
     <select id="selectNewProdList" parameterType="NewProd" resultMap="NewProdResult">
         <include refid="selectNewProd"/>
         <where>
-            <if test="prodId != null "> and prodId = #{prodId}</if>
+            <if test="mercProdId != null "> and mercProdId = #{mercProdId}</if>
             <if test="sort != null "> and sort = #{sort}</if>
             <if test="delFlag != null  and delFlag != ''"> and delFlag = #{delFlag}</if>
             <if test="createUser != null  and createUser != ''"> and createUser = #{createUser}</if>
@@ -51,7 +51,7 @@
     <insert id="insertNewProd" parameterType="NewProd" useGeneratedKeys="true" keyProperty="id">
         insert into t_new_prod
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="prodId != null">prodId,</if>
+            <if test="mercProdId != null">mercProdId,</if>
             <if test="sort != null">sort,</if>
             <if test="delFlag != null">delFlag,</if>
             <if test="createUser != null">createUser,</if>
@@ -60,7 +60,7 @@
             <if test="updateTime != null">updateTime,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="prodId != null">#{prodId},</if>
+            <if test="mercProdId != null">#{mercProdId},</if>
             <if test="sort != null">#{sort},</if>
             <if test="delFlag != null">#{delFlag},</if>
             <if test="createUser != null">#{createUser},</if>
@@ -71,16 +71,16 @@
     </insert>
 
     <insert id="batchInsertNewProd">
-        insert into t_new_prod( prodId, sort, delFlag, createUser, createTime, updateUser, updateTime) values
+        insert into t_new_prod( mercProdId, sort, delFlag, createUser, createTime, updateUser, updateTime) values
         <foreach item="item" index="index" collection="list" separator=",">
-            ( #{item.prodId}, #{item.sort}, #{item.delFlag}, #{item.createUser}, #{item.createTime}, #{item.updateUser}, #{item.updateTime})
+            ( #{item.mercProdId}, #{item.sort}, #{item.delFlag}, #{item.createUser}, #{item.createTime}, #{item.updateUser}, #{item.updateTime})
         </foreach>
     </insert>
 
     <update id="updateNewProd" parameterType="NewProd">
         update t_new_prod
         <trim prefix="SET" suffixOverrides=",">
-            <if test="prodId != null">prodId = #{prodId},</if>
+            <if test="mercProdId != null">mercProdId = #{mercProdId},</if>
             <if test="sort != null">sort = #{sort},</if>
             <if test="delFlag != null">delFlag = #{delFlag},</if>
             <if test="createUser != null">createUser = #{createUser},</if>
@@ -121,7 +121,7 @@
         update t_new_prod
         set delFlag = '1'
         <where>
-            <if test="prodId != null "> and prodId = #{prodId}</if>
+            <if test="mercProdId != null "> and mercProdId = #{mercProdId}</if>
             <if test="sort != null "> and sort = #{sort}</if>
             <if test="delFlag != null  and delFlag != ''"> and delFlag = #{delFlag}</if>
             <if test="createUser != null  and createUser != ''"> and createUser = #{createUser}</if>

+ 10 - 10
08.src/Xingxi/xingxi-system/src/main/resources/mapper/business/PopularProdMapper.xml

@@ -3,7 +3,7 @@
 <mapper namespace="com.xingxi.business.PopularProd.mapper.PopularProdMapper">
     <resultMap type="PopularProd" id="PopularProdResult">
         <result property="id"    column="id"    />
-        <result property="prodId"    column="prodId"    />
+        <result property="mercProdId"    column="mercProdId"    />
         <result property="sort"    column="sort"    />
         <result property="delFlag"    column="delFlag"    />
         <result property="createUser"    column="createUser"    />
@@ -13,13 +13,13 @@
     </resultMap>
 
     <sql id="selectPopularProd">
-        select id, prodId, sort, delFlag, createUser, createTime, updateUser, updateTime from t_popular_prod
+        select id, mercProdId, sort, delFlag, createUser, createTime, updateUser, updateTime from t_popular_prod
     </sql>
 
     <sql id="selectPopularProdExt">
         select
             ${tableAlias}.id,
-            ${tableAlias}.prodId,
+            ${tableAlias}.mercProdId,
             ${tableAlias}.sort,
             ${tableAlias}.delFlag,
             ${tableAlias}.createUser,
@@ -32,7 +32,7 @@
     <select id="selectPopularProdList" parameterType="PopularProd" resultMap="PopularProdResult">
         <include refid="selectPopularProd"/>
         <where>  
-            <if test="prodId != null "> and prodId = #{prodId}</if>
+            <if test="mercProdId != null "> and mercProdId = #{mercProdId}</if>
             <if test="sort != null "> and sort = #{sort}</if>
             <if test="delFlag != null  and delFlag != ''"> and delFlag = #{delFlag}</if>
             <if test="createUser != null  and createUser != ''"> and createUser = #{createUser}</if>
@@ -51,7 +51,7 @@
     <insert id="insertPopularProd" parameterType="PopularProd" useGeneratedKeys="true" keyProperty="id">
         insert into t_popular_prod
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="prodId != null">prodId,</if>
+            <if test="mercProdId != null">mercProdId,</if>
             <if test="sort != null">sort,</if>
             <if test="delFlag != null">delFlag,</if>
             <if test="createUser != null">createUser,</if>
@@ -60,7 +60,7 @@
             <if test="updateTime != null">updateTime,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="prodId != null">#{prodId},</if>
+            <if test="mercProdId != null">#{mercProdId},</if>
             <if test="sort != null">#{sort},</if>
             <if test="delFlag != null">#{delFlag},</if>
             <if test="createUser != null">#{createUser},</if>
@@ -71,16 +71,16 @@
     </insert>
 
     <insert id="batchInsertPopularProd">
-        insert into t_popular_prod( prodId, sort, delFlag, createUser, createTime, updateUser, updateTime) values
+        insert into t_popular_prod( mercProdId, sort, delFlag, createUser, createTime, updateUser, updateTime) values
         <foreach item="item" index="index" collection="list" separator=",">
-            ( #{item.prodId}, #{item.sort}, #{item.delFlag}, #{item.createUser}, #{item.createTime}, #{item.updateUser}, #{item.updateTime})
+            ( #{item.mercProdId}, #{item.sort}, #{item.delFlag}, #{item.createUser}, #{item.createTime}, #{item.updateUser}, #{item.updateTime})
         </foreach>
     </insert>
 
     <update id="updatePopularProd" parameterType="PopularProd">
         update t_popular_prod
         <trim prefix="SET" suffixOverrides=",">
-            <if test="prodId != null">prodId = #{prodId},</if>
+            <if test="mercProdId != null">mercProdId = #{mercProdId},</if>
             <if test="sort != null">sort = #{sort},</if>
             <if test="delFlag != null">delFlag = #{delFlag},</if>
             <if test="createUser != null">createUser = #{createUser},</if>
@@ -121,7 +121,7 @@
         update t_popular_prod
         set delFlag = '1'
         <where>
-            <if test="prodId != null "> and prodId = #{prodId}</if>
+            <if test="mercProdId != null "> and mercProdId = #{mercProdId}</if>
             <if test="sort != null "> and sort = #{sort}</if>
             <if test="delFlag != null  and delFlag != ''"> and delFlag = #{delFlag}</if>
             <if test="createUser != null  and createUser != ''"> and createUser = #{createUser}</if>

+ 225 - 0
08.src/Xingxi/xingxi-system/src/main/resources/mapper/business/RefundInfoMapper.xml

@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xingxi.business.RefundInfo.mapper.RefundInfoMapper">
+    
+    <resultMap type="RefundInfo" id="RefundInfoResult">
+        <result property="id"    column="id"    />
+        <result property="delFlag"    column="delFlag"    />
+        <result property="createUser"    column="createUser"    />
+        <result property="createTime"    column="createTime"    />
+        <result property="updateUser"    column="updateUser"    />
+        <result property="updateTime"    column="updateTime"    />
+        <result property="transactionId"    column="transactionId"    />
+        <result property="outTradeNo"    column="outTradeNo"    />
+        <result property="outRefundNo"    column="outRefundNo"    />
+        <result property="reason"    column="reason"    />
+        <result property="notifyUrl"    column="notifyUrl"    />
+        <result property="amountRefund"    column="amountRefund"    />
+        <result property="amountTotal"    column="amountTotal"    />
+        <result property="refundId"    column="refundId"    />
+        <result property="channel"    column="channel"    />
+        <result property="userReceivedAccount"    column="userReceivedAccount"    />
+        <result property="successTime"    column="successTime"    />
+        <result property="refundTime"    column="refundTime"    />
+        <result property="status"    column="status"    />
+        <result property="fundsAccount"    column="fundsAccount"    />
+        <result property="payerTotal"    column="payerTotal"    />
+        <result property="payerRefund"    column="payerRefund"    />
+        <result property="settlementRefund"    column="settlementRefund"    />
+        <result property="settlementTotal"    column="settlementTotal"    />
+        <result property="discountRefund"    column="discountRefund"    />
+    </resultMap>
+
+    <sql id="selectRefundInfoVo">
+        select id, delFlag, createUser, createTime, updateUser, updateTime, transactionId, outTradeNo, outRefundNo, reason, notifyUrl, amountRefund, amountTotal, refundId, channel, userReceivedAccount, successTime, refundTime, status, fundsAccount, payerTotal, payerRefund, settlementRefund, settlementTotal, discountRefund from t_refund_info
+    </sql>
+
+    <select id="selectRefundInfoList" parameterType="RefundInfo" resultMap="RefundInfoResult">
+        <include refid="selectRefundInfoVo"/>
+        <where>  
+            <if test="delFlag != null  and delFlag != ''"> and delFlag = #{delFlag}</if>
+            <if test="createUser != null  and createUser != ''"> and createUser = #{createUser}</if>
+            <if test="createTime != null "> and createTime = #{createTime}</if>
+            <if test="updateUser != null  and updateUser != ''"> and updateUser = #{updateUser}</if>
+            <if test="updateTime != null "> and updateTime = #{updateTime}</if>
+            <if test="transactionId != null  and transactionId != ''"> and transactionId = #{transactionId}</if>
+            <if test="outTradeNo != null  and outTradeNo != ''"> and outTradeNo = #{outTradeNo}</if>
+            <if test="outRefundNo != null  and outRefundNo != ''"> and outRefundNo = #{outRefundNo}</if>
+            <if test="reason != null  and reason != ''"> and reason = #{reason}</if>
+            <if test="notifyUrl != null  and notifyUrl != ''"> and notifyUrl = #{notifyUrl}</if>
+            <if test="amountRefund != null "> and amountRefund = #{amountRefund}</if>
+            <if test="amountTotal != null "> and amountTotal = #{amountTotal}</if>
+            <if test="refundId != null  and refundId != ''"> and refundId = #{refundId}</if>
+            <if test="channel != null  and channel != ''"> and channel = #{channel}</if>
+            <if test="userReceivedAccount != null  and userReceivedAccount != ''"> and userReceivedAccount = #{userReceivedAccount}</if>
+            <if test="successTime != null "> and successTime = #{successTime}</if>
+            <if test="refundTime != null  and refundTime != ''"> and refundTime = #{refundTime}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="fundsAccount != null  and fundsAccount != ''"> and fundsAccount = #{fundsAccount}</if>
+            <if test="payerTotal != null "> and payerTotal = #{payerTotal}</if>
+            <if test="payerRefund != null "> and payerRefund = #{payerRefund}</if>
+            <if test="settlementRefund != null "> and settlementRefund = #{settlementRefund}</if>
+            <if test="settlementTotal != null "> and settlementTotal = #{settlementTotal}</if>
+            <if test="discountRefund != null "> and discountRefund = #{discountRefund}</if>
+        </where>
+    </select>
+    
+    <select id="selectRefundInfoById" parameterType="Long" resultMap="RefundInfoResult">
+        <include refid="selectRefundInfoVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertRefundInfo" parameterType="RefundInfo" useGeneratedKeys="true" keyProperty="id">
+        insert into t_refund_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="delFlag != null">delFlag,</if>
+            <if test="createUser != null">createUser,</if>
+            <if test="createTime != null">createTime,</if>
+            <if test="updateUser != null">updateUser,</if>
+            <if test="updateTime != null">updateTime,</if>
+            <if test="transactionId != null">transactionId,</if>
+            <if test="outTradeNo != null">outTradeNo,</if>
+            <if test="outRefundNo != null">outRefundNo,</if>
+            <if test="reason != null">reason,</if>
+            <if test="notifyUrl != null">notifyUrl,</if>
+            <if test="amountRefund != null">amountRefund,</if>
+            <if test="amountTotal != null">amountTotal,</if>
+            <if test="refundId != null">refundId,</if>
+            <if test="channel != null">channel,</if>
+            <if test="userReceivedAccount != null">userReceivedAccount,</if>
+            <if test="successTime != null">successTime,</if>
+            <if test="refundTime != null">refundTime,</if>
+            <if test="status != null">status,</if>
+            <if test="fundsAccount != null">fundsAccount,</if>
+            <if test="payerTotal != null">payerTotal,</if>
+            <if test="payerRefund != null">payerRefund,</if>
+            <if test="settlementRefund != null">settlementRefund,</if>
+            <if test="settlementTotal != null">settlementTotal,</if>
+            <if test="discountRefund != null">discountRefund,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createUser != null">#{createUser},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateUser != null">#{updateUser},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="transactionId != null">#{transactionId},</if>
+            <if test="outTradeNo != null">#{outTradeNo},</if>
+            <if test="outRefundNo != null">#{outRefundNo},</if>
+            <if test="reason != null">#{reason},</if>
+            <if test="notifyUrl != null">#{notifyUrl},</if>
+            <if test="amountRefund != null">#{amountRefund},</if>
+            <if test="amountTotal != null">#{amountTotal},</if>
+            <if test="refundId != null">#{refundId},</if>
+            <if test="channel != null">#{channel},</if>
+            <if test="userReceivedAccount != null">#{userReceivedAccount},</if>
+            <if test="successTime != null">#{successTime},</if>
+            <if test="refundTime != null">#{refundTime},</if>
+            <if test="status != null">#{status},</if>
+            <if test="fundsAccount != null">#{fundsAccount},</if>
+            <if test="payerTotal != null">#{payerTotal},</if>
+            <if test="payerRefund != null">#{payerRefund},</if>
+            <if test="settlementRefund != null">#{settlementRefund},</if>
+            <if test="settlementTotal != null">#{settlementTotal},</if>
+            <if test="discountRefund != null">#{discountRefund},</if>
+         </trim>
+    </insert>
+
+    <insert id="batchInsertRefundInfo">
+        insert into t_refund_info( delFlag, createUser, createTime, updateUser, updateTime, transactionId, outTradeNo, outRefundNo, reason, notifyUrl, amountRefund, amountTotal, refundId, channel, userReceivedAccount, successTime, refundTime, status, fundsAccount, payerTotal, payerRefund, settlementRefund, settlementTotal, discountRefund) values
+        <foreach item="item" index="index" collection="list" separator=",">
+            ( #{item.delFlag}, #{item.createUser}, #{item.createTime}, #{item.updateUser}, #{item.updateTime}, #{item.transactionId}, #{item.outTradeNo}, #{item.outRefundNo}, #{item.reason}, #{item.notifyUrl}, #{item.amountRefund}, #{item.amountTotal}, #{item.refundId}, #{item.channel}, #{item.userReceivedAccount}, #{item.successTime}, #{item.refundTime}, #{item.status}, #{item.fundsAccount}, #{item.payerTotal}, #{item.payerRefund}, #{item.settlementRefund}, #{item.settlementTotal}, #{item.discountRefund})
+        </foreach>
+    </insert>
+
+    <update id="updateRefundInfo" parameterType="RefundInfo">
+        update t_refund_info
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="delFlag != null">delFlag = #{delFlag},</if>
+            <if test="createUser != null">createUser = #{createUser},</if>
+            <if test="createTime != null">createTime = #{createTime},</if>
+            <if test="updateUser != null">updateUser = #{updateUser},</if>
+            <if test="updateTime != null">updateTime = #{updateTime},</if>
+            <if test="transactionId != null">transactionId = #{transactionId},</if>
+            <if test="outTradeNo != null">outTradeNo = #{outTradeNo},</if>
+            <if test="outRefundNo != null">outRefundNo = #{outRefundNo},</if>
+            <if test="reason != null">reason = #{reason},</if>
+            <if test="notifyUrl != null">notifyUrl = #{notifyUrl},</if>
+            <if test="amountRefund != null">amountRefund = #{amountRefund},</if>
+            <if test="amountTotal != null">amountTotal = #{amountTotal},</if>
+            <if test="refundId != null">refundId = #{refundId},</if>
+            <if test="channel != null">channel = #{channel},</if>
+            <if test="userReceivedAccount != null">userReceivedAccount = #{userReceivedAccount},</if>
+            <if test="successTime != null">successTime = #{successTime},</if>
+            <if test="refundTime != null">refundTime = #{refundTime},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="fundsAccount != null">fundsAccount = #{fundsAccount},</if>
+            <if test="payerTotal != null">payerTotal = #{payerTotal},</if>
+            <if test="payerRefund != null">payerRefund = #{payerRefund},</if>
+            <if test="settlementRefund != null">settlementRefund = #{settlementRefund},</if>
+            <if test="settlementTotal != null">settlementTotal = #{settlementTotal},</if>
+            <if test="discountRefund != null">discountRefund = #{discountRefund},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteRefundInfoById" parameterType="Long">
+        delete from t_refund_info where id = #{id}
+    </delete>
+
+    <delete id="deleteRefundInfoByIds" parameterType="String">
+        delete from t_refund_info where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <update id="logicDeleteRefundInfoById" parameterType="Long">
+        update t_refund_info
+            set delFlag = '1'
+        where id = #{id}
+    </update>
+
+    <update id="logicDeleteRefundInfoByIds" parameterType="String">
+        update t_refund_info
+        set delFlag = '1'
+        where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+
+    <update id="logicDeleteRefundInfoByCondition" parameterType="RefundInfo">
+        update t_refund_info
+        set delFlag = '1'
+        <where>
+            <if test="delFlag != null  and delFlag != ''"> and delFlag = #{delFlag}</if>
+            <if test="createUser != null  and createUser != ''"> and createUser = #{createUser}</if>
+            <if test="createTime != null "> and createTime = #{createTime}</if>
+            <if test="updateUser != null  and updateUser != ''"> and updateUser = #{updateUser}</if>
+            <if test="updateTime != null "> and updateTime = #{updateTime}</if>
+            <if test="transactionId != null  and transactionId != ''"> and transactionId = #{transactionId}</if>
+            <if test="outTradeNo != null  and outTradeNo != ''"> and outTradeNo = #{outTradeNo}</if>
+            <if test="outRefundNo != null  and outRefundNo != ''"> and outRefundNo = #{outRefundNo}</if>
+            <if test="reason != null  and reason != ''"> and reason = #{reason}</if>
+            <if test="notifyUrl != null  and notifyUrl != ''"> and notifyUrl = #{notifyUrl}</if>
+            <if test="amountRefund != null "> and amountRefund = #{amountRefund}</if>
+            <if test="amountTotal != null "> and amountTotal = #{amountTotal}</if>
+            <if test="refundId != null  and refundId != ''"> and refundId = #{refundId}</if>
+            <if test="channel != null  and channel != ''"> and channel = #{channel}</if>
+            <if test="userReceivedAccount != null  and userReceivedAccount != ''"> and userReceivedAccount = #{userReceivedAccount}</if>
+            <if test="successTime != null "> and successTime = #{successTime}</if>
+            <if test="refundTime != null  and refundTime != ''"> and refundTime = #{refundTime}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="fundsAccount != null  and fundsAccount != ''"> and fundsAccount = #{fundsAccount}</if>
+            <if test="payerTotal != null "> and payerTotal = #{payerTotal}</if>
+            <if test="payerRefund != null "> and payerRefund = #{payerRefund}</if>
+            <if test="settlementRefund != null "> and settlementRefund = #{settlementRefund}</if>
+            <if test="settlementTotal != null "> and settlementTotal = #{settlementTotal}</if>
+            <if test="discountRefund != null "> and discountRefund = #{discountRefund}</if>
+        </where>
+    </update>
+
+</mapper>

+ 9 - 9
08.src/Xingxi/xingxi-system/src/main/resources/mapper/business/SuggestProdMapper.xml

@@ -3,7 +3,7 @@
 <mapper namespace="com.xingxi.business.SuggestProd.mapper.SuggestProdMapper">
     <resultMap type="SuggestProd" id="SuggestProdResult">
         <result property="id"    column="id"    />
-        <result property="prodId"    column="prodId"    />
+        <result property="mercProdId"    column="mercProdId"    />
         <result property="sort"    column="sort"    />
         <result property="delFlag"    column="delFlag"    />
         <result property="createUser"    column="createUser"    />
@@ -13,13 +13,13 @@
     </resultMap>
 
     <sql id="selectSuggestProd">
-        select id, prodId, sort, delFlag, createUser, createTime, updateUser, updateTime from t_suggest_prod
+        select id, mercProdId, sort, delFlag, createUser, createTime, updateUser, updateTime from t_suggest_prod
     </sql>
 
     <select id="selectSuggestProdList" parameterType="SuggestProd" resultMap="SuggestProdResult">
         <include refid="selectSuggestProd"/>
         <where>  
-            <if test="prodId != null "> and prodId = #{prodId}</if>
+            <if test="mercProdId != null "> and mercProdId = #{mercProdId}</if>
             <if test="sort != null "> and sort = #{sort}</if>
             <if test="delFlag != null  and delFlag != ''"> and delFlag = #{delFlag}</if>
             <if test="createUser != null  and createUser != ''"> and createUser = #{createUser}</if>
@@ -38,7 +38,7 @@
     <insert id="insertSuggestProd" parameterType="SuggestProd" useGeneratedKeys="true" keyProperty="id">
         insert into t_suggest_prod
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="prodId != null">prodId,</if>
+            <if test="mercProdId != null">mercProdId,</if>
             <if test="sort != null">sort,</if>
             <if test="delFlag != null">delFlag,</if>
             <if test="createUser != null">createUser,</if>
@@ -47,7 +47,7 @@
             <if test="updateTime != null">updateTime,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="prodId != null">#{prodId},</if>
+            <if test="mercProdId != null">#{mercProdId},</if>
             <if test="sort != null">#{sort},</if>
             <if test="delFlag != null">#{delFlag},</if>
             <if test="createUser != null">#{createUser},</if>
@@ -58,16 +58,16 @@
     </insert>
 
     <insert id="batchInsertSuggestProd">
-        insert into t_suggest_prod( prodId, sort, delFlag, createUser, createTime, updateUser, updateTime) values
+        insert into t_suggest_prod( mercProdId, sort, delFlag, createUser, createTime, updateUser, updateTime) values
         <foreach item="item" index="index" collection="list" separator=",">
-            ( #{item.prodId}, #{item.sort}, #{item.delFlag}, #{item.createUser}, #{item.createTime}, #{item.updateUser}, #{item.updateTime})
+            ( #{item.mercProdId}, #{item.sort}, #{item.delFlag}, #{item.createUser}, #{item.createTime}, #{item.updateUser}, #{item.updateTime})
         </foreach>
     </insert>
 
     <update id="updateSuggestProd" parameterType="SuggestProd">
         update t_suggest_prod
         <trim prefix="SET" suffixOverrides=",">
-            <if test="prodId != null">prodId = #{prodId},</if>
+            <if test="mercProdId != null">mercProdId = #{mercProdId},</if>
             <if test="sort != null">sort = #{sort},</if>
             <if test="delFlag != null">delFlag = #{delFlag},</if>
             <if test="createUser != null">createUser = #{createUser},</if>
@@ -108,7 +108,7 @@
         update t_suggest_prod
         set delFlag = '1'
         <where>
-            <if test="prodId != null "> and prodId = #{prodId}</if>
+            <if test="mercProdId != null "> and mercProdId = #{mercProdId}</if>
             <if test="sort != null "> and sort = #{sort}</if>
             <if test="delFlag != null  and delFlag != ''"> and delFlag = #{delFlag}</if>
             <if test="createUser != null  and createUser != ''"> and createUser = #{createUser}</if>