Explorar o código

Merge branch 'master' of http://git.dayaedu.com/yonge/mec into master_teacherSalary_2020-12-11

zouxuan %!s(int64=4) %!d(string=hai) anos
pai
achega
288465a6cc

+ 6 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentRouteOrderServiceImpl.java

@@ -130,6 +130,11 @@ public class StudentPaymentRouteOrderServiceImpl extends BaseServiceImpl<Long, S
     @Override
     @Override
     @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
     @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
     public StudentPaymentRouteOrder addOutOrder(StudentPaymentRouteOrder studentPaymentRouteOrder) {
     public StudentPaymentRouteOrder addOutOrder(StudentPaymentRouteOrder studentPaymentRouteOrder) {
+        Map<String, Object> params = new HashMap<>();
+        params.put("transNo", studentPaymentRouteOrder.getTransNo());
+        if(studentPaymentRouteOrderDao.queryAuditCount(params) >0){
+            throw new  BizException("流水号不能重复");
+        }
         Date nowDate = new Date();
         Date nowDate = new Date();
         String orderNo = idGeneratorService.generatorId("payment") + "";
         String orderNo = idGeneratorService.generatorId("payment") + "";
         studentPaymentRouteOrder.setOrderNo(orderNo);
         studentPaymentRouteOrder.setOrderNo(orderNo);
@@ -251,7 +256,7 @@ public class StudentPaymentRouteOrderServiceImpl extends BaseServiceImpl<Long, S
 
 
                     BigDecimal hasRouteSellOrderActualAmount = BigDecimal.ZERO;
                     BigDecimal hasRouteSellOrderActualAmount = BigDecimal.ZERO;
                     for (SellOrder sellOrder : sellOrderList) {
                     for (SellOrder sellOrder : sellOrderList) {
-                        if (!goodsMap.getKey().equals(sellOrder.getParentGoodsId()) && !goodsMap.getKey().equals(sellOrder.getGoodsId().toString())) {
+                        if (!goodsMap.getKey().equals(sellOrder.getParentGoodsId().toString()) && !goodsMap.getKey().equals(sellOrder.getGoodsId().toString())) {
                             continue;
                             continue;
                         }
                         }
                         BigDecimal sellOrderActualAmount = BigDecimal.ZERO;
                         BigDecimal sellOrderActualAmount = BigDecimal.ZERO;

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentCalenderMapper.xml

@@ -520,7 +520,7 @@
         AND mgpc.status_ IN ('NO','OPEN','OVER')
         AND mgpc.status_ IN ('NO','OPEN','OVER')
         AND DATE_FORMAT(NOW(),'%Y-%m-%d') >= DATE_FORMAT(mgpc.payment_valid_start_date_,'%Y-%m-%d')
         AND DATE_FORMAT(NOW(),'%Y-%m-%d') >= DATE_FORMAT(mgpc.payment_valid_start_date_,'%Y-%m-%d')
         LEFT JOIN music_group_payment_calender_detail mgpcd ON mgpc.id_ = mgpcd.music_group_payment_calender_id_ AND mgpcd.user_id_ = #{userId}
         LEFT JOIN music_group_payment_calender_detail mgpcd ON mgpc.id_ = mgpcd.music_group_payment_calender_id_ AND mgpcd.user_id_ = #{userId}
-        WHERE FIND_IN_SET(mg.id_,#{musicGroupId})
+        WHERE FIND_IN_SET(mg.id_,#{musicGroupId}) AND mgpc.batch_no_ IS NOT NULL
         GROUP BY mg.id_
         GROUP BY mg.id_
     </select>
     </select>
     <select id="queryUserCoursePaymentStatus" resultType="java.util.Map">
     <select id="queryUserCoursePaymentStatus" resultType="java.util.Map">
@@ -531,7 +531,7 @@
         AND mgpc.status_ IN ('NO','OPEN','OVER')
         AND mgpc.status_ IN ('NO','OPEN','OVER')
         AND DATE_FORMAT(NOW(),'%Y-%m-%d') >= DATE_FORMAT(mgpc.payment_valid_start_date_,'%Y-%m-%d')
         AND DATE_FORMAT(NOW(),'%Y-%m-%d') >= DATE_FORMAT(mgpc.payment_valid_start_date_,'%Y-%m-%d')
         LEFT JOIN music_group_payment_calender_detail mgpcd ON mgpc.id_ = mgpcd.music_group_payment_calender_id_
         LEFT JOIN music_group_payment_calender_detail mgpcd ON mgpc.id_ = mgpcd.music_group_payment_calender_id_
-        WHERE mg.id_ = #{musicGroupId} AND mgpcd.user_id_ IN
+        WHERE mg.id_ = #{musicGroupId} AND mgpc.batch_no_ IS NOT NULL AND mgpcd.user_id_ IN
         <foreach collection="studentId" item="item" separator="," open="(" close=")">
         <foreach collection="studentId" item="item" separator="," open="(" close=")">
             #{item}
             #{item}
         </foreach>
         </foreach>