Bläddra i källkod

1.订单收益内容调整;
2.修改管理端订单列表查询报错问题;

codingliang 1 år sedan
förälder
incheckning
d557f4d916

+ 10 - 11
src/main/java/com/sqx/modules/order/service/impl/AppAppOrderServiceImpl.java

@@ -1868,7 +1868,6 @@ public class AppAppOrderServiceImpl extends ServiceImpl<AppOrderDao, TbOrder> im
         BigDecimal activityDiscountAmount = BigDecimal.ZERO;
         if (ObjectUtil.isNotNull(activityPartRecord)) {
             activityDiscountAmount = activityPartRecord.getDiscountAmount();
-            shopMoney = shopMoney.subtract(activityDiscountAmount);
         }
 
         if(tbOrder.getAutoSendOrder()!=null && tbOrder.getAutoSendOrder()==1){
@@ -1896,28 +1895,28 @@ public class AppAppOrderServiceImpl extends ServiceImpl<AppOrderDao, TbOrder> im
         // 订单金额
         BigDecimal orderAmount = tbOrder.getPayMoney().add(couponMoney).add(activityDiscountAmount);
 
-        contentBuffer.append("订单金额:").append(orderAmount);
+        contentBuffer.append("订单金额:").append(orderAmount.setScale(BigDecimal.ROUND_DOWN));
         if (!couponMoney.equals(BigDecimal.ZERO)) {
-            contentBuffer.append(",优惠券金额:").append(couponMoney);
+            contentBuffer.append(",优惠券金额:").append(couponMoney.setScale(BigDecimal.ROUND_DOWN));
         }
         if (!activityDiscountAmount.equals(BigDecimal.ZERO)) {
-            contentBuffer.append(",活动优惠金额:").append(activityDiscountAmount);
+            contentBuffer.append(",活动优惠金额:").append(activityDiscountAmount.setScale(BigDecimal.ROUND_DOWN));
         }
 
-        contentBuffer.append(",用户实付金额:").append(tbOrder.getPayMoney()).append(",其中:");
+        contentBuffer.append(",用户实付金额:").append(tbOrder.getPayMoney()).append(",其中");
 
         if (tbOrder.getOrderType() != 1) {
-            contentBuffer.append("跑腿费:").append(errandMoney).append("(").append(tbOrder.getErrandMoneyIsShop()).append(")").append(",");
+            contentBuffer.append("跑腿费:").append(errandMoney.setScale(BigDecimal.ROUND_DOWN)).append("(").append(tbOrder.getErrandMoneyIsShop()).append(")").append(",");
         }
 
-        contentBuffer.append("平台服务费:").append(pingRate).append(",");
-        contentBuffer.append("短信服务费:").append(smsSendMoney).append(",");
-        contentBuffer.append("到账金额:").append(shopMoney);
+        contentBuffer.append("平台服务费:").append(pingRate.setScale(BigDecimal.ROUND_DOWN)).append(",");
+        contentBuffer.append("短信服务费:").append(smsSendMoney.setScale(BigDecimal.ROUND_DOWN)).append(",");
+        contentBuffer.append("到账金额:").append(shopMoney.setScale(BigDecimal.ROUND_DOWN));
 
         if (shopIds == 0) {
-            contentBuffer.append("(本单为平台优惠券,平台补贴)");
+            contentBuffer.append("(本单为平台优惠券,平台补贴)");
         } else if (shopIds != -1) {
-            contentBuffer.append("(本单为商家优惠券,商家补贴)");
+            contentBuffer.append("(本单为商家优惠券,商家补贴)");
         }
 
         userMoneyDetails1.setContent(contentBuffer.toString());

+ 2 - 2
src/main/resources/mapper/order/OrderMapper.xml

@@ -124,10 +124,10 @@
             and tor.order_type_extra = #{orderType}
         </if>
         <if test="indentStatus != null and indentStatus != ''">
-            ti.indent_state = #{indentStatus}
+            and ti.indent_state = #{indentStatus}
         </if>
         <if test="reservationFlag != null and reservationFlag !=''">
-            tor.reservation_flag = #{reservationFlag}
+            and tor.reservation_flag = #{reservationFlag}
         </if>
         <if test="startTime!=null and startTime!=''">
             and date_format(tor.create_time,'%Y-%m-%d') >= date_format(#{startTime},'%Y-%m-%d')