zouxuan il y a 5 ans
Parent
commit
1130039ec7

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

@@ -94,5 +94,5 @@ public interface MusicGroupPaymentCalenderDao extends BaseDAO<Long, MusicGroupPa
      */
     MusicGroupPaymentCalender getLastStartOne(@Param("musicGroupId") String musicGroupId);
 
-    int queryIntersectionByDate(@Param("musicGroupId") String musicGroupId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
+    int queryIntersectionByDate(@Param("musicGroupId") String musicGroupId, @Param("startTime") String startTime, @Param("endTime") String endTime);
 }

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

@@ -352,7 +352,9 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 		Date date = new Date();
 		// 判断缴费开始时间、结束时间是否被其他缴费记录占用
 //		int count = musicGroupPaymentCalenderDao.queryIntersectionByPaymentDate(calender.getMusicGroupId(), startTime,endTime);
-		int count = musicGroupPaymentCalenderDao.queryIntersectionByDate(calender.getMusicGroupId(), startTime,endTime);
+		String format = DateUtil.format(startTime, DateUtil.DEFAULT_PATTERN);
+		String format1 = DateUtil.format(endTime, DateUtil.DEFAULT_PATTERN);
+		int count = musicGroupPaymentCalenderDao.queryIntersectionByDate(calender.getMusicGroupId(), format,format1);
 		if (count > 0) {
 			throw new BizException("缴费时间存在冲突,请修改缴费开始日期");
 		}