Browse Source

fix:测试退款

liujunchi 2 years ago
parent
commit
8b55c624c4

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml

@@ -1049,7 +1049,7 @@
         from student_payment_order as a
                  left join
              student_payment_order_detail as b on a.id_ = b.payment_order_id_
-        where order_no_ = #{orderNo}
+        where a.order_no_ = #{orderNo}
     </select>
     <select id="getStudentMusicOrderNum" resultType="int">
         SELECT COUNT(0) FROM student_payment_order spo

+ 8 - 0
mec-mall/mall-admin/src/main/java/com/yonge/cooleshow/admin/service/impl/PmsProductServiceImpl.java

@@ -132,6 +132,14 @@ public class PmsProductServiceImpl implements PmsProductService {
 
     @Override
     public int update(Long id, PmsProductParam productParam) {
+        if (productParam.getPrice().compareTo(BigDecimal.ZERO) <=0 ) {
+            throw new BizException("商品价格不能小于等于0");
+        }
+        for (PmsSkuStock pmsSkuStock : productParam.getSkuStockList()) {
+            if (pmsSkuStock.getPrice().compareTo(BigDecimal.ZERO) <= 0) {
+                throw new BizException("商品价格不能小于等于0");
+            }
+        }
         int count;
         //更新商品信息
         PmsProduct product = productParam;

+ 1 - 0
mec-mall/mall-portal/src/main/java/com/yonge/cooleshow/portal/service/impl/OmsPortalOrderServiceImpl.java

@@ -824,6 +824,7 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService {
         refundModel.setNotifyUrl(baseUrl + "/api-mall-portal/payment/callback");
         HttpResponseResult<BaseResult<Map<String, Object>>> refund = webFeignService.refund(refundModel);
         if (!refund.getStatus()) {
+            LOG.error("退款失败:{}",refund.getMsg());
             throw new BizException("退款失败");
         }
         BaseResult<Map<String, Object>> mapBaseResult = refund.getData();