Преглед изворни кода

Merge branch 'master' of http://git.dayaedu.com/yonge/edu-saas

zouxuan пре 5 година
родитељ
комит
eff87b64f7

+ 12 - 4
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamRegistrationPaymentServiceImpl.java

@@ -15,21 +15,21 @@ import com.keao.edu.user.dao.ExamRegistrationPaymentDao;
 import com.keao.edu.user.dto.ExamPaymentInfo;
 import com.keao.edu.user.dto.ExamRegistrationDto;
 import com.keao.edu.user.dto.ExamRegistrationPaymentDto;
-import com.keao.edu.user.dto.StudentExamPaymentDto;
 import com.keao.edu.user.entity.ExamOrganizationRelation;
 import com.keao.edu.user.entity.ExamRegistration;
 import com.keao.edu.user.entity.ExamRegistrationPayment;
+import com.keao.edu.user.entity.Organization;
 import com.keao.edu.user.enums.StudentRegistrationStatusEnum;
 import com.keao.edu.user.enums.TransStatusEnum;
 import com.keao.edu.user.page.ExamRegistrationPaymentQueryInfo;
-import com.keao.edu.user.page.ExamRegistrationQueryInfo;
-import com.keao.edu.user.service.ExamOrganizationRelationService;
 import com.keao.edu.user.service.ExamRegistrationPaymentService;
 import com.keao.edu.user.service.ExamRegistrationService;
 import com.keao.edu.user.service.OrganizationService;
 import com.keao.edu.util.collection.MapUtil;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Isolation;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
@@ -76,7 +76,7 @@ public class ExamRegistrationPaymentServiceImpl extends BaseServiceImpl<Long, Ex
     }
 
     @Override
-    @Transactional(rollbackFor = Exception.class)
+    @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
     public ExamRegistrationPayment updateOrder(Map<String, String> rpMap) {
         ExamRegistrationPayment order = examRegistrationPaymentDao.getByOrderNo(rpMap.get("orderNo"));
         if (order == null || !order.getTransStatus().equals(TransStatusEnum.ING)) {
@@ -117,6 +117,14 @@ public class ExamRegistrationPaymentServiceImpl extends BaseServiceImpl<Long, Ex
         if (examOrganizationRelationDao.update(examOrganizationRelation) <= 0) {
             throw new BizException("报名人数报名金额更新失败");
         }
+        Organization organization = organizationService.get(examRegistration.getOrganId());
+        if(StringUtils.countMatches(organization.getParentOrganIdTag(), ",")<=0){
+            return order;
+        }
+        List<Integer> parentOrganIds = Arrays.stream(organization.getParentOrganIdTag().split(","))
+                .map(e -> Integer.valueOf(e)).filter(e -> !e.equals(organization.getId())).collect(Collectors.toList());
+
+
         return order;
     }
 

+ 1 - 1
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamRegistrationMapper.xml

@@ -138,7 +138,7 @@
 
 	<sql id="queryCondition">
 		<where>
-			er.status_ != 'PAY_WAIT' AND er.status_ != 'AUDIT_WAIT'
+			er.status_ != 'PAY_WAIT'
 			<if test="organIds!=null">
 				AND er.organ_id_ IN
 				<foreach collection="organIds" item="organId" separator="," open="(" close=")">