瀏覽代碼

Merge remote-tracking branch 'origin/master'

周箭河 5 年之前
父節點
當前提交
5955102e95

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

@@ -21,4 +21,10 @@ public interface TeacherDefaultVipGroupSalaryDao extends BaseDAO<Long, TeacherDe
      * @param userId
      */
     void delByTeacherId(Integer userId);
+
+    /**
+     * 批量新增
+     * @param teacherDefaultVipGroupSalaries
+     */
+    void batchAdd(@Param("vipGroupSalaries") List<TeacherDefaultVipGroupSalary> teacherDefaultVipGroupSalaries);
 }

+ 0 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherAttendanceServiceImpl.java

@@ -47,13 +47,9 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 	@Autowired
 	private SysUserFeignService sysUserFeignService;
 	@Autowired
-	private ClassGroupDao classGroupDao;
-	@Autowired
 	private CourseScheduleService courseScheduleService;
-	
 	@Autowired
 	private SysConfigService sysConfigService;
-	
 	@Autowired
 	private SysMessageService sysMessageService;
 

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

@@ -35,9 +35,7 @@ public class TeacherDefaultVipGroupSalaryServiceImpl extends BaseServiceImpl<Lon
 			TeacherDefaultVipGroupSalary salary = teacherDefaultVipGroupSalaries.get(0);
 			teacherDefaultVipGroupSalaryDao.delByTeacherId(salary.getUserId());
 			//新增
-			teacherDefaultVipGroupSalaries.forEach(e->{
-				teacherDefaultVipGroupSalaryDao.insert(e);
-			});
+			teacherDefaultVipGroupSalaryDao.batchAdd(teacherDefaultVipGroupSalaries);
 		}
 	}
 }

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

@@ -18,7 +18,6 @@ import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.im.ImFeignService;
 import com.ym.mec.util.collection.MapUtil;
-
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -38,8 +37,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 	@Autowired
 	private ClassGroupDao classGroupDao;
 	@Autowired
-	private ClassGroupService classGroupService;
-	@Autowired
 	private VipGroupClassGroupMapperDao vipGroupClassGroupMapperDao;
 	@Autowired
 	private ClassGroupTeacherMapperDao classGroupTeacherMapperDao;
@@ -63,15 +60,12 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
     private StudentVipGroupPaymentDao studentVipGroupPaymentDao;
     @Autowired
 	private StudentApplyRefundsDao studentApplyRefundsDao;
-	
 	@Autowired
 	private SysUserCashAccountService sysUserCashAccountService;
-
     @Autowired
 	private SysUserCashAccountDetailDao sysUserCashAccountDetailDao;
     @Autowired
 	private ClassGroupTeacherSalaryDao classGroupTeacherSalaryDao;
-
     @Autowired
 	private CourseScheduleTeacherSalaryDao courseScheduleTeacherSalaryDao;
     @Autowired
@@ -86,14 +80,12 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 	private PayService payService;
 	@Autowired
 	private ClassGroupStudentMapperDao classGroupStudentMapperDao;
-
 	@Autowired
 	private CourseScheduleRewardsRulesService courseScheduleRewardsRulesService;
 	@Autowired
 	private SysConfigService sysConfigService;
-
+	@Autowired
 	private SysUserCashAccountDetailService sysUserCashAccountDetailService;
-
 	@Override
 	public BaseDAO<Long, VipGroup> getDAO() {
 		return vipGroupDao;

+ 7 - 0
mec-biz/src/main/resources/config/mybatis/TeacherDefaultVipGroupSalaryMapper.xml

@@ -34,6 +34,13 @@
         (user_id_,vip_group_category_id_,online_classes_salary_,offline_classes_salary_,create_time_,update_time_)
         VALUES(#{userId},#{vipGroupCategoryId},#{onlineClassesSalary},#{offlineClassesSalary},now(),now())
     </insert>
+    <insert id="batchAdd">
+        INSERT INTO teacher_default_vip_group_salary
+        (user_id_,vip_group_category_id_,online_classes_salary_,offline_classes_salary_,create_time_,update_time_)VALUES
+        <foreach collection="vipGroupSalaries" item="item" separator=",">
+            (#{item.userId},#{item.vipGroupCategoryId},#{item.onlineClassesSalary},#{item.offlineClassesSalary},now(),now())
+        </foreach>
+    </insert>
 
     <!-- 根据主键查询一条记录 -->
     <update id="update" parameterType="com.ym.mec.biz.dal.entity.TeacherDefaultVipGroupSalary">