This commit is contained in:
parent
02bc657c61
commit
2c538d9352
|
|
@ -247,13 +247,13 @@
|
||||||
<label class="col-sm-4 col-md-2 control-label">공개여부</label>
|
<label class="col-sm-4 col-md-2 control-label">공개여부</label>
|
||||||
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:공개;0:비공개" }, { "checked", Model.CM.isuse }, { "name", "CM.isuse" } })</div>
|
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:공개;0:비공개" }, { "checked", Model.CM.isuse }, { "name", "CM.isuse" } })</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
@*<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>
|
<label class="col-sm-4 col-md-2 control-label">일일 학습 회차 제한</label>
|
||||||
<div class="col-sm-8 col-md-10">
|
<div class="col-sm-8 col-md-10">
|
||||||
@Html.TextBoxFor(m => m.CM.daylectinninglimit, 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>
|
회차 <span style="color:red;">※ 0이면 무제한</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>*@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@Html.HiddenFor(m => m.intval)
|
@Html.HiddenFor(m => m.intval)
|
||||||
|
|
|
||||||
|
|
@ -372,8 +372,8 @@ namespace NP.Base.Controllers
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var intval = Dao.Get<LectInning>("cr.lectinnings", new System.Collections.Hashtable() { { "lectno", lectno }, { "isfinishtoday", 1 } }).Count();
|
var intval = Dao.Get<LectInning>("cr.lectinnings", new System.Collections.Hashtable() { /*{ "lectno", lectno }*/ { "userno",SUserInfo.UserNo}, { "isfinishtoday", 1 } }).Count();
|
||||||
if (intval > 7 && cmi.istatus < 2)
|
if (intval > Convert.ToInt32((GetConfig("inninglimit") ?? "10")) && cmi.istatus < 2)
|
||||||
{
|
{
|
||||||
return JsonBack(new JsonRtn() { code = 1000, obj = -3 });
|
return JsonBack(new JsonRtn() { code = 1000, obj = -3 });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,7 @@
|
||||||
values (#ismaster#,#cgno#,#pcmno#,#cname#,#kname#,#tmno#,#classno#,#rstime#,#retime#,#sstime#,#setime#,#gstime#,#getime#,#cshape#
|
values (#ismaster#,#cgno#,#pcmno#,#cname#,#kname#,#tmno#,#classno#,#rstime#,#retime#,#sstime#,#setime#,#gstime#,#getime#,#cshape#
|
||||||
,#infee#,#outfee#,#accommofee#,#quota#
|
,#infee#,#outfee#,#accommofee#,#quota#
|
||||||
,#introhtml#,#targethtml#,#goalhtml#,#contenthtml#
|
,#introhtml#,#targethtml#,#goalhtml#,#contenthtml#
|
||||||
,#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>);
|
,#studyplace#,#studytime#,#certcc#,#certgradecc#,#jobcc#,#jobpositiongrade#,#difficulty#,#isrefund#,#isuse#,0,#isseq#,#fgnocm#,#typeman#,#typeedu#,#typegrade#,#typejob#,#iscertificate#,#ischkatt#,#isaccommodation#,10,<include refid="sql.inv"></include>);
|
||||||
<selectKey type="post" property="cmno" resultClass="int">SELECT LAST_INSERT_ID()</selectKey>
|
<selectKey type="post" property="cmno" resultClass="int">SELECT LAST_INSERT_ID()</selectKey>
|
||||||
</insert>
|
</insert>
|
||||||
<update id="cm.cmup" parameterClass="hashtable">
|
<update id="cm.cmup" parameterClass="hashtable">
|
||||||
|
|
@ -285,7 +285,7 @@
|
||||||
,ischkatt =#ischkatt#
|
,ischkatt =#ischkatt#
|
||||||
,studydays =#studydays#
|
,studydays =#studydays#
|
||||||
,isaccommodation =#isaccommodation#
|
,isaccommodation =#isaccommodation#
|
||||||
,daylectinninglimit =#daylectinninglimit#
|
<!--,daylectinninglimit =#daylectinninglimit#-->
|
||||||
where cmno=#cmno#
|
where cmno=#cmno#
|
||||||
</update>
|
</update>
|
||||||
<update id="cm.data.delete" parameterClass="hashtable">
|
<update id="cm.data.delete" parameterClass="hashtable">
|
||||||
|
|
|
||||||
|
|
@ -195,10 +195,12 @@
|
||||||
<select id="cr.lectinnings" parameterClass="hashtable" resultClass="lectinning">
|
<select id="cr.lectinnings" parameterClass="hashtable" resultClass="lectinning">
|
||||||
select a.lectno,a.cmino,a.finishtime,a.istatus
|
select a.lectno,a.cmino,a.finishtime,a.istatus
|
||||||
from lectinning a
|
from lectinning a
|
||||||
where a.lectno=#lectno#
|
inner join lect b on b.lectno = a.lectno
|
||||||
<isNotNull property="isfinishtoday">
|
<dynamic prepend="where">
|
||||||
and (a.istatus=2 and a.finishtime is not null and date_format(a.finishtime, '%y%m%d')=date_format(now(), '%y%m%d'))
|
<isNotNull property="userno" prepend="and">b.userno=#userno#</isNotNull>
|
||||||
</isNotNull>
|
<isNotNull property="lectno" prepend="and">a.lectno=#lectno#</isNotNull>
|
||||||
|
<isNotNull property="isfinishtoday" prepend="and">(a.istatus=2 and a.finishtime is not null and date_format(a.finishtime, '%y%m%d')=date_format(now(), '%y%m%d'))</isNotNull>
|
||||||
|
</dynamic>
|
||||||
</select>
|
</select>
|
||||||
<insert id="cr.lectinningpage.in" parameterClass="lectinningpage">
|
<insert id="cr.lectinningpage.in" parameterClass="lectinningpage">
|
||||||
update lectinning a
|
update lectinning a
|
||||||
|
|
|
||||||
|
|
@ -85,16 +85,18 @@ namespace NP.FO.Controllers
|
||||||
//출석 인증 시만 보이게 제한 처리 (intval 회차, intval2 출석인증제외 회원, intval3 출석인증제외 강좌)
|
//출석 인증 시만 보이게 제한 처리 (intval 회차, intval2 출석인증제외 회원, intval3 출석인증제외 강좌)
|
||||||
if (data != null && (data.intval == 1 || data.intval2 == 1 || data.intval3 == 1))
|
if (data != null && (data.intval == 1 || data.intval2 == 1 || data.intval3 == 1))
|
||||||
{
|
{
|
||||||
var todayLectinningCount = Dao.Get<LectInning>("cr.lectinnings", new Hashtable() { { "lectno", vm.lectno }, { "isfinishtoday", 1 } }).Count();
|
vm.todayLectinningCount = Dao.Get<LectInning>("cr.lectinnings", new Hashtable() {/* { "lectno", vm.lectno }*/{ "userno", SUserInfo.UserNo }, { "isfinishtoday", 1 } }).Count();
|
||||||
|
vm.daylectinninglimit = Convert.ToInt32((GetConfig("inninglimit") ?? "10"));
|
||||||
var lectInnings = Dao.Get<LectInning>("cr.cminnings", new Hashtable() { { "lectno", vm.lectno }, { "userno", SUserInfo.UserNo } });
|
var lectInnings = Dao.Get<LectInning>("cr.cminnings", new Hashtable() { { "lectno", vm.lectno }, { "userno", SUserInfo.UserNo } });
|
||||||
foreach (var item in lectInnings)
|
foreach (var item in lectInnings)
|
||||||
{
|
{
|
||||||
item.daylectinninglimit = item.daylectinninglimit == 0 ? 9999 : item.daylectinninglimit;
|
//item.daylectinninglimit = item.daylectinninglimit == 0 ? 9999 : item.daylectinninglimit;
|
||||||
|
item.daylectinninglimit = vm.daylectinninglimit;
|
||||||
}
|
}
|
||||||
var lectInning = lectInnings.Where(w => w.cmino == vm.cmino).FirstOrDefault();
|
var lectInning = lectInnings.Where(w => w.cmino == vm.cmino).FirstOrDefault();
|
||||||
|
|
||||||
//1일 신규 동영상 강의를 10차시로 제한
|
//1일 신규 동영상 강의를 10차시로 제한
|
||||||
if (todayLectinningCount < lectInning.daylectinninglimit || lectInning.istatus == 2)
|
if (vm.todayLectinningCount < lectInning.daylectinninglimit || lectInning.istatus == 2)
|
||||||
{
|
{
|
||||||
//이어보기를 위해 페이지관리
|
//이어보기를 위해 페이지관리
|
||||||
//vm.pseq = vm.pseq < 1 ? 1 : vm.pseq;
|
//vm.pseq = vm.pseq < 1 ? 1 : vm.pseq;
|
||||||
|
|
|
||||||
|
|
@ -37,13 +37,15 @@ namespace NP.FO.Controllers
|
||||||
}
|
}
|
||||||
vm.Datas = Dao.Get<Data>("cr.main.boardalarm", new System.Collections.Hashtable() { { "bmnos", bmnos != null ? bmnos.Substring(1) : bmnos},{ "lect", vm.croomlectno },{ "cmno", vm.croomcmno }, { "lectno", vm.croomlectno }, { "userno", SUserInfo.UserNo } });
|
vm.Datas = Dao.Get<Data>("cr.main.boardalarm", new System.Collections.Hashtable() { { "bmnos", bmnos != null ? bmnos.Substring(1) : bmnos},{ "lect", vm.croomlectno },{ "cmno", vm.croomcmno }, { "lectno", vm.croomlectno }, { "userno", SUserInfo.UserNo } });
|
||||||
vm.LectInnings = Dao.Get<LectInning>("cr.cminnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno },{ "userno",SUserInfo.UserNo}, { "notstudy" + (Request.IsLocal ? "x" : ""), 1 },{ "limit", 6} });
|
vm.LectInnings = Dao.Get<LectInning>("cr.cminnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno },{ "userno",SUserInfo.UserNo}, { "notstudy" + (Request.IsLocal ? "x" : ""), 1 },{ "limit", 6} });
|
||||||
|
vm.intval2 = Convert.ToInt32((GetConfig("inninglimit") ?? "10"));
|
||||||
foreach (var lectInning in vm.LectInnings)
|
foreach (var lectInning in vm.LectInnings)
|
||||||
{
|
{
|
||||||
lectInning.daylectinninglimit = lectInning.daylectinninglimit == 0 ? 9999 : lectInning.daylectinninglimit;
|
//lectInning.daylectinninglimit = lectInning.daylectinninglimit == 0 ? 9999 : lectInning.daylectinninglimit;
|
||||||
|
lectInning.daylectinninglimit = vm.intval2;
|
||||||
}
|
}
|
||||||
if (vm.LectInnings.Count() > 0 && !string.IsNullOrEmpty(vm.LectInnings.FirstOrDefault().existslectinning) )
|
if (vm.LectInnings.Count() > 0 && !string.IsNullOrEmpty(vm.LectInnings.FirstOrDefault().existslectinning) )
|
||||||
{
|
{
|
||||||
vm.intval = Dao.Get<LectInning>("cr.lectinnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno }, { "isfinishtoday", 1 } }).Count();
|
vm.intval = Dao.Get<LectInning>("cr.lectinnings", new System.Collections.Hashtable() { /*{ "lectno", vm.croomlectno }*/ {"userno",SUserInfo.UserNo }, { "isfinishtoday", 1 } }).Count();
|
||||||
}
|
}
|
||||||
return CView();
|
return CView();
|
||||||
}
|
}
|
||||||
|
|
@ -58,14 +60,16 @@ namespace NP.FO.Controllers
|
||||||
public ActionResult Innings()
|
public ActionResult Innings()
|
||||||
{
|
{
|
||||||
vm.LectInnings = Dao.Get<LectInning>("cr.cminnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno }, { "userno", SUserInfo.UserNo } });
|
vm.LectInnings = Dao.Get<LectInning>("cr.cminnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno }, { "userno", SUserInfo.UserNo } });
|
||||||
|
vm.intval2 = Convert.ToInt32((GetConfig("inninglimit") ?? "10"));
|
||||||
foreach (var lectInning in vm.LectInnings)
|
foreach (var lectInning in vm.LectInnings)
|
||||||
{
|
{
|
||||||
lectInning.daylectinninglimit = lectInning.daylectinninglimit == 0 ? 9999 : lectInning.daylectinninglimit;
|
//lectInning.daylectinninglimit = lectInning.daylectinninglimit == 0 ? 9999 : lectInning.daylectinninglimit;
|
||||||
|
lectInning.daylectinninglimit = vm.intval2;
|
||||||
}
|
}
|
||||||
ViewBag.Mobile = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault().mobile;
|
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)
|
if (!string.IsNullOrEmpty(vm.LectInnings.FirstOrDefault().existslectinning) && vm.LectInnings.Count() > 0)
|
||||||
{
|
{
|
||||||
vm.intval = Dao.Get<LectInning>("cr.lectinnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno }, { "isfinishtoday", 1 } }).Count();
|
vm.intval = Dao.Get<LectInning>("cr.lectinnings", new System.Collections.Hashtable() { /*{ "lectno", vm.croomlectno }*/ {"userno",SUserInfo.UserNo }, { "isfinishtoday", 1 } }).Count();
|
||||||
}
|
}
|
||||||
return CView();
|
return CView();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="lctcWeek">
|
<div class="lctcWeek">
|
||||||
|
<h5>오늘의 학습회차(@Model.intval/@Model.intval2)</h5>
|
||||||
<h5>금주의 학습 <a href="/CRoom/Innings?@Model.croomparam">수강 중인 강의 모두 보기</a></h5>
|
<h5>금주의 학습 <a href="/CRoom/Innings?@Model.croomparam">수강 중인 강의 모두 보기</a></h5>
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
@*<div class="lrnSch">
|
@*<div class="lrnSch">
|
||||||
<a href="#" onclick="showatt()">출결이력조회</a>
|
<a href="#" onclick="showatt()">출결이력조회</a>
|
||||||
</div>*@
|
</div>*@
|
||||||
|
<h3>오늘의 학습회차(@Model.intval/@Model.intval2)</h3>
|
||||||
|
<br/>
|
||||||
<div class="lctcWeek lrnList">
|
<div class="lctcWeek lrnList">
|
||||||
<input type="hidden" id="mobile" name="mobile" value="@(ViewBag.Mobile)" />
|
<input type="hidden" id="mobile" name="mobile" value="@(ViewBag.Mobile)" />
|
||||||
<table>
|
<table>
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@
|
||||||
<add key="ispaytest" value="1" />
|
<add key="ispaytest" value="1" />
|
||||||
<add key="isdevtest" value="0" />
|
<add key="isdevtest" value="0" />
|
||||||
<add key="deliveramt" value="2500" />
|
<add key="deliveramt" value="2500" />
|
||||||
|
<add key="inninglimit" value="10" />
|
||||||
<!--0:pc결제 url | 1:mid | 2:hashed signkey | 3:취소모듈비밀번호 | 4:거래번호앞두자리-->
|
<!--0:pc결제 url | 1:mid | 2:hashed signkey | 3:취소모듈비밀번호 | 4:거래번호앞두자리-->
|
||||||
<!--테스트결제-->
|
<!--테스트결제-->
|
||||||
<add key="pginfo" value="https://stgstdpay.inicis.com|INIpayTest|SU5JTElURV9UUklQTEVERVNfS0VZU1RS|1111|te|" />
|
<add key="pginfo" value="https://stgstdpay.inicis.com|INIpayTest|SU5JTElURV9UUklQTEVERVNfS0VZU1RS|1111|te|" />
|
||||||
|
|
|
||||||
|
|
@ -60,5 +60,7 @@ namespace NP.Model
|
||||||
public IList<Lect> Lects { get; set; }
|
public IList<Lect> Lects { get; set; }
|
||||||
public IList<Completion> Completions { get; set; }
|
public IList<Completion> Completions { get; set; }
|
||||||
public Data ErrLi { get; set; }
|
public Data ErrLi { get; set; }
|
||||||
|
public int todayLectinningCount { get; set; }
|
||||||
|
public int daylectinninglimit { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue