Prechádzať zdrojové kódy

Merge branch 'activity_2020_12'

Joburgess 4 rokov pred
rodič
commit
d151b57a1c

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/DegreeRegistrationServiceImpl.java

@@ -76,7 +76,7 @@ public class DegreeRegistrationServiceImpl extends BaseServiceImpl<Integer, Degr
 
         //获取收费项价格
         SporadicChargeInfo chargeInfo = null;
-        if(Objects.nonNull(degreeRegistration.getLevel())&&Objects.nonNull(degreeRegistration.getTheoryLevel())){
+        if(Objects.nonNull(degreeRegistration.getSporadicId())&&Objects.nonNull(degreeRegistration.getTheoryLevel())){
             chargeInfo = sporadicChargeInfoDao.get(degreeRegistration.getSporadicId());
             if (chargeInfo == null || chargeInfo.getDelFlag().equals(1) || chargeInfo.getOpenFlag().equals(1)) {
                 throw new BizException("你选的考试级别不存在");
@@ -215,7 +215,7 @@ public class DegreeRegistrationServiceImpl extends BaseServiceImpl<Integer, Degr
             return notifyMap;
         }
 
-        if(BigDecimal.ZERO.compareTo(additionCoursePrice)>0){
+        if(BigDecimal.ZERO.compareTo(additionCoursePrice)<0){
             StudentPaymentOrderDetail studentPaymentOrderDetail = new StudentPaymentOrderDetail();
             studentPaymentOrderDetail.setType(OrderDetailTypeEnum.DEGREE_REGISTRATION);
             studentPaymentOrderDetail.setGoodsIdList(JSON.toJSONString(typeCourseTime));

+ 6 - 0
mec-student/src/main/java/com/ym/mec/student/controller/StudentOrderController.java

@@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.util.CollectionUtils;
 import org.springframework.util.DigestUtils;
 import org.springframework.web.bind.annotation.*;
 
@@ -140,6 +141,11 @@ public class StudentOrderController extends BaseController {
             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())){
+                List<StudentPaymentOrderDetail> studentPaymentOrderDetails = studentPaymentOrderDetailService.getOrderDetail(orderByOrderNo.getId());
+                if(!CollectionUtils.isEmpty(studentPaymentOrderDetails)){
+                    orderDetail.put("additionCourseInfo", studentPaymentOrderDetails.get(0).getGoodsIdList());
+                }
             }
         } else if (orderByOrderNo.getGroupType().equals(GroupType.GOODS_SELL)) {
             orderDetail.put("detail", studentGoodsSellDao.getStudentGoodsSellDto(orderNo));