zoujiajian 1 년 전
부모
커밋
f7d7548eed

+ 4 - 2
netflix-dao/src/main/resources/mapper/GoodsWholesaleUserSkuPayRecordMapper.xml

@@ -5,10 +5,12 @@
 
     <select id="selectUserHasPaySkuDifferRecord"
             resultType="com.cyksj.model.entity.GoodsWholesaleUserSkuPayRecord">
-        select gor.* from (select id from goods_wholesale_order_don where status not in ('close','noPayment','refund') and
+        select gor.* from (select id from goods_wholesale_order_don where status not in ('close','noPayment','refund')
+        and
         user_id in
         <foreach collection="userIds" item="item" open="(" separator="," close=")">
             #{item}
-        </foreach>) o inner join goods_wholesale_user_sku_pay_record gor on gor.order_id = o.id
+        </foreach>
+        and sku_id = #{skuId}) o inner join goods_wholesale_user_sku_pay_record gor on gor.order_id = o.id
     </select>
 </mapper>

+ 1 - 1
netflix-service/src/main/java/com/cyksj/service/order/impl/GoodsWholesalePayServiceImpl.java

@@ -455,6 +455,7 @@ public class GoodsWholesalePayServiceImpl implements GoodsWholesalePayService {
 		Integer endPayNum = hasPaidNum + thisPayNum;
 		//未超过第一档
 		if (endPayNum <= firstConfig.getEnd()) {
+			orderDon.setIsRecordDiffer(true);
 			orderDon.setMoney(BigDecimal.valueOf(thisPayNum).multiply(firstConfig.getSingle()));
 			return;
 		}
@@ -465,7 +466,6 @@ public class GoodsWholesalePayServiceImpl implements GoodsWholesalePayService {
 		//超过最后
 		if (endPayNum >= endConfig.getStart()) {
 			orderDon.setMoney(BigDecimal.valueOf(thisPayNum).multiply(endConfig.getSingle()));
-			orderDon.setIsRecordDiffer(true);
 			return;
 		}
 		if (endConfig.getEnd().intValue() != 999 && endPayNum > endConfig.getEnd()) {