Browse Source

订单状态查询中加,审核状态

river 4 years ago
parent
commit
a39c851eaf

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentOrderExportDto.java

@@ -90,6 +90,8 @@ public class StudentPaymentOrderExportDto extends StudentPaymentOrder {
 
     private String feeFlag;
 
+    private Integer payingStatus;
+
     public BigDecimal getSporadicAmount() {
         return sporadicAmount;
     }
@@ -369,4 +371,12 @@ public class StudentPaymentOrderExportDto extends StudentPaymentOrder {
     public void setRechargeFee(BigDecimal rechargeFee) {
         this.rechargeFee = rechargeFee;
     }
+
+    public Integer getPayingStatus() {
+        return payingStatus;
+    }
+
+    public void setPayingStatus(Integer payingStatus) {
+        this.payingStatus = payingStatus;
+    }
 }

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/StudentRegistrationService.java

@@ -8,6 +8,7 @@ import com.ym.mec.biz.dal.page.RegistrationOrPreQueryInfo;
 import com.ym.mec.biz.dal.page.StudentRegistrationQueryInfo;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
+import org.apache.ibatis.annotations.Param;
 
 import java.io.IOException;
 import java.math.BigDecimal;
@@ -420,4 +421,14 @@ public interface StudentRegistrationService extends BaseService<Long, StudentReg
      */
     Boolean addPaidNum(Long id);
 
+
+    /**
+     * 获取学生乐团的注册信息
+     * @param musicGroupId
+     * @param studentId
+     * @return
+     */
+    StudentRegistration getStudentRegister(String musicGroupId, Integer studentId);
+
+
 }

+ 6 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java

@@ -12,7 +12,7 @@ import java.util.Map;
 import java.util.stream.Collectors;
 
 import com.ym.mec.biz.dal.dao.*;
-import com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail;
+import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.service.*;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -25,9 +25,6 @@ import com.ym.mec.biz.dal.dto.PageInfoOrder;
 import com.ym.mec.biz.dal.dto.SporadicChargeInfoDto;
 import com.ym.mec.biz.dal.dto.StudentPaymentOrderDto;
 import com.ym.mec.biz.dal.dto.StudentPaymentOrderExportDto;
-import com.ym.mec.biz.dal.entity.Goods;
-import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
-import com.ym.mec.biz.dal.entity.StudentPaymentRouteOrder;
 import com.ym.mec.biz.dal.enums.DealStatusEnum;
 import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
@@ -527,7 +524,12 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
     @Override
     public List<StudentPaymentOrderExportDto> getUserApplyOrders(Integer studentId, String musicGroupId) {
         List<StudentPaymentOrderExportDto> orders = studentPaymentOrderDao.getUserApplyOrders(studentId, musicGroupId);
+        StudentRegistration studentRegister = studentRegistrationService.getStudentRegister(musicGroupId, studentId);
         for (StudentPaymentOrderExportDto order : orders) {
+            if((DealStatusEnum.ING.equals(order.getStatus())||DealStatusEnum.SUCCESS.equals(order.getStatus())) &&
+                studentRegister.getPayingStatus().equals(2)){
+                order.setPayingStatus(2);
+            }
             if (order.getOrderDetailList() == null) continue;
             for (StudentPaymentOrderDetail studentPaymentOrderDetail : order.getOrderDetailList()) {
                 if (studentPaymentOrderDetail.getGoodsList() == null) continue;

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

@@ -1934,4 +1934,9 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
         }
         return true;
     }
+
+    @Override
+    public StudentRegistration getStudentRegister(String musicGroupId, Integer studentId) {
+        return studentRegistrationDao.getStudentRegister(musicGroupId,studentId);
+    }
 }

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

@@ -143,7 +143,7 @@ public class StudentOrderController extends BaseController {
         orderDetail.put("order", orderByOrderNo);
         orderDetail.put("groupType", orderByOrderNo.getGroupType());
         if(OrderTypeEnum.APPLY.equals(orderByOrderNo.getType())){
-            StudentRegistration studentRegistration = studentRegistrationDao.queryByUserIdAndMusicGroupId(orderByOrderNo.getUserId(), orderByOrderNo.getMusicGroupId());
+            StudentRegistration studentRegistration = studentRegistrationDao.getStudentRegister(orderByOrderNo.getMusicGroupId(),orderByOrderNo.getUserId());
             if(studentRegistration.getPayingStatus().equals(2)) {
                 orderDetail.put("payingStatus",studentRegistration.getPayingStatus());
             }