Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

周箭河 5 gadi atpakaļ
vecāks
revīzija
fe86bbe934

+ 1 - 1
codegen/src/main/java/com/yonge/crud/CodegenApplication.java

@@ -28,7 +28,7 @@ public class CodegenApplication {
 		 */
 
 		// "src/generateConfigration.xml"
-		GenerateConfiguration genConfig = toObject("codegen/src/main/resources/generateConfigration.xml", GenerateConfiguration.class);
+		GenerateConfiguration genConfig = toObject("src/main/resources/generateConfigration.xml", GenerateConfiguration.class);
 
 		Configuration config = genConfig.getDbConfiguration();
 

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

@@ -1416,7 +1416,7 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
      * @param groupType
      * @return
      */
-    List<CourseScheduleRateDto> findCourseRate(@Param("groupId") String groupId, @Param("groupType") String groupType);
+    List<CourseScheduleRateDto> findCourseRate(@Param("groupId") String groupId, @Param("groupType") String groupType, @Param("classGroupId") Integer classGroupId);
 
     /**
      * 获取最后一次已结束的课程
@@ -1425,7 +1425,7 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
      * @param groupType
      * @return
      */
-    CourseSchedule getLastEndCourse(@Param("groupId") String groupId, @Param("groupType") String groupType);
+    CourseSchedule getLastEndCourse(@Param("groupId") String groupId, @Param("groupType") String groupType, @Param("classGroupId") Integer classGroupId);
 
     /**
      * 根据课程组获取课表信息

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupPaymentCalenderDetailDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderDetail;
+import com.ym.mec.common.dal.BaseDAO;
+
+public interface MusicGroupPaymentCalenderDetailDao extends BaseDAO<Long, MusicGroupPaymentCalenderDetail> {
+
+	
+}

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

@@ -13,6 +13,7 @@ public interface StudentDao extends com.ym.mec.common.dal.BaseDAO<Integer, Stude
 
     int lockUser(@Param("userId") Integer userId);
 
+    SysUser lockUserReturnInfo(@Param("userId") Integer userId);
 
     List<SysUser> findStudents(Map<String, Object> params);
 

+ 66 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/OnlineMusicGroupCourseDto.java

@@ -0,0 +1,66 @@
+package com.ym.mec.biz.dal.dto;
+
+import java.util.Date;
+
+public class OnlineMusicGroupCourseDto {
+
+    private String musicGroupId;
+
+    private Integer studentId;
+
+    private Integer subjectId;
+
+    private Integer teacherId;
+
+    private Date firstCourseTime;
+
+    private boolean skipHoliday;
+
+    public boolean isSkipHoliday() {
+        return skipHoliday;
+    }
+
+    public void setSkipHoliday(boolean skipHoliday) {
+        this.skipHoliday = skipHoliday;
+    }
+
+    public String getMusicGroupId() {
+        return musicGroupId;
+    }
+
+    public void setMusicGroupId(String musicGroupId) {
+        this.musicGroupId = musicGroupId;
+    }
+
+    public Integer getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Integer studentId) {
+        this.studentId = studentId;
+    }
+
+    public Integer getSubjectId() {
+        return subjectId;
+    }
+
+    public void setSubjectId(Integer subjectId) {
+        this.subjectId = subjectId;
+    }
+
+    public Integer getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Integer teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public Date getFirstCourseTime() {
+        return firstCourseTime;
+    }
+
+    public void setFirstCourseTime(Date firstCourseTime) {
+        this.firstCourseTime = firstCourseTime;
+    }
+}

+ 55 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupPaymentCalender.java

@@ -1,8 +1,13 @@
 package com.ym.mec.biz.dal.entity;
 
 import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
+import com.ym.mec.biz.dal.enums.PaymentStatusEnum;
+
 /**
  * 对应数据库表(music_group_payment_calender):
  */
@@ -22,6 +27,16 @@ public class MusicGroupPaymentCalender implements Comparable<MusicGroupPaymentCa
 	/** 开始缴费日期 */
 	@ApiModelProperty(value = "开始缴费日期", required = false)
 	private java.util.Date startPaymentDate;
+	
+	private Date deadlinePaymentDate;
+	
+	private PaymentStatusEnum paymentStatus;
+	
+	private Integer expectNum;
+	
+	private Integer actualNum;
+	
+	private String memo;
 
 	/**  */
 	private java.util.Date createTime;
@@ -77,6 +92,46 @@ public class MusicGroupPaymentCalender implements Comparable<MusicGroupPaymentCa
 		return this.updateTime;
 	}
 
+	public Date getDeadlinePaymentDate() {
+		return deadlinePaymentDate;
+	}
+
+	public void setDeadlinePaymentDate(Date deadlinePaymentDate) {
+		this.deadlinePaymentDate = deadlinePaymentDate;
+	}
+
+	public PaymentStatusEnum getPaymentStatus() {
+		return paymentStatus;
+	}
+
+	public void setPaymentStatus(PaymentStatusEnum paymentStatus) {
+		this.paymentStatus = paymentStatus;
+	}
+
+	public Integer getExpectNum() {
+		return expectNum;
+	}
+
+	public void setExpectNum(Integer expectNum) {
+		this.expectNum = expectNum;
+	}
+
+	public Integer getActualNum() {
+		return actualNum;
+	}
+
+	public void setActualNum(Integer actualNum) {
+		this.actualNum = actualNum;
+	}
+
+	public String getMemo() {
+		return memo;
+	}
+
+	public void setMemo(String memo) {
+		this.memo = memo;
+	}
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 125 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupPaymentCalenderDetail.java

@@ -0,0 +1,125 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(music_group_payment_calender_detail):
+ */
+public class MusicGroupPaymentCalenderDetail {
+
+	/**  */
+	private Long id;
+	
+	/**  */
+	private Long musicGroupPaymentCalenderId;
+	
+	/**  */
+	private Long userId;
+	
+	/**  */
+	private java.math.BigDecimal expectAmount;
+	
+	/**  */
+	private java.math.BigDecimal actualAmount;
+	
+	/**  */
+	private String paymentStatus;
+	
+	/**  */
+	private String userStatus;
+	
+	/**  */
+	private java.util.Date payTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	public void setId(Long id){
+		this.id = id;
+	}
+	
+	public Long getId(){
+		return this.id;
+	}
+			
+	public void setMusicGroupPaymentCalenderId(Long musicGroupPaymentCalenderId){
+		this.musicGroupPaymentCalenderId = musicGroupPaymentCalenderId;
+	}
+	
+	public Long getMusicGroupPaymentCalenderId(){
+		return this.musicGroupPaymentCalenderId;
+	}
+			
+	public void setUserId(Long userId){
+		this.userId = userId;
+	}
+	
+	public Long getUserId(){
+		return this.userId;
+	}
+			
+	public void setExpectAmount(java.math.BigDecimal expectAmount){
+		this.expectAmount = expectAmount;
+	}
+	
+	public java.math.BigDecimal getExpectAmount(){
+		return this.expectAmount;
+	}
+			
+	public void setActualAmount(java.math.BigDecimal actualAmount){
+		this.actualAmount = actualAmount;
+	}
+	
+	public java.math.BigDecimal getActualAmount(){
+		return this.actualAmount;
+	}
+			
+	public void setPaymentStatus(String paymentStatus){
+		this.paymentStatus = paymentStatus;
+	}
+	
+	public String getPaymentStatus(){
+		return this.paymentStatus;
+	}
+			
+	public void setUserStatus(String userStatus){
+		this.userStatus = userStatus;
+	}
+	
+	public String getUserStatus(){
+		return this.userStatus;
+	}
+			
+	public void setPayTime(java.util.Date payTime){
+		this.payTime = payTime;
+	}
+	
+	public java.util.Date getPayTime(){
+		return this.payTime;
+	}
+			
+	public void setUpdateTime(java.util.Date updateTime){
+		this.updateTime = updateTime;
+	}
+	
+	public java.util.Date getUpdateTime(){
+		return this.updateTime;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupPaymentCalenderDetailService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderDetail;
+import com.ym.mec.common.service.BaseService;
+
+public interface MusicGroupPaymentCalenderDetailService extends BaseService<Long, MusicGroupPaymentCalenderDetail> {
+
+}

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

@@ -1,5 +1,6 @@
 package com.ym.mec.biz.service;
 
+import com.ym.mec.biz.dal.dto.OnlineMusicGroupCourseDto;
 import com.ym.mec.biz.dal.entity.MusicGroup;
 import com.ym.mec.common.page.QueryInfo;
 
@@ -9,7 +10,8 @@ public interface OnlineMusicGroupService {
 
     /**
      * 创建线上乐团班级
+     * @param onlineMusicGroupCourseInfo
      */
-    void createOnlineMusicClassGroup();
+    void createOnlineMusicClassGroup(OnlineMusicGroupCourseDto onlineMusicGroupCourseInfo);
 
 }

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

@@ -48,6 +48,7 @@ import java.util.*;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
+import static com.ym.mec.biz.dal.enums.GroupType.MUSIC;
 import static com.ym.mec.biz.dal.enums.GroupType.PRACTICE;
 import static com.ym.mec.biz.dal.enums.PracticeGroupType.*;
 import static com.ym.mec.biz.dal.enums.SignInStatusEnum.*;
@@ -4217,10 +4218,20 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		if(schedule == null){
 			throw new BizException("课程不存在");
 		}
-		//获取课程列表
-		List<CourseScheduleRateDto> courseScheduleRateDtos = courseScheduleDao.findCourseRate(schedule.getMusicGroupId(),schedule.getGroupType().getCode());
-		//获取最近一次已结束的课程
-		CourseSchedule courseSchedule = courseScheduleDao.getLastEndCourse(schedule.getMusicGroupId(),schedule.getGroupType().getCode());
+		//如果是乐团课
+		List<CourseScheduleRateDto> courseScheduleRateDtos;
+		CourseSchedule courseSchedule;
+		if(schedule.getGroupType() == MUSIC){
+			//获取当前班级
+			courseScheduleRateDtos = courseScheduleDao.findCourseRate(null,schedule.getGroupType().getCode(),schedule.getClassGroupId());
+			//获取最近一次已结束的课程
+			courseSchedule = courseScheduleDao.getLastEndCourse(null,schedule.getGroupType().getCode(),schedule.getClassGroupId());
+		}else {
+			//获取课程列表
+			courseScheduleRateDtos = courseScheduleDao.findCourseRate(schedule.getMusicGroupId(),schedule.getGroupType().getCode(),null);
+			//获取最近一次已结束的课程
+			courseSchedule = courseScheduleDao.getLastEndCourse(schedule.getMusicGroupId(),schedule.getGroupType().getCode(),null);
+		}
 		List<Long> courseScheduleIds = courseScheduleRateDtos.stream().map(CourseScheduleRateDto::getCourseScheduleId).collect(Collectors.toList());
 		List<CourseScheduleReview> courseReviews = courseScheduleReviewDao.findByCourseSchedules(courseScheduleIds);
 		Map<Integer, List<CourseScheduleReview>> reviews = courseReviews.stream().collect(Collectors.groupingBy(CourseScheduleReview::getCourseScheduleId));

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderDetailServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.biz.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderDetailDao;
+import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderDetail;
+import com.ym.mec.biz.service.MusicGroupPaymentCalenderDetailService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+
+@Service
+public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<Long, MusicGroupPaymentCalenderDetail>  implements MusicGroupPaymentCalenderDetailService {
+	
+	@Autowired
+	private MusicGroupPaymentCalenderDetailDao musicGroupPaymentCalenderDetailDao;
+
+	@Override
+	public BaseDAO<Long, MusicGroupPaymentCalenderDetail> getDAO() {
+		return musicGroupPaymentCalenderDetailDao;
+	}
+	
+}

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

@@ -193,10 +193,10 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             musicGroupPaymentEntitiesDao.batchAdd(subFeeSettingDto.getMusicGroupPaymentEntities(), musicGroupId);
         }
         // 保存学员付费周期
-        List<Integer> months = subFeeSettingDto.getMonths();
+        /*List<Integer> months = subFeeSettingDto.getMonths();
         if (months != null && months.size() > 0) {
             musicGroupPaymentCalenderDao.batchAdd(months, musicGroupId);
-        }
+        }*/
 
         //乐团科目学生
         if (subjectRegisters != null && subjectRegisters.size() > 0) {
@@ -1950,12 +1950,12 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             courseScheduleDao.updateCourseScheduleSchool("MUSIC", musicGroupId, musicGroup.getSchoolId());
         }
         updateTeamTeacher(group,musicGroup);
-        List<Integer> months = subFeeSettingDto.getMonths();
+//        List<Integer> months = subFeeSettingDto.getMonths();
 
         Date date = new Date();
 
         //判断缴费日历是否修改
-        boolean isModifiedOfCalender = false;
+        /*boolean isModifiedOfCalender = false;
 
         List<MusicGroupPaymentCalender> calenderList = musicGroupPaymentCalenderDao.findByMusicGroupId(musicGroupId);
         if (months.size() == calenderList.size()) {
@@ -1995,7 +1995,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
                 e.setUpdateTime(date);
             });
             musicGroupStudentFeeDao.batchUpdate(fees);
-        }
+        }*/
         musicGroup.setUpdateTime(date);
         musicGroupDao.update(musicGroup);
         //修改课程里面的教学点

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

@@ -1,16 +1,85 @@
 package com.ym.mec.biz.service.impl;
 
+import com.alibaba.fastjson.JSON;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.dao.MusicGroupDao;
+import com.ym.mec.biz.dal.dao.StudentDao;
+import com.ym.mec.biz.dal.dao.SubjectDao;
+import com.ym.mec.biz.dal.dao.TeacherDao;
+import com.ym.mec.biz.dal.dto.OnlineMusicGroupCourseDto;
 import com.ym.mec.biz.dal.entity.MusicGroup;
+import com.ym.mec.biz.dal.entity.Subject;
+import com.ym.mec.biz.dal.entity.SysConfig;
+import com.ym.mec.biz.dal.entity.Teacher;
 import com.ym.mec.biz.service.OnlineMusicGroupService;
+import com.ym.mec.biz.service.SysConfigService;
+import com.ym.mec.common.exception.BizException;
+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.util.HashSet;
+import java.util.Objects;
+import java.util.Set;
 
-import java.util.List;
 
 @Service
 public class OnlineMusicGroupServiceImpl implements OnlineMusicGroupService {
 
+    @Autowired
+    private MusicGroupDao musicGroupDao;
+    @Autowired
+    private StudentDao studentDao;
+    @Autowired
+    private TeacherDao teacherDao;
+    @Autowired
+    private SubjectDao subjectDao;
+    @Autowired
+    private SysConfigService sysConfigService;
+
+    @Transactional(rollbackFor = Exception.class, isolation = Isolation.DEFAULT)
     @Override
-    public void createOnlineMusicClassGroup() {
+    public void createOnlineMusicClassGroup(OnlineMusicGroupCourseDto onlineMusicGroupCourseInfo) {
+        if(Objects.isNull(onlineMusicGroupCourseInfo.getMusicGroupId())){
+            throw new BizException("请指定乐团");
+        }
+        if(Objects.isNull(onlineMusicGroupCourseInfo.getStudentId())){
+            throw new BizException("请指定学员");
+        }
+        if(Objects.isNull(onlineMusicGroupCourseInfo.getSubjectId())){
+            throw new BizException("请指定学员声部");
+        }
+        if(Objects.isNull(onlineMusicGroupCourseInfo.getTeacherId())){
+            throw new BizException("请指定教师");
+        }
+        if(Objects.isNull(onlineMusicGroupCourseInfo.getFirstCourseTime())){
+            throw new BizException("请指定首次上课时间");
+        }
+        MusicGroup musicGroup = musicGroupDao.get(onlineMusicGroupCourseInfo.getMusicGroupId());
+        if(Objects.isNull(musicGroupDao)){
+            throw new BizException("乐团不存在");
+        }
+        SysUser student = studentDao.lockUserReturnInfo(onlineMusicGroupCourseInfo.getStudentId());
+        if(Objects.isNull(student)){
+            throw new BizException("学员不存在");
+        }
+        Teacher teacher = teacherDao.get(onlineMusicGroupCourseInfo.getTeacherId());
+        if(Objects.isNull(teacher)){
+            throw new BizException("教师不存在");
+        }
+        Subject subject = subjectDao.get(onlineMusicGroupCourseInfo.getSubjectId());
+        if(Objects.isNull(subjectDao)){
+            throw new BizException("声部不存在");
+        }
+        Set<String> holidayDays = new HashSet<>();
 
+        if (onlineMusicGroupCourseInfo.isSkipHoliday()) {
+            SysConfig holidaySetting = sysConfigService.findByParamName(SysConfigService.HOLIDAY_SETTING);
+            if(Objects.nonNull(holidaySetting)&& StringUtils.isNotBlank(holidaySetting.getParanValue())){
+                holidayDays = new HashSet<>(JSON.parseArray(holidaySetting.getParanValue(), String.class));
+            }
+        }
     }
 }

+ 7 - 2
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -2831,8 +2831,13 @@
                cs.status_
         FROM course_schedule cs
                  LEFT JOIN course_schedule_evaluate cse ON cs.id_ = cse.course_schedule_id_
-        WHERE cs.music_group_id_ = #{groupId}
-          AND cs.group_type_ = #{groupType}
+        WHERE cs.group_type_ = #{groupType}
+        <if test="groupId != null">
+            AND cs.music_group_id_ = #{groupId}
+        </if>
+        <if test="classGroupId != null">
+            AND cs.class_group_id_ = #{classGroupId}
+        </if>
         GROUP BY cs.id_
         ORDER BY cs.class_date_, cs.start_class_time_ ASC
     </select>

+ 96 - 0
mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentCalenderDetailMapper.xml

@@ -0,0 +1,96 @@
+<?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">
+<!-- 这个文件是自动生成的。 不要修改此文件。所有改动将在下次重新自动生成时丢失。 -->
+<mapper namespace="com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderDetailDao">
+
+	<resultMap type="com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderDetail"
+		id="MusicGroupPaymentCalenderDetail">
+		<result column="id_" property="id" />
+		<result column="music_group_payment_calender_id_" property="musicGroupPaymentCalenderId" />
+		<result column="user_id_" property="userId" />
+		<result column="expect_amount_" property="expectAmount" />
+		<result column="actual_amount_" property="actualAmount" />
+		<result column="payment_status_" property="paymentStatus" />
+		<result column="user_status_" property="userStatus" />
+		<result column="pay_time_" property="payTime" />
+		<result column="update_time_" property="updateTime" />
+		<result column="create_time_" property="createTime" />
+	</resultMap>
+
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="MusicGroupPaymentCalenderDetail">
+		SELECT * FROM music_group_payment_calender_detail WHERE id_ = #{id}
+	</select>
+
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="MusicGroupPaymentCalenderDetail">
+		SELECT * FROM music_group_payment_calender_detail ORDER BY id_
+	</select>
+
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert"
+		parameterType="com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderDetail"
+		useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
+			AS ID FROM DUAL </selectKey> -->
+		INSERT INTO music_group_payment_calender_detail
+		(id_,music_group_payment_calender_id_,user_id_,expect_amount_,actual_amount_,payment_status_,user_status_,pay_time_,update_time_,create_time_)
+		VALUES(#{id},#{musicGroupPaymentCalenderId},#{userId},#{expectAmount},#{actualAmount},#{paymentStatus},#{userStatus},#{payTime},#{updateTime},#{createTime})
+	</insert>
+
+	<!-- 根据主键查询一条记录 -->
+	<update id="update"
+		parameterType="com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderDetail">
+		UPDATE music_group_payment_calender_detail
+		<set>
+			<if test="userId != null">
+				user_id_ = #{userId},
+			</if>
+			<if test="userStatus != null">
+				user_status_ = #{userStatus},
+			</if>
+			<if test="paymentStatus != null">
+				payment_status_ = #{paymentStatus},
+			</if>
+			<if test="id != null">
+				id_ = #{id},
+			</if>
+			<if test="expectAmount != null">
+				expect_amount_ = #{expectAmount},
+			</if>
+			<if test="updateTime != null">
+				update_time_ = #{updateTime},
+			</if>
+			<if test="musicGroupPaymentCalenderId != null">
+				music_group_payment_calender_id_ = #{musicGroupPaymentCalenderId},
+			</if>
+			<if test="actualAmount != null">
+				actual_amount_ = #{actualAmount},
+			</if>
+			<if test="payTime != null">
+				pay_time_ = #{payTime},
+			</if>
+			<if test="createTime != null">
+				create_time_ = #{createTime},
+			</if>
+		</set>
+		WHERE id_ = #{id}
+	</update>
+
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete">
+		DELETE FROM music_group_payment_calender_detail WHERE id_ = #{id}
+	</delete>
+
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="MusicGroupPaymentCalenderDetail"
+		parameterType="map">
+		SELECT * FROM music_group_payment_calender_detail ORDER BY id_
+		<include refid="global.limit" />
+	</select>
+
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM music_group_payment_calender_detail
+	</select>
+</mapper>

+ 6 - 0
mec-biz/src/main/resources/config/mybatis/StudentMapper.xml

@@ -37,6 +37,12 @@
         UPDATE
     </select>
 
+    <select id="lockUserReturnInfo" resultMap="com.ym.mec.biz.dal.dao.TeacherDao.SysUser">
+        SELECT *
+        FROM sys_user
+        WHERE id_ = #{userId} FOR UPDATE
+    </select>
+
     <!-- 向数据库增加一条记录 -->
     <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.Student" useGeneratedKeys="true" keyColumn="id"
             keyProperty="id">