todaylectinninglimit -> daylectinninglimit 네이밍 변경
This commit is contained in:
parent
e61d7043c1
commit
b64c5dc0b4
|
|
@ -250,7 +250,7 @@
|
|||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
||||
<label class="col-sm-4 col-md-2 control-label">일일 학습 회차 제한</label>
|
||||
<div class="col-sm-8 col-md-10">
|
||||
@Html.TextBoxFor(m => m.CM.todaylectinninglimit, new { @class = "form-control disp-init int text-right", @style = "width: 100px;", @maxlength = "5", @placeholder = "" })
|
||||
@Html.TextBoxFor(m => m.CM.daylectinninglimit, new { @class = "form-control disp-init int text-right", @style = "width: 100px;", @maxlength = "5", @placeholder = "" })
|
||||
회차 <span style="color:red;">※ 0이면 무제한</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@ create table cm (
|
|||
,isdel tinyint not null
|
||||
,studydays int
|
||||
,isaccommodation TINYINT(4) NOT NULL DEFAULT '0',
|
||||
,todaylectinninglimit INT(11) NULL DEFAULT NULL,
|
||||
,daylectinninglimit INT(11) NULL DEFAULT NULL,
|
||||
,cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL
|
||||
,primary key(cmno));
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@
|
|||
,d.cname pcname
|
||||
,e.ccode,e.cname studyplacename
|
||||
,(select count(l.lectno) cnt from lect l where l.cmno = a.cmno and l.status =1 and l.ischanged=0) lectcnt
|
||||
,a.ischkatt,a.todaylectinninglimit
|
||||
,a.ischkatt,a.daylectinninglimit
|
||||
,case when date_format(a.retime,'%Y%m%d') = '20991231' then 1 else 0 end isalldays
|
||||
,a.cdt,a.udt
|
||||
,a.cmno value,a.cname text
|
||||
|
|
@ -173,7 +173,7 @@
|
|||
order by a.rno
|
||||
</select>
|
||||
<select id="cm.cm" parameterClass="hashtable" resultClass="cm">
|
||||
select a.cmno,a.cshape,a.cname,a.classno,a.rstime,a.retime,a.sstime,a.setime,a.certcc,a.cgno,a.quota,a.studydays,a.isaccommodation,a.todaylectinninglimit
|
||||
select a.cmno,a.cshape,a.cname,a.classno,a.rstime,a.retime,a.sstime,a.setime,a.certcc,a.cgno,a.quota,a.studydays,a.isaccommodation,a.daylectinninglimit
|
||||
,b.tyear,b.tseq,a.isrefund
|
||||
,a3.cgcode pcgcode
|
||||
,e.countlect,e.countstandby
|
||||
|
|
@ -239,11 +239,11 @@
|
|||
insert into cm(ismaster,cgno,pcmno,cname,kname,tmno,classno,rstime,retime,sstime,setime,gstime,getime,cshape
|
||||
,infee,outfee,accommofee,quota
|
||||
,introhtml,targethtml,goalhtml,contenthtml,studyplace,studytime
|
||||
,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,isuse,isdel,isseq,fgnocm,typeman,typeedu,typegrade,typejob,iscertificate,ischkatt,isaccommodation,todaylectinninglimit,<include refid="sql.inc"></include>)
|
||||
,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,isuse,isdel,isseq,fgnocm,typeman,typeedu,typegrade,typejob,iscertificate,ischkatt,isaccommodation,daylectinninglimit,<include refid="sql.inc"></include>)
|
||||
values (#ismaster#,#cgno#,#pcmno#,#cname#,#kname#,#tmno#,#classno#,#rstime#,#retime#,#sstime#,#setime#,#gstime#,#getime#,#cshape#
|
||||
,#infee#,#outfee#,#accommofee#,#quota#
|
||||
,#introhtml#,#targethtml#,#goalhtml#,#contenthtml#
|
||||
,#studyplace#,#studytime#,#certcc#,#certgradecc#,#jobcc#,#jobpositiongrade#,#difficulty#,#isrefund#,#isuse#,0,#isseq#,#fgnocm#,#typeman#,#typeedu#,#typegrade#,#typejob#,#iscertificate#,#ischkatt#,#isaccommodation#,#todaylectinninglimit#,<include refid="sql.inv"></include>);
|
||||
,#studyplace#,#studytime#,#certcc#,#certgradecc#,#jobcc#,#jobpositiongrade#,#difficulty#,#isrefund#,#isuse#,0,#isseq#,#fgnocm#,#typeman#,#typeedu#,#typegrade#,#typejob#,#iscertificate#,#ischkatt#,#isaccommodation#,#daylectinninglimit#,<include refid="sql.inv"></include>);
|
||||
<selectKey type="post" property="cmno" resultClass="int">SELECT LAST_INSERT_ID()</selectKey>
|
||||
</insert>
|
||||
<update id="cm.cmup" parameterClass="hashtable">
|
||||
|
|
@ -285,7 +285,7 @@
|
|||
,ischkatt =#ischkatt#
|
||||
,studydays =#studydays#
|
||||
,isaccommodation =#isaccommodation#
|
||||
,todaylectinninglimit =#todaylectinninglimit#
|
||||
,daylectinninglimit =#daylectinninglimit#
|
||||
where cmno=#cmno#
|
||||
</update>
|
||||
<update id="cm.data.delete" parameterClass="hashtable">
|
||||
|
|
@ -1288,7 +1288,7 @@
|
|||
</select>
|
||||
<insert id="cm.cmcopy0" parameterClass="cm">
|
||||
insert into cm(ismaster,cgno,pcmno,cname,kname,tmno,classno,rstime,retime,sstime,setime,gstime,getime,cshape,typeman,typeedu,typegrade,typejob,infee,outfee,accommofee,quota,introhtml,targethtml,goalhtml,contenthtml,studyplace,studytime
|
||||
,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,isuse,isseq,iscertificate,isdel,studydays,isaccommodation,todaylectinninglimit,<include refid="sql.inc"></include>)
|
||||
,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,isuse,isseq,iscertificate,isdel,studydays,isaccommodation,daylectinninglimit,<include refid="sql.inc"></include>)
|
||||
select #ismaster#,cgno,case when a.ismaster = 1 and #ismaster# = 0 then a.cmno else a.pcmno end,ifnull(#cname#, concat('사본_', cname)),a.kname,#tmno#
|
||||
,case when #tmno# is null then null else ifnull(b.classno,0)+1 end
|
||||
,t.rstime
|
||||
|
|
@ -1298,7 +1298,7 @@
|
|||
,case when date_format(a.retime,'%Y-%m-%d')='2099-12-31' then null else t.gstime end
|
||||
,case when date_format(a.retime,'%Y-%m-%d')='2099-12-31' then null else date_format(t.getime,'%Y-%m-%d 23:59:59') end
|
||||
,a.cshape,a.typeman,a.typeedu,a.typegrade,a.typejob,infee,outfee,accommofee,quota,introhtml,targethtml,goalhtml,contenthtml,studyplace,studytime
|
||||
,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,1,isseq,a.iscertificate,0,studydays,isaccommodation,todaylectinninglimit,<include refid="sql.inv"></include>
|
||||
,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,1,isseq,a.iscertificate,0,studydays,isaccommodation,daylectinninglimit,<include refid="sql.inv"></include>
|
||||
from cm a
|
||||
left outer join (
|
||||
select max(b.classno) classno
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@
|
|||
</select>
|
||||
<select id="cr.cminnings" parameterClass="hashtable" resultClass="lectinning">
|
||||
select a.lectno,a.cmno,a.isrebate
|
||||
,a2.isseq,a2.cshape,a2.todaylectinninglimit
|
||||
,a2.isseq,a2.cshape,a2.daylectinninglimit
|
||||
,case when a.sdate is null then a2.sstime else a.sdate end as sdate
|
||||
,case when a.edate is null then a2.setime else a.edate end as edate
|
||||
,b.cmino,b.iseq,b.isonline,b.ititle,b.sttime,b.idate,b.ist,b.iet,b.icontent
|
||||
|
|
|
|||
|
|
@ -88,12 +88,12 @@ namespace NP.FO.Controllers
|
|||
var lectInnings = Dao.Get<LectInning>("cr.cminnings", new Hashtable() { { "lectno", vm.lectno }, { "userno", SUserInfo.UserNo } });
|
||||
foreach (var item in lectInnings)
|
||||
{
|
||||
item.todaylectinninglimit = item.todaylectinninglimit == 0 ? 9999 : item.todaylectinninglimit;
|
||||
item.daylectinninglimit = item.daylectinninglimit == 0 ? 9999 : item.daylectinninglimit;
|
||||
}
|
||||
var lectInning = lectInnings.Where(w => w.cmino == vm.cmino).FirstOrDefault();
|
||||
|
||||
//1일 신규 동영상 강의를 10차시로 제한
|
||||
if (todayLectinningCount < lectInning.todaylectinninglimit || lectInning.istatus == 2)
|
||||
if (todayLectinningCount < lectInning.daylectinninglimit || lectInning.istatus == 2)
|
||||
{
|
||||
//이어보기를 위해 페이지관리
|
||||
//vm.pseq = vm.pseq < 1 ? 1 : vm.pseq;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace NP.FO.Controllers
|
|||
vm.LectInnings = Dao.Get<LectInning>("cr.cminnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno },{ "userno",SUserInfo.UserNo}, { "notstudy" + (Request.IsLocal ? "x" : ""), 1 },{ "limit", 6} });
|
||||
foreach (var lectInning in vm.LectInnings)
|
||||
{
|
||||
lectInning.todaylectinninglimit = lectInning.todaylectinninglimit == 0 ? 9999 : lectInning.todaylectinninglimit;
|
||||
lectInning.daylectinninglimit = lectInning.daylectinninglimit == 0 ? 9999 : lectInning.daylectinninglimit;
|
||||
}
|
||||
if (vm.LectInnings.Count() > 0 && !string.IsNullOrEmpty(vm.LectInnings.FirstOrDefault().existslectinning) )
|
||||
{
|
||||
|
|
@ -60,7 +60,7 @@ namespace NP.FO.Controllers
|
|||
vm.LectInnings = Dao.Get<LectInning>("cr.cminnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno }, { "userno", SUserInfo.UserNo } });
|
||||
foreach (var lectInning in vm.LectInnings)
|
||||
{
|
||||
lectInning.todaylectinninglimit = lectInning.todaylectinninglimit == 0 ? 9999 : lectInning.todaylectinninglimit;
|
||||
lectInning.daylectinninglimit = lectInning.daylectinninglimit == 0 ? 9999 : lectInning.daylectinninglimit;
|
||||
}
|
||||
ViewBag.Mobile = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault().mobile;
|
||||
if (!string.IsNullOrEmpty(vm.LectInnings.FirstOrDefault().existslectinning) && vm.LectInnings.Count() > 0)
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@
|
|||
@if (d.isonline == 1)
|
||||
{
|
||||
//학습기간 종료후에도 시청은 가능하고, 출석인정은 되지않도록 변경 2021-01-25
|
||||
<a href="#" onclick="playerOpen(@d.cmino, @(d.sdate < DateTime.Now && d.edate.AddYears(1) > DateTime.Now ? 1 : 0), @(d.isseq == 1 &&d.iseq != 1 && d.preistatus < 2 ? 0 : 1), @(d.istatus != 2 && Model.intval >= d.todaylectinninglimit ? 0 : 1), @(d.todaylectinninglimit));" class="lctcStdy">학습하기</a>
|
||||
<a href="#" onclick="playerOpen(@d.cmino, @(d.sdate < DateTime.Now && d.edate.AddYears(1) > DateTime.Now ? 1 : 0), @(d.isseq == 1 &&d.iseq != 1 && d.preistatus < 2 ? 0 : 1), @(d.istatus != 2 && Model.intval >= d.daylectinninglimit ? 0 : 1), @(d.daylectinninglimit));" class="lctcStdy">학습하기</a>
|
||||
}
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -173,13 +173,13 @@
|
|||
$(document).ready(function () {
|
||||
|
||||
});
|
||||
function playerOpen(cmino, timeflag, preflag, notoverflag, todaylectinninglimit) {
|
||||
function playerOpen(cmino, timeflag, preflag, notoverflag, daylectinninglimit) {
|
||||
if (timeflag < 1) {
|
||||
msg("학습기간이 아닙니다.");
|
||||
} else if (preflag < 1) {
|
||||
msg("이전 회차 학습을 완료한 이후 학습이 가능합니다.");
|
||||
} else if (notoverflag < 1) {
|
||||
msg("일일 최대 학습회차는 "+ todaylectinninglimit +"차시입니다.");
|
||||
msg("일일 최대 학습회차는 "+ daylectinninglimit +"차시입니다.");
|
||||
} else {
|
||||
_cmino = cmino;
|
||||
chkcontent();
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
@if (d.isonline == 1)
|
||||
{
|
||||
//학습기간 종료후에도 시청은 가능하고, 출석인정은 되지않도록 변경 2021-01-25
|
||||
<a href="#" onclick="playerOpen(@d.cmino, @(d.sdate < DateTime.Now && d.edate.AddYears(1) > DateTime.Now ? 1 : 0), @(d.isseq == 1 && d.iseq != 1 && d.preistatus < 2 ? 0 : 1), @(d.istatus != 2 && Model.intval >= d.todaylectinninglimit ? 0 : 1), @(d.todaylectinninglimit));" class="lctcStdy">학습하기</a>
|
||||
<a href="#" onclick="playerOpen(@d.cmino, @(d.sdate < DateTime.Now && d.edate.AddYears(1) > DateTime.Now ? 1 : 0), @(d.isseq == 1 && d.iseq != 1 && d.preistatus < 2 ? 0 : 1), @(d.istatus != 2 && Model.intval >= d.daylectinninglimit ? 0 : 1), @(d.daylectinninglimit));" class="lctcStdy">학습하기</a>
|
||||
}
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -163,13 +163,13 @@
|
|||
});
|
||||
$('.datepicker').datepicker({ dateFormat: 'yy-mm-dd' });
|
||||
});
|
||||
function playerOpen(cmino, timeflag, preflag, notoverflag, todaylectinninglimit) {
|
||||
function playerOpen(cmino, timeflag, preflag, notoverflag, daylectinninglimit) {
|
||||
if (timeflag < 1) {
|
||||
msg("학습기간이 아닙니다.");
|
||||
} else if (preflag < 1) {
|
||||
msg("이전 회차 학습을 완료한 이후 학습이 가능합니다.");
|
||||
} else if (notoverflag < 1) {
|
||||
msg("일일 최대 학습회차는 "+ todaylectinninglimit +"차시입니다.");
|
||||
msg("일일 최대 학습회차는 "+ daylectinninglimit +"차시입니다.");
|
||||
} else {
|
||||
_cmino = cmino;
|
||||
chkcontent();
|
||||
|
|
|
|||
|
|
@ -492,7 +492,7 @@ namespace NP.Model
|
|||
/// <summary>
|
||||
/// 일일 학습 회차 제한(0:무제한)
|
||||
/// </summary>
|
||||
public int todaylectinninglimit { get; set; }
|
||||
public int daylectinninglimit { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
|
@ -2974,7 +2974,7 @@ namespace NP.Model
|
|||
/// <summary>
|
||||
/// 일일 학습 회차 제한(0:무제한)
|
||||
/// </summary>
|
||||
public int todaylectinninglimit { get; set; }
|
||||
public int daylectinninglimit { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
|
|
|||
Loading…
Reference in New Issue