diff --git a/Dao/MyBatis/Maps/Lect.xml b/Dao/MyBatis/Maps/Lect.xml index 27ac98f..0e31033 100644 --- a/Dao/MyBatis/Maps/Lect.xml +++ b/Dao/MyBatis/Maps/Lect.xml @@ -313,7 +313,7 @@ left outer join scdlect b on b.scdno=a.scdno where b.scdno is null - + + + 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), ) AS char) email,CAST(AES_DECRYPT(UNHEX(d.mobile), ) 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), ) AS char) email,CAST(AES_DECRYPT(UNHEX(d.mobile), ) 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), ) AS char) email,CAST(AES_DECRYPT(UNHEX(d.mobile), ) 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), ) AS char) email,CAST(AES_DECRYPT(UNHEX(d.mobile), ) 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), ) AS char) email,CAST(AES_DECRYPT(UNHEX(d.mobile), ) 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), ) AS char),CAST(AES_DECRYPT(UNHEX(d.mobile), ) 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), ) AS char),CAST(AES_DECRYPT(UNHEX(d.mobile), ) 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#