Преглед изворни кода

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

zouxuan пре 5 година
родитељ
комит
6f7f9e908a

+ 0 - 6
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupSubjectPlanDao.java

@@ -35,12 +35,6 @@ public interface MusicGroupSubjectPlanDao extends BaseDAO<Integer, MusicGroupSub
     void batchAdd( @Param("subjectPlans") List<MusicGroupSubjectPlan> musicGroupSubjectPlans,@Param("musicGroupId") String musicGroupId);
 
     /**
-     * 报名学员数量修改
-     * @param musicOneSubjectClassPlan
-     */
-    void updateApplyStudentNum(MusicGroupSubjectPlan musicOneSubjectClassPlan);
-
-    /**
      * 删除乐团声部规划
      * @param musicGroupId
      * @return

+ 4 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysUserTsign.java

@@ -20,6 +20,10 @@ public class SysUserTsign {
 
 	/**  */
 	private java.util.Date createTime = new Date();
+	
+	public SysUserTsign() {
+		// TODO Auto-generated constructor stub
+	}
 
 	public SysUserTsign(Integer userId, String accountId, String sealData) {
 		this.userId = userId;

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

@@ -649,6 +649,11 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         //删除学员班级关联关系
         classGroupStudentMapperDao.deleteByClassId(classGroupId);
         studentRegistrationDao.deleteClassGroup(classGroupId);
+        //删除班级跟合奏班关系
+        ClassGroupRelation classGroupRelation = classGroupRelationDao.findClassGroupRelation(classGroupId);
+        if(classGroupRelation != null){
+            classGroupRelationDao.delete(classGroupRelation.getId());
+        }
         //删除班级
         classGroupDao.delete(classGroupId);
     }

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

@@ -87,7 +87,7 @@ public class MusicGroupSubjectPlanServiceImpl extends BaseServiceImpl<Integer, M
             }
         });
         //获取声部(科目)下其他商品
-        List<Goods> otherGoods = goodsService.findTypeGoods( "OTHER");
+        List<Goods> otherGoods = goodsService.findTypeGoods("OTHER");
 
         MusicGroupSubjectGoodsAndInfoDto musicGroupSubjectGoodsAndInfo = new MusicGroupSubjectGoodsAndInfoDto();
         musicGroupSubjectGoodsAndInfo.setMusicGroupSubjectPlan(musicOneSubjectClassPlan);
@@ -112,13 +112,12 @@ public class MusicGroupSubjectPlanServiceImpl extends BaseServiceImpl<Integer, M
     }
 
     @Override
-    @Transactional(rollbackFor = Exception.class)
     public void addApplyStudentNum(String musicGroupId, Integer subjectId, int num) {
         MusicGroupSubjectPlan musicOneSubjectClassPlan = musicGroupSubjectPlanDao.getMusicOneSubjectClassPlan(musicGroupId, subjectId);
         int applyNum = musicOneSubjectClassPlan.getApplyStudentNum() == null ? 0 : musicOneSubjectClassPlan.getApplyStudentNum();
         musicOneSubjectClassPlan.setApplyStudentNum(applyNum + num);
         musicOneSubjectClassPlan.setUpdateTime(new Date());
-        musicGroupSubjectPlanDao.updateApplyStudentNum(musicOneSubjectClassPlan);
+        musicGroupSubjectPlanDao.update(musicOneSubjectClassPlan);
     }
 
     @Override

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

@@ -197,7 +197,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
         studentRegistration.setUserId(sysUser.getId());
         studentRegistrationDao.insert(studentRegistration);
         //增加报名学生数
-//        musicGroupSubjectPlanService.addApplyStudentNum(studentRegistration.getMusicGroupId(), studentRegistration.getSubjectId(),1);
+        musicGroupSubjectPlanService.addApplyStudentNum(studentRegistration.getMusicGroupId(), studentRegistration.getSubjectId(),1);
         //报名成功后,发送短信
         String studentApplyUrl = sysConfigDao.findConfigValue(SysConfigService.STUDENT_APPLY_URL) + studentRegistration.getMusicGroupId();
         String serverPhone = sysConfigDao.findConfigValue(SysConfigService.SERVER_PHONE);

+ 8 - 20
mec-biz/src/main/resources/config/mybatis/MusicGroupSubjectPlanMapper.xml

@@ -56,9 +56,15 @@
     <update id="update" parameterType="com.ym.mec.biz.dal.entity.MusicGroupSubjectPlan">
         UPDATE music_group_subject_plan
         <set>
+            <if test="musicGroupId != null">
+                music_group_id_ = #{musicGroupId},
+            </if>
             <if test="subjectId != null">
                 subject_id_ = #{subjectId},
             </if>
+            <if test="expectedStudentNum != null">
+                expected_student_num_ = #{expectedStudentNum},
+            </if>
             <if test="applyStudentNum != null">
                 apply_student_num_ = #{applyStudentNum},
             </if>
@@ -69,29 +75,11 @@
                 kit_group_purchase_type_ =
                 #{kitGroupPurchaseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
             </if>
-            <if test="updateTime != null">
-                update_time_ = NOW(),
-            </if>
             <if test="depositFee != null">
                 deposit_fee_ = #{depositFee},
             </if>
-            <if test="expectedStudentNum != null">
-                expected_student_num_ = #{expectedStudentNum},
-            </if>
-            <if test="musicGroupId != null">
-                music_group_id_ = #{musicGroupId},
-            </if>
-            <if test="version != null">
-                version = version+1,
-            </if>
-        </set>
-        WHERE id_ = #{id} AND version =#{version}
-    </update>
-    <update id="updateApplyStudentNum">
-        UPDATE music_group_subject_plan
-        <set>
-            <if test="applyStudentNum != null">
-                apply_student_num_ = #{applyStudentNum},
+            <if test="paidStudentNum != null">
+                paid_student_num_ = #{paidStudentNum},
             </if>
             <if test="updateTime != null">
                 update_time_ = NOW(),