Browse Source

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

zouxuan 5 years ago
parent
commit
3926b48b1b

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPaymentOrderDetailDao.java

@@ -46,7 +46,7 @@ public interface StudentPaymentOrderDetailDao extends BaseDAO<Long, StudentPayme
      * @param status
      * @param status
      * @return
      * @return
      */
      */
-    List<StudentPaymentOrderDetail> findUserApplyOrder(@Param("userId") Integer userId, @Param("status") DealStatusEnum status);
+    List<StudentPaymentOrderDetail> findUserApplyOrder(@Param("userId") Integer userId, @Param("musicGroupId") String musicGroupId, @Param("status") DealStatusEnum status);
 
 
     /**
     /**
      * 乐器采购清单明细
      * 乐器采购清单明细

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentCompetition.java

@@ -168,11 +168,11 @@ public class StudentCompetition {
 		this.prizeLevel = prizeLevel;
 		this.prizeLevel = prizeLevel;
 	}
 	}
 
 
-	public Boolean getShow() {
+	public Boolean getIsShow() {
 		return isShow;
 		return isShow;
 	}
 	}
 
 
-	public void setShow(Boolean show) {
+	public void setIsShow(Boolean show) {
 		isShow = show;
 		isShow = show;
 	}
 	}
 
 

+ 13 - 12
mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentCompetitionQueryInfo.java

@@ -1,5 +1,6 @@
 package com.ym.mec.biz.dal.page;
 package com.ym.mec.biz.dal.page;
 
 
+import com.sun.org.apache.xpath.internal.operations.Bool;
 import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
 
 
@@ -13,7 +14,7 @@ import java.util.Date;
 public class StudentCompetitionQueryInfo extends QueryInfo {
 public class StudentCompetitionQueryInfo extends QueryInfo {
 
 
     @ApiModelProperty(value = "性别")
     @ApiModelProperty(value = "性别")
-    private boolean gender;
+    private Boolean gender;
 
 
     @ApiModelProperty(value = "年级")
     @ApiModelProperty(value = "年级")
     private String grade;
     private String grade;
@@ -28,21 +29,29 @@ public class StudentCompetitionQueryInfo extends QueryInfo {
     private Integer prizeLevel;
     private Integer prizeLevel;
 
 
     @ApiModelProperty(value = "是否展示")
     @ApiModelProperty(value = "是否展示")
-    private boolean isShow;
+    private Boolean isShow;
 
 
     @ApiModelProperty(value = "评价")
     @ApiModelProperty(value = "评价")
     private String comment;
     private String comment;
 
 
     private java.util.Date createTime;
     private java.util.Date createTime;
 
 
-    public boolean isGender() {
+    public Boolean getGender() {
         return gender;
         return gender;
     }
     }
 
 
-    public void setGender(boolean gender) {
+    public void setGender(Boolean gender) {
         this.gender = gender;
         this.gender = gender;
     }
     }
 
 
+    public Boolean getIsShow() {
+        return isShow;
+    }
+
+    public void setIsShow(Boolean show) {
+        isShow = show;
+    }
+
     public String getGrade() {
     public String getGrade() {
         return grade;
         return grade;
     }
     }
@@ -75,14 +84,6 @@ public class StudentCompetitionQueryInfo extends QueryInfo {
         this.prizeLevel = prizeLevel;
         this.prizeLevel = prizeLevel;
     }
     }
 
 
-    public boolean isShow() {
-        return isShow;
-    }
-
-    public void setShow(boolean show) {
-        isShow = show;
-    }
-
     public String getComment() {
     public String getComment() {
         return comment;
         return comment;
     }
     }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/StudentPaymentOrderDetailService.java

@@ -55,7 +55,7 @@ public interface StudentPaymentOrderDetailService extends BaseService<Long, Stud
      * @param status
      * @param status
      * @return
      * @return
      */
      */
-    List<StudentPaymentOrderDetail>findUserApplyOrder(Integer userId,DealStatusEnum status);
+    List<StudentPaymentOrderDetail>findUserApplyOrder(Integer userId,String musicGroupId,DealStatusEnum status);
 
 
     /**
     /**
      * 乐器采购清单明细
      * 乐器采购清单明细

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

@@ -1220,7 +1220,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 //                String[] studentNames = classGroupStudentMapperDao.findCourseStudentName(courseScheduleDto.getId().intValue());
 //                String[] studentNames = classGroupStudentMapperDao.findCourseStudentName(courseScheduleDto.getId().intValue());
                 List<StudentNameAndPhoneDto> courseStudentNameAndPhone = classGroupStudentMapperDao.findCourseStudentNameAndPhone(courseScheduleDto.getId().intValue());
                 List<StudentNameAndPhoneDto> courseStudentNameAndPhone = classGroupStudentMapperDao.findCourseStudentNameAndPhone(courseScheduleDto.getId().intValue());
                 if(!CollectionUtils.isEmpty(courseStudentNameAndPhone)){
                 if(!CollectionUtils.isEmpty(courseStudentNameAndPhone)){
-                    List<String> studentNames = courseStudentNameAndPhone.stream().filter(s->Objects.nonNull(s.getUserName())).map(StudentNameAndPhoneDto::getUserName).collect(Collectors.toList());
+                    List<String> studentNames = courseStudentNameAndPhone.stream().filter(s->Objects.nonNull(s)).map(StudentNameAndPhoneDto::getUserName).collect(Collectors.toList());
                     courseScheduleDto.setStudentNames(org.apache.commons.lang3.StringUtils.join(studentNames, ","));
                     courseScheduleDto.setStudentNames(org.apache.commons.lang3.StringUtils.join(studentNames, ","));
                     courseScheduleDto.setStudents(courseStudentNameAndPhone);
                     courseScheduleDto.setStudents(courseStudentNameAndPhone);
                 }
                 }

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

@@ -447,7 +447,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         //乐器及打包辅件
         //乐器及打包辅件
         List<MusicGroupSubjectGoodsGroup> goodsGroups = new ArrayList<>();
         List<MusicGroupSubjectGoodsGroup> goodsGroups = new ArrayList<>();
         if (studentRegistration.getTemporaryCourseFee() != null) {
         if (studentRegistration.getTemporaryCourseFee() != null) {
-            List<StudentPaymentOrderDetail> orderDetails = studentPaymentOrderDetailService.findUserApplyOrder(studentRegistration.getUserId(), DealStatusEnum.WAIT_PAY);
+            List<StudentPaymentOrderDetail> orderDetails = studentPaymentOrderDetailService.findUserApplyOrder(studentRegistration.getUserId(),studentRegistration.getMusicGroupId(), DealStatusEnum.WAIT_PAY);
             for (StudentPaymentOrderDetail orderDetail : orderDetails) {
             for (StudentPaymentOrderDetail orderDetail : orderDetails) {
                 if (orderDetail == null || orderDetail.getPrice() == null || orderDetail.getGoodsIdList() == null) {
                 if (orderDetail == null || orderDetail.getPrice() == null || orderDetail.getGoodsIdList() == null) {
                     continue;
                     continue;
@@ -665,7 +665,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         //乐器及打包辅件
         //乐器及打包辅件
         List<MusicGroupSubjectGoodsGroup> goodsGroups = new ArrayList<>();
         List<MusicGroupSubjectGoodsGroup> goodsGroups = new ArrayList<>();
         if (studentRegistration.getTemporaryCourseFee() != null) {
         if (studentRegistration.getTemporaryCourseFee() != null) {
-            List<StudentPaymentOrderDetail> orderDetails = studentPaymentOrderDetailService.findUserApplyOrder(studentRegistration.getUserId(), DealStatusEnum.WAIT_PAY);
+            List<StudentPaymentOrderDetail> orderDetails = studentPaymentOrderDetailService.findUserApplyOrder(studentRegistration.getUserId(),studentRegistration.getMusicGroupId(), DealStatusEnum.WAIT_PAY);
             for (StudentPaymentOrderDetail orderDetail : orderDetails) {
             for (StudentPaymentOrderDetail orderDetail : orderDetails) {
                 if (orderDetail == null || orderDetail.getPrice() == null || orderDetail.getGoodsIdList() == null) {
                 if (orderDetail == null || orderDetail.getPrice() == null || orderDetail.getGoodsIdList() == null) {
                     continue;
                     continue;

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

@@ -182,7 +182,7 @@ public class MusicGroupSubjectPlanServiceImpl extends BaseServiceImpl<Integer, M
         //乐团乐器及辅件信息
         //乐团乐器及辅件信息
         List<MusicGroupSubjectGoodsGroup> goodsGroups = new ArrayList<>();
         List<MusicGroupSubjectGoodsGroup> goodsGroups = new ArrayList<>();
 
 
-        List<StudentPaymentOrderDetail> orderDetails = studentPaymentOrderDetailDao.findUserApplyOrder(studentRegistration.getUserId(), DealStatusEnum.WAIT_PAY);
+        List<StudentPaymentOrderDetail> orderDetails = studentPaymentOrderDetailDao.findUserApplyOrder(studentRegistration.getUserId(),musicGroupId, DealStatusEnum.WAIT_PAY);
         for (StudentPaymentOrderDetail orderDetail : orderDetails) {
         for (StudentPaymentOrderDetail orderDetail : orderDetails) {
             if (orderDetail == null || orderDetail.getGoodsIdList() == null || orderDetail.getGoodsIdList().isEmpty())
             if (orderDetail == null || orderDetail.getGoodsIdList() == null || orderDetail.getGoodsIdList().isEmpty())
                 continue;
                 continue;

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

@@ -236,8 +236,8 @@ public class StudentPaymentOrderDetailServiceImpl extends BaseServiceImpl<Long,
     }
     }
 
 
     @Override
     @Override
-    public List<StudentPaymentOrderDetail> findUserApplyOrder(Integer userId, DealStatusEnum status) {
-        return studentPaymentOrderDetailDao.findUserApplyOrder(userId, status);
+    public List<StudentPaymentOrderDetail> findUserApplyOrder(Integer userId, String musicGroupId, DealStatusEnum status) {
+        return studentPaymentOrderDetailDao.findUserApplyOrder(userId, musicGroupId, status);
     }
     }
 
 
     @Override
     @Override

+ 1 - 5
mec-biz/src/main/resources/config/mybatis/StudentCompetitionMapper.xml

@@ -1,9 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<!--
-这个文件是自动生成的。
-不要修改此文件。所有改动将在下次重新自动生成时丢失。
--->
 <mapper namespace="com.ym.mec.biz.dal.dao.StudentCompetitionDao">
 <mapper namespace="com.ym.mec.biz.dal.dao.StudentCompetitionDao">
 	
 	
 	<resultMap type="com.ym.mec.biz.dal.entity.StudentCompetition" id="StudentCompetition">
 	<resultMap type="com.ym.mec.biz.dal.entity.StudentCompetition" id="StudentCompetition">
@@ -28,7 +24,7 @@
 	
 	
 	<!-- 根据主键查询一条记录 -->
 	<!-- 根据主键查询一条记录 -->
 	<select id="get" resultMap="StudentCompetition" >
 	<select id="get" resultMap="StudentCompetition" >
-		SELECT * FROM student_competition WHERE id_ = #{id} FOR UPDATE
+		SELECT * FROM student_competition WHERE id_ = #{id}
 	</select>
 	</select>
 	
 	
 	<!-- 全查询 -->
 	<!-- 全查询 -->

+ 1 - 0
mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderDetailMapper.xml

@@ -138,6 +138,7 @@
         FROM student_payment_order spo
         FROM student_payment_order spo
                  LEFT JOIN student_payment_order_detail spod ON spo.id_ = spod.payment_order_id_
                  LEFT JOIN student_payment_order_detail spod ON spo.id_ = spod.payment_order_id_
         WHERE spo.user_id_ = #{userId}
         WHERE spo.user_id_ = #{userId}
+          AND spo.music_group_id_ = #{musicGroupId}
           AND spo.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
           AND spo.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
           AND spo.type_ = 'APPLY'
           AND spo.type_ = 'APPLY'
     </select>
     </select>