Parcourir la source

2022考级报名

zouxuan il y a 3 ans
Parent
commit
bb0efbf8d1

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/DegreeRegistrationDao.java

@@ -31,4 +31,6 @@ public interface DegreeRegistrationDao extends BaseDAO<Integer, DegreeRegistrati
     void batchInsert(@Param("degreeRegistrationList") List<DegreeRegistration> degreeRegistrationList);
 
     List<DegreeRegistration> getLockByOrderId(@Param("orderNo") String orderNo);
+
+    List<DegreeRegistration> findByByOrderId(@Param("orderNo") String orderNo);
 }

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SporadicChargeInfoDao.java

@@ -39,4 +39,6 @@ public interface SporadicChargeInfoDao extends BaseDAO<Integer, SporadicChargeIn
      * @return
      */
     List<OrganMaxAmountDto> getActiveOrgansMaxAmount(@Param("type") Integer type,@Param("tenantId") Integer tenantId);
+
+    List<SporadicChargeInfo> findByIds(@Param("sporadicIds") String sporadicIds);
 }

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/SporadicChargeInfoService.java

@@ -71,4 +71,6 @@ public interface SporadicChargeInfoService extends BaseService<Integer, Sporadic
      * @return
      */
     List<SporadicChargeInfo> getOrganActiveInfo(Integer organId, Integer type);
+
+    List<SporadicChargeInfo> findByIds(String sporadicIds);
 }

+ 5 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SporadicChargeInfoImpl.java

@@ -273,4 +273,9 @@ public class SporadicChargeInfoImpl extends BaseServiceImpl<Integer, SporadicCha
     public List<SporadicChargeInfo> getOrganActiveInfo(Integer organId, Integer type) {
         return sporadicChargeInfoDao.getOrganActiveInfo(organId, type);
     }
+
+    @Override
+    public List<SporadicChargeInfo> findByIds(String sporadicIds) {
+        return sporadicChargeInfoDao.findByIds(sporadicIds);
+    }
 }

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/DegreeRegistrationMapper.xml

@@ -357,6 +357,9 @@
             </if>
     </select>
     <select id="getLockByOrderId" resultMap="DegreeRegistration">
+        SELECT * FROM degree_registration WHERE order_no_ = #{orderNo} FOR UPDATE
+    </select>
+    <select id="findByByOrderId" resultMap="DegreeRegistration">
         SELECT * FROM degree_registration WHERE order_no_ = #{orderNo}
     </select>
 </mapper>

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/SporadicChargeInfo.xml

@@ -219,4 +219,7 @@
         FROM sporadic_charge_info
         <include refid="findSporadicChargeInfosCondition" />
     </select>
+    <select id="findByIds" resultMap="SporadicChargeInfo">
+        SELECT * FROM sporadic_charge_info WHERE FIND_IN_SET(id_,#{sporadicIds})
+    </select>
 </mapper>

+ 3 - 2
mec-student/src/main/java/com/ym/mec/student/controller/StudentOrderController.java

@@ -240,14 +240,15 @@ public class StudentOrderController extends BaseController {
             }
         } else if (orderByOrderNo.getGroupType().equals(GroupType.SPORADIC)) {
             if (Objects.nonNull(orderByOrderNo.getMusicGroupId())) {
-                SporadicChargeInfo info = sporadicChargeInfoService.get(Integer.valueOf(orderByOrderNo.getMusicGroupId()));
+                List<SporadicChargeInfo> info = sporadicChargeInfoService.findByIds(orderByOrderNo.getMusicGroupId());
                 orderDetail.put("detail", info);
             }
             if (orderByOrderNo.getType().equals(OrderTypeEnum.DOUBLE_ELEVEN2020)) {
                 LuckDrawCount luckDrawCount = luckDrawCountService.get(orderByOrderNo.getUserId().longValue());
                 orderDetail.put("drawTimes", luckDrawCount == null ? 0 : luckDrawCount.getAvailableCount());
             } else if (OrderTypeEnum.DEGREE_REGISTRATION.equals(orderByOrderNo.getType())) {
-                DegreeRegistration degreeRegistration = degreeRegistrationDao.get(orderByOrderNo.getClassGroupId());
+                List<DegreeRegistration> degreeRegistration = degreeRegistrationDao.findByByOrderId(orderByOrderNo.getOrderNo());
+//                DegreeRegistration degreeRegistration = degreeRegistrationDao.get(orderByOrderNo.getClassGroupId());
                 orderDetail.put("degree", degreeRegistration);
                 List<StudentPaymentOrderDetail> studentPaymentOrderDetails = studentPaymentOrderDetailService.getOrderDetail(orderByOrderNo.getId());
                 if (!CollectionUtils.isEmpty(studentPaymentOrderDetails)) {