This commit is contained in:
parent
0e1de85fae
commit
4e3b37f4b7
|
|
@ -313,7 +313,7 @@
|
||||||
left outer join scdlect b on b.scdno=a.scdno
|
left outer join scdlect b on b.scdno=a.scdno
|
||||||
where b.scdno is null
|
where b.scdno is null
|
||||||
</update>
|
</update>
|
||||||
<sql id="sql.encourages" parameterClass="hashtable" resultClass="scdlect">
|
<!--<sql id="sql.encourages" parameterClass="hashtable" resultClass="scdlect">
|
||||||
select a.scdno,a.dday,a.istalk,a.isemail,a.issms
|
select a.scdno,a.dday,a.istalk,a.isemail,a.issms
|
||||||
,d.userno,d.username
|
,d.userno,d.username
|
||||||
,b.cmno cmexno,b.cname,null stime
|
,b.cmno cmexno,b.cname,null stime
|
||||||
|
|
@ -399,6 +399,92 @@
|
||||||
inner join examuser c on c.exno=b.exno and c.status=1 and c.pstatus=1
|
inner join examuser c on c.exno=b.exno and c.status=1 and c.pstatus=1
|
||||||
inner join users d on d.userno=c.userno and d.status=1
|
inner join users d on d.userno=c.userno and d.status=1
|
||||||
where a.scdno=9 and a.isuse=1 and a.dtime=#dtime#
|
where a.scdno=9 and a.isuse=1 and a.dtime=#dtime#
|
||||||
|
</sql>-->
|
||||||
|
<sql id="sql.encourages" parameterClass="hashtable" resultClass="scdlect">
|
||||||
|
select a.scdno,a.dday,a.istalk,a.isemail,a.issms
|
||||||
|
,d.userno,d.username
|
||||||
|
,b.cmno cmexno,b.cname,null stime
|
||||||
|
,null etime,null studyplace,null days
|
||||||
|
,CAST(AES_DECRYPT(UNHEX(d.email), <include refid="sql.digest"></include>) AS char) email,CAST(AES_DECRYPT(UNHEX(d.mobile), <include refid="sql.digest"></include>) AS char) mobile
|
||||||
|
from scdlect a
|
||||||
|
inner join cm b on b.ismaster=0 and b.cshape in (0,2) and b.isuse=1 and b.isdel=0
|
||||||
|
inner join lect c on c.cmno=b.cmno and c.attrate < 80 and c.status=1 and c.ischanged=0 and date_format(c.edate,'%Y%m%d')=date_format(date_add(now(), interval a.dday day), '%Y%m%d')
|
||||||
|
inner join users d on d.userno=c.userno and d.status=1
|
||||||
|
where a.scdno < 3 and a.isuse=1 and a.dtime=#dtime#
|
||||||
|
union all
|
||||||
|
select a.scdno,a.dday,a.istalk,a.isemail,a.issms
|
||||||
|
,d.userno,d.username
|
||||||
|
,b.cmno cmexno,b.cname,null stime
|
||||||
|
,null etime,null studyplace,null days
|
||||||
|
,CAST(AES_DECRYPT(UNHEX(d.email), <include refid="sql.digest"></include>) AS char) email,CAST(AES_DECRYPT(UNHEX(d.mobile), <include refid="sql.digest"></include>) AS char) mobile
|
||||||
|
from scdlect a
|
||||||
|
inner join cm b on b.ismaster=0 and b.cshape in (0,2) and b.isuse=1 and b.isdel=0
|
||||||
|
inner join lect c on c.cmno=b.cmno and c.status=1 and c.ischanged=0 and date_format(c.edate,'%Y%m%d')=date_format(date_add(now(), interval a.dday day), '%Y%m%d')
|
||||||
|
inner join users d on d.userno=c.userno and d.status=1
|
||||||
|
inner join cmex e on e.cmno=c.cmno and e.extype=case when a.scdno=3 then 0 else 1 end and e.isdel=0
|
||||||
|
left outer join lectex f on f.lectno=c.lectno and f.exno=e.exno
|
||||||
|
where a.scdno > 2 and a.scdno < 5 and a.isuse=1 and a.dtime=#dtime# and f.lectno is null
|
||||||
|
union all
|
||||||
|
select a.scdno,a.dday,a.istalk,a.isemail,a.issms
|
||||||
|
,d.userno,d.username
|
||||||
|
,b.cmno cmexno,b.cname,null stime
|
||||||
|
,null etime,null studyplace,null days
|
||||||
|
,CAST(AES_DECRYPT(UNHEX(d.email), <include refid="sql.digest"></include>) AS char) email,CAST(AES_DECRYPT(UNHEX(d.mobile), <include refid="sql.digest"></include>) AS char) mobile
|
||||||
|
from scdlect a
|
||||||
|
inner join cm b on b.ismaster=0 and b.cshape in (0,2) and b.isuse=1 and b.isdel=0
|
||||||
|
inner join lect c on c.cmno=b.cmno and c.status=1 and c.ischanged=0 and date_format(c.edate,'%Y%m%d')=date_format(date_add(now(), interval a.dday day), '%Y%m%d')
|
||||||
|
inner join users d on d.userno=c.userno and d.status=1
|
||||||
|
inner join cmsd e on e.cmno=c.cmno and e.sdtype=0 and e.isdel=0
|
||||||
|
left outer join lectsd f on f.lectno=c.lectno and f.sdno=e.sdno
|
||||||
|
where a.scdno=5 and a.isuse=1 and a.dtime=#dtime# and f.lectno is null
|
||||||
|
union all
|
||||||
|
select a.scdno,a.dday,a.istalk,a.isemail,a.issms
|
||||||
|
,d.userno,d.username
|
||||||
|
,b.cmno cmexno,b.cname,null stime
|
||||||
|
,null etime,null studyplace,null days
|
||||||
|
,CAST(AES_DECRYPT(UNHEX(d.email), <include refid="sql.digest"></include>) AS char) email,CAST(AES_DECRYPT(UNHEX(d.mobile), <include refid="sql.digest"></include>) AS char) mobile
|
||||||
|
from scdlect a
|
||||||
|
inner join cm b on b.ismaster=0 and b.cshape in (0,2) and b.isuse=1 and b.isdel=0
|
||||||
|
inner join lect c on c.cmno=b.cmno and c.status=1 and c.ischanged=0 and date_format(c.edate,'%Y%m%d')=date_format(date_add(now(), interval a.dday day), '%Y%m%d')
|
||||||
|
inner join users d on d.userno=c.userno and d.status=1
|
||||||
|
inner join cmsd e on e.cmno=c.cmno and e.sdtype=1 and e.isdel=0
|
||||||
|
left outer join lectsd f on f.lectno=c.lectno and f.sdno=e.sdno
|
||||||
|
where a.scdno=6 and a.isuse=1 and a.dtime=#dtime# and f.lectno is null
|
||||||
|
union all
|
||||||
|
select a.scdno,a.dday,a.istalk,a.isemail,a.issms
|
||||||
|
,d.userno,d.username
|
||||||
|
,b.cmno cmexno,b.cname,null stime
|
||||||
|
,null etime,null studyplace,null days
|
||||||
|
,CAST(AES_DECRYPT(UNHEX(d.email), <include refid="sql.digest"></include>) AS char) email,CAST(AES_DECRYPT(UNHEX(d.mobile), <include refid="sql.digest"></include>) AS char) mobile
|
||||||
|
from scdlect a
|
||||||
|
inner join cm b on b.ismaster=0 and b.cshape in (0,2) and b.isuse=1 and b.isdel=0
|
||||||
|
inner join lect c on c.cmno=b.cmno and c.status=1 and c.ischanged=0 and date_format(c.edate,'%Y%m%d')=date_format(date_add(now(), interval a.dday day), '%Y%m%d')
|
||||||
|
inner join users d on d.userno=c.userno and d.status=1
|
||||||
|
inner join cmrs e on e.cmno=c.cmno and e.rstype=0 and e.isdel=0
|
||||||
|
left outer join lectrs f on f.lectno=c.lectno and f.rsno=e.rsno
|
||||||
|
where a.scdno=7 and a.isuse=1 and a.dtime=#dtime# and f.lectno is null
|
||||||
|
union all
|
||||||
|
select a.scdno,a.dday,a.istalk,a.isemail,a.issms
|
||||||
|
,d.userno,d.username
|
||||||
|
,b.cmno cmexno,b.cname,c.sdate stime
|
||||||
|
,c.edate etime,b.studyplace,b.studytime days
|
||||||
|
,CAST(AES_DECRYPT(UNHEX(d.email), <include refid="sql.digest"></include>) AS char),CAST(AES_DECRYPT(UNHEX(d.mobile), <include refid="sql.digest"></include>) AS char)
|
||||||
|
from scdlect a
|
||||||
|
inner join cm b on b.ismaster=0 and b.cshape =1 and b.isuse=1 and b.isdel=0
|
||||||
|
inner join lect c on c.cmno=b.cmno and c.status=1 and c.ischanged=0 and date_format(c.sdate,'%Y%m%d')=date_format(date_add(now(), interval a.dday day), '%Y%m%d')
|
||||||
|
inner join users d on d.userno=c.userno and d.status=1
|
||||||
|
where a.scdno=8 and a.isuse=1 and a.dtime=#dtime#
|
||||||
|
union all
|
||||||
|
select a.scdno,a.dday,a.istalk,a.isemail,a.issms
|
||||||
|
,d.userno,d.username
|
||||||
|
,b.exno cmexno,b.exname cname,b.estime stime
|
||||||
|
,null etime,null studyplace,null days
|
||||||
|
,CAST(AES_DECRYPT(UNHEX(d.email), <include refid="sql.digest"></include>) AS char),CAST(AES_DECRYPT(UNHEX(d.mobile), <include refid="sql.digest"></include>) AS char)
|
||||||
|
from scdlect a
|
||||||
|
inner join exam b on date_format(b.estime,'%Y%m%d')=date_format(date_add(now(), interval a.dday day), '%Y%m%d') and b.isopen=1
|
||||||
|
inner join examuser c on c.exno=b.exno and c.status=1 and c.pstatus=1
|
||||||
|
inner join users d on d.userno=c.userno and d.status=1
|
||||||
|
where a.scdno=9 and a.isuse=1 and a.dtime=#dtime#
|
||||||
</sql>
|
</sql>
|
||||||
<select id="lect.encourages" parameterClass="hashtable" resultClass="scdlect">
|
<select id="lect.encourages" parameterClass="hashtable" resultClass="scdlect">
|
||||||
insert into alarms (userno,atime,scdno,cmexno,dday,isdel,<include refid="sql.inc"></include>)
|
insert into alarms (userno,atime,scdno,cmexno,dday,isdel,<include refid="sql.inc"></include>)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue