diff --git a/Dao/MyBatis/Maps/CRoom.xml b/Dao/MyBatis/Maps/CRoom.xml index e702b32..9d0a60c 100644 --- a/Dao/MyBatis/Maps/CRoom.xml +++ b/Dao/MyBatis/Maps/CRoom.xml @@ -196,7 +196,8 @@ from lectinning a where a.lectno=#lectno# - and (a.istatus=2 and a.finishtime is not null and date_format(a.finishtime, '%y%m%d')=date_format(now(), '%y%m%d')) + and (a.istatus=2 and a.finishtime is not null and date_format(a.finishtime, '%y%m%d')=date_format(now(), '%y%m%d')) + update lectinning a diff --git a/FO/Controllers/CDMSController.cs b/FO/Controllers/CDMSController.cs index 35b1356..f31d2e2 100644 --- a/FO/Controllers/CDMSController.cs +++ b/FO/Controllers/CDMSController.cs @@ -83,9 +83,11 @@ namespace NP.FO.Controllers //출석 인증 시만 보이게 제한 처리 (intval 회차, intval2 출석인증제외 회원, intval3 출석인증제외 강좌) if (data != null && (data.intval == 1 || data.intval2 == 1 || data.intval3 == 1)) { - var todayLectinningCount = Dao.Get("cr.lectinnings", new System.Collections.Hashtable() { { "lectno", vm.lectno }, { "isfinishtoday", 1 } }).Count(); + var lectInnings = Dao.Get("cr.lectinnings", new System.Collections.Hashtable() { { "lectno", vm.lectno }, { "isfinishtoday", 1 } }); + var todayLectinningCount = lectInnings.Count(); + var istatus = lectInnings.Where(w => w.cmino == vm.cmino && w.istatus == 2).FirstOrDefault() != null ? 2 : 0; //1일 신규 동영상 강의를 8차시로 제한 - if (todayLectinningCount < 8) + if (todayLectinningCount < 8 || istatus == 2) { //이어보기를 위해 페이지관리 //vm.pseq = vm.pseq < 1 ? 1 : vm.pseq;