Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
涂亚平
/
subsidy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ccfd90c4
authored
Dec 20, 2023
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
30秒以内的视频数据不插入
1 parent
3a53359c
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
152 additions
and
74 deletions
src/main/java/com/subsidy/controller/VodPlayHistoryController.java
src/main/java/com/subsidy/jobs/PushJob.java
src/main/java/com/subsidy/model/ClassDictDO.java
src/main/java/com/subsidy/service/PushDataService.java
src/main/java/com/subsidy/service/impl/ClassDictServiceImpl.java
src/main/java/com/subsidy/service/impl/DudaoServiceImpl.java
src/main/java/com/subsidy/service/impl/ExerciseDictServiceImpl.java
src/main/java/com/subsidy/service/impl/MemberServiceImpl.java
src/main/java/com/subsidy/service/impl/PushDataServiceImpl.java
src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java
src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java
src/main/java/com/subsidy/vo/renshe/DailyStudyInfoVO.java
src/main/resources/mapper/DudaoMapper.xml
src/main/resources/mapper/PushAnsweringDataMapper.xml
src/main/resources/mapper/PushDetectionDataMapper.xml
src/main/resources/mapper/PushExerciseDataMapper.xml
src/main/resources/mapper/PushImageDataMapper.xml
src/main/resources/mapper/PushVodDataMapper.xml
src/main/resources/mapper/RenSheJuMapper.xml
src/main/java/com/subsidy/controller/VodPlayHistoryController.java
View file @
ccfd90c
...
...
@@ -38,7 +38,7 @@ public class VodPlayHistoryController {
@PostMapping
(
"insertHistory"
)
@ApiOperation
(
"记录学生看视频位置 ajax请求 classId班级id vodId 视频id "
+
"memberId 成员id playLength 播放时长 playRecord 位点 suspendLength暂停时长 "
)
@LoginRequired
//
@LoginRequired
@TimeRequired
public
ResponseVO
insertHistory
(
@RequestBody
VodPlayHistoryDO
vodPlayHistoryDO
,
HttpServletRequest
request
)
throws
Exception
{
return
ResponseData
.
generateCreatedResponse
(
0
,
vodPlayHistoryService
.
insertHistory
(
vodPlayHistoryDO
,
request
));
...
...
src/main/java/com/subsidy/jobs/PushJob.java
View file @
ccfd90c
...
...
@@ -61,4 +61,17 @@ public class PushJob {
}
}
/**
* 定时发短信
*/
@Scheduled
(
cron
=
"0 0 9 * * ?"
)
public
void
sendWarning
(){
pushDataService
.
sendWarning
();
}
}
src/main/java/com/subsidy/model/ClassDictDO.java
View file @
ccfd90c
...
...
@@ -138,4 +138,9 @@ public class ClassDictDO extends BaseModel {
*/
private
Integer
activityFlag
;
/**
* 考试次数限制
*/
private
Integer
checkFlag
;
}
src/main/java/com/subsidy/service/PushDataService.java
View file @
ccfd90c
...
...
@@ -24,5 +24,7 @@ public interface PushDataService extends IService<PushAnsweringDataDO> {
void
post7
();
void
sendWarning
();
HashMap
<
String
,
List
<
Long
>>
check
();
}
src/main/java/com/subsidy/service/impl/ClassDictServiceImpl.java
View file @
ccfd90c
...
...
@@ -131,6 +131,7 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
BeanUtils
.
copyProperties
(
addClassDTO
,
classDictDO
);
//每天最大学习时长默认值
classDictDO
.
setLimitHour
(
1
);
classDictDO
.
setCheckFlag
(
1
);
this
.
baseMapper
.
insert
(
classDictDO
);
//班级里添加成员
...
...
src/main/java/com/subsidy/service/impl/DudaoServiceImpl.java
View file @
ccfd90c
...
...
@@ -189,7 +189,7 @@ public class DudaoServiceImpl implements DudaoService {
for
(
DailyStudyInfoVO
dailyStudyInfoVO
:
result
)
{
ClassHourBasic
classHourBasic
=
new
ClassHourBasic
();
BeanUtils
.
copyProperties
(
dailyStudyInfoVO
,
classHourBasic
);
classHourBasic
.
setClassCode
(
dailyStudyInfoVO
.
get
Down
Code
());
classHourBasic
.
setClassCode
(
dailyStudyInfoVO
.
get
Class
Code
());
//上线时间列表
//找到当天每次上线下线时间
...
...
src/main/java/com/subsidy/service/impl/ExerciseDictServiceImpl.java
View file @
ccfd90c
...
...
@@ -87,54 +87,63 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe
List
<
MemberExerciseVO
>
memberExerciseVOS
=
submitDTO
.
getMemberExerciseVOS
();
SimpleDateFormat
startDateFormat1
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
try
{
Date
startDate
=
startDateFormat1
.
parse
(
submitDTO
.
getStartDate
());
if
(
new
Date
().
getTime
()
-
startDate
.
getTime
()
<
180
*
1000L
)
{
throw
new
HttpException
(
20003
);
}
}
catch
(
ParseException
e
)
{
//判断数据库里是否有一样开始时间的记录,有的话就不插入
Integer
count
=
exerciseDoneResultMapper
.
selectCount
(
new
QueryWrapper
<
ExerciseDoneResultDO
>()
.
lambda
()
.
eq
(
ExerciseDoneResultDO:
:
getMemberId
,
submitDTO
.
getMemberId
())
.
eq
(
ExerciseDoneResultDO:
:
getClassId
,
submitDTO
.
getClassId
())
.
eq
(
ExerciseDoneResultDO:
:
getPaperId
,
submitDTO
.
getPaperId
())
.
eq
(
ExerciseDoneResultDO:
:
getStartDate
,
submitDTO
.
getStartDate
()));
}
if
(
count
==
0
){
try
{
Date
startDate
=
startDateFormat1
.
parse
(
submitDTO
.
getStartDate
());
int
rightCounts
=
0
;
if
(
new
Date
().
getTime
()
-
startDate
.
getTime
()
<
180
*
1000L
)
{
throw
new
HttpException
(
20003
);
}
}
catch
(
ParseException
e
)
{
for
(
MemberExerciseVO
exerciseVO
:
memberExerciseVOS
)
{
ExerciseDictDO
exerciseDictDO
=
this
.
baseMapper
.
selectById
(
exerciseVO
.
getId
());
if
(
exerciseDictDO
.
getRightAnswer
().
equals
(
exerciseVO
.
getSelectAnswer
()))
{
exerciseVO
.
setResult
(
1
);
rightCounts
++;
}
else
{
exerciseVO
.
setResult
(
0
);
}
}
int
rightCounts
=
0
;
exerciseDoneResultDO
.
setClassId
(
submitDTO
.
getClassId
());
exerciseDoneResultDO
.
setRightCounts
(
rightCounts
);
exerciseDoneResultDO
.
setTotalCounts
(
memberExerciseVOS
.
size
());
exerciseDoneResultDO
.
setCourseId
(
submitDTO
.
getCourseId
());
exerciseDoneResultDO
.
setMemberId
(
submitDTO
.
getMemberId
());
exerciseDoneResultDO
.
setPaperId
(
submitDTO
.
getPaperId
());
exerciseDoneResultDO
.
setLength
(
submitDTO
.
getLength
());
exerciseDoneResultDO
.
setStartDate
(
submitDTO
.
getStartDate
());
int
score
=
MathUtil
.
intDivFloorPercent
(
rightCounts
,
memberExerciseVOS
.
size
());
exerciseDoneResultDO
.
setScore
(
score
);
exerciseDoneResultDO
.
setResult
(
score
>=
60
?
"合格"
:
"不合格"
);
exerciseDoneResultMapper
.
insert
(
exerciseDoneResultDO
);
for
(
MemberExerciseVO
memberExerciseVO
:
memberExerciseVOS
)
{
ExerciseDoneHistoryDO
exerciseDoneHistoryDO
=
new
ExerciseDoneHistoryDO
();
exerciseDoneHistoryDO
.
setPaperId
(
submitDTO
.
getPaperId
());
exerciseDoneHistoryDO
.
setDoneId
(
exerciseDoneResultDO
.
getId
());
exerciseDoneHistoryDO
.
setMemberId
(
submitDTO
.
getMemberId
());
exerciseDoneHistoryDO
.
setClassId
(
submitDTO
.
getClassId
());
exerciseDoneHistoryDO
.
setExerciseId
(
memberExerciseVO
.
getId
());
exerciseDoneHistoryDO
.
setAnswer
(
memberExerciseVO
.
getSelectAnswer
());
exerciseDoneHistoryDO
.
setResult
(
memberExerciseVO
.
getResult
());
exerciseDoneHistoryMapper
.
insert
(
exerciseDoneHistoryDO
);
for
(
MemberExerciseVO
exerciseVO
:
memberExerciseVOS
)
{
ExerciseDictDO
exerciseDictDO
=
this
.
baseMapper
.
selectById
(
exerciseVO
.
getId
());
if
(
exerciseDictDO
.
getRightAnswer
().
equals
(
exerciseVO
.
getSelectAnswer
()))
{
exerciseVO
.
setResult
(
1
);
rightCounts
++;
}
else
{
exerciseVO
.
setResult
(
0
);
}
}
exerciseDoneResultDO
.
setClassId
(
submitDTO
.
getClassId
());
exerciseDoneResultDO
.
setRightCounts
(
rightCounts
);
exerciseDoneResultDO
.
setTotalCounts
(
memberExerciseVOS
.
size
());
exerciseDoneResultDO
.
setCourseId
(
submitDTO
.
getCourseId
());
exerciseDoneResultDO
.
setMemberId
(
submitDTO
.
getMemberId
());
exerciseDoneResultDO
.
setPaperId
(
submitDTO
.
getPaperId
());
exerciseDoneResultDO
.
setLength
(
submitDTO
.
getLength
());
exerciseDoneResultDO
.
setStartDate
(
submitDTO
.
getStartDate
());
int
score
=
MathUtil
.
intDivFloorPercent
(
rightCounts
,
memberExerciseVOS
.
size
());
exerciseDoneResultDO
.
setScore
(
score
);
exerciseDoneResultDO
.
setResult
(
score
>=
60
?
"合格"
:
"不合格"
);
exerciseDoneResultMapper
.
insert
(
exerciseDoneResultDO
);
for
(
MemberExerciseVO
memberExerciseVO
:
memberExerciseVOS
)
{
ExerciseDoneHistoryDO
exerciseDoneHistoryDO
=
new
ExerciseDoneHistoryDO
();
exerciseDoneHistoryDO
.
setPaperId
(
submitDTO
.
getPaperId
());
exerciseDoneHistoryDO
.
setDoneId
(
exerciseDoneResultDO
.
getId
());
exerciseDoneHistoryDO
.
setMemberId
(
submitDTO
.
getMemberId
());
exerciseDoneHistoryDO
.
setClassId
(
submitDTO
.
getClassId
());
exerciseDoneHistoryDO
.
setExerciseId
(
memberExerciseVO
.
getId
());
exerciseDoneHistoryDO
.
setAnswer
(
memberExerciseVO
.
getSelectAnswer
());
exerciseDoneHistoryDO
.
setResult
(
memberExerciseVO
.
getResult
());
exerciseDoneHistoryMapper
.
insert
(
exerciseDoneHistoryDO
);
}
}
return
exerciseDoneResultDO
.
getId
();
...
...
src/main/java/com/subsidy/service/impl/MemberServiceImpl.java
View file @
ccfd90c
...
...
@@ -953,15 +953,19 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
public
String
checkTimes
(
ExerciseDoneResultDO
exerciseDoneResultDO
)
{
//查看这个人这个卷子做了几次
Integer
count
=
exerciseDoneResultMapper
.
selectCount
(
new
QueryWrapper
<
ExerciseDoneResultDO
>()
.
lambda
()
.
eq
(
ExerciseDoneResultDO:
:
getMemberId
,
exerciseDoneResultDO
.
getMemberId
())
.
eq
(
ExerciseDoneResultDO:
:
getPaperId
,
exerciseDoneResultDO
.
getPaperId
())
.
eq
(
ExerciseDoneResultDO:
:
getClassId
,
exerciseDoneResultDO
.
getClassId
()));
ClassDictDO
classDictDO
=
classDictMapper
.
selectById
(
exerciseDoneResultDO
.
getClassId
());
if
(
count
>
3
)
{
throw
new
HttpException
(
60001
);
if
(
1
==
classDictDO
.
getCheckFlag
())
{
//查看这个人这个卷子做了几次
Integer
count
=
exerciseDoneResultMapper
.
selectCount
(
new
QueryWrapper
<
ExerciseDoneResultDO
>()
.
lambda
()
.
eq
(
ExerciseDoneResultDO:
:
getMemberId
,
exerciseDoneResultDO
.
getMemberId
())
.
eq
(
ExerciseDoneResultDO:
:
getPaperId
,
exerciseDoneResultDO
.
getPaperId
())
.
eq
(
ExerciseDoneResultDO:
:
getClassId
,
exerciseDoneResultDO
.
getClassId
()));
if
(
count
>=
3
)
{
throw
new
HttpException
(
60001
);
}
}
return
ConstantUtils
.
CHECK_STATUS
;
...
...
src/main/java/com/subsidy/service/impl/PushDataServiceImpl.java
View file @
ccfd90c
...
...
@@ -10,16 +10,14 @@ import com.subsidy.service.PushDataService;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.subsidy.service.RenshejuHistoryService
;
import
com.subsidy.util.RenSheJuConstant
;
import
com.subsidy.util.SMSUtils
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.configurationprocessor.json.JSONObject
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.*
;
/**
* <p>
...
...
@@ -59,6 +57,9 @@ public class PushDataServiceImpl extends ServiceImpl<PushAnsweringDataMapper, Pu
@Autowired
private
PushAnsweringDataMapper
pushAnsweringDataMapper
;
@Autowired
private
SMSUtils
smsUtils
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
post4
()
{
...
...
@@ -176,7 +177,7 @@ public class PushDataServiceImpl extends ServiceImpl<PushAnsweringDataMapper, Pu
// List<RenshejuHistoryDO> renshejuHistoryDOS = renshejuHistoryMapper.selectList(new QueryWrapper<RenshejuHistoryDO>()
// .lambda()
// .in(RenshejuHistoryDO::getId,longs));
for
(
RenshejuHistoryDO
renshejuHistoryDO
:
renshejuHistoryDOS
){
for
(
RenshejuHistoryDO
renshejuHistoryDO
:
renshejuHistoryDOS
)
{
String
input
=
renshejuHistoryDO
.
getInputParam
();
Gson
gson
=
new
Gson
();
UploadImageDTO
uploadImageDTO
=
gson
.
fromJson
(
input
,
UploadImageDTO
.
class
);
...
...
@@ -197,29 +198,60 @@ public class PushDataServiceImpl extends ServiceImpl<PushAnsweringDataMapper, Pu
}
}
public
HashMap
<
String
,
List
<
Long
>>
check
(){
public
void
sendWarning
()
{
HashMap
<
String
,
List
<
Long
>>
hashMap
=
new
HashMap
();
//视频
List
<
Long
>
vodList
=
pushVodDataMapper
.
vodIds
();
//答疑
List
<
Long
>
answerList
=
pushAnsweringDataMapper
.
answerList
();
//考试
List
<
Long
>
examList
=
pushExerciseDataMapper
.
examList
();
//活跃度
List
<
Long
>
activityList
=
pushDetectionDataMapper
.
activityList
();
//人脸
List
<
Long
>
imageList
=
pushImageDataMapper
.
imageList
();
if
(
vodList
.
size
()+
answerList
.
size
()+
examList
.
size
()+
activityList
.
size
()+
imageList
.
size
()>
0
){
List
<
String
>
telephones
=
Arrays
.
asList
(
new
String
[]{
"15201936167"
,
"18201963812"
});
for
(
String
telephone
:
telephones
)
{
smsUtils
.
sendWarning
(
"SMS_460945631"
,
telephone
,
null
);
}
}
}
public
HashMap
<
String
,
List
<
Long
>>
check
()
{
HashMap
<
String
,
List
<
Long
>>
hashMap
=
new
HashMap
();
//视频
List
<
Long
>
vodList
=
pushVodDataMapper
.
vodIds
();
hashMap
.
put
(
"视频"
,
vodList
);
hashMap
.
put
(
"视频"
,
vodList
);
//答疑
List
<
Long
>
answerList
=
pushAnsweringDataMapper
.
answerList
();
hashMap
.
put
(
"答疑"
,
answerList
);
hashMap
.
put
(
"答疑"
,
answerList
);
//考试
List
<
Long
>
examList
=
pushExerciseDataMapper
.
examList
();
hashMap
.
put
(
"考试"
,
examList
);
hashMap
.
put
(
"考试"
,
examList
);
//活跃度
List
<
Long
>
activityList
=
pushDetectionDataMapper
.
activityList
();
hashMap
.
put
(
"活跃度"
,
activityList
);
hashMap
.
put
(
"活跃度"
,
activityList
);
//人脸
List
<
Long
>
imageList
=
pushImageDataMapper
.
imageList
();
hashMap
.
put
(
"人脸"
,
imageList
);
hashMap
.
put
(
"人脸"
,
imageList
);
return
hashMap
;
}
...
...
src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java
View file @
ccfd90c
...
...
@@ -176,7 +176,7 @@ public class RenSheJuServiceImpl implements RenSheJuService {
for
(
DailyStudyInfoVO
dailyStudyInfoVO
:
result
)
{
ClassHourBasic
classHourBasic
=
new
ClassHourBasic
();
BeanUtils
.
copyProperties
(
dailyStudyInfoVO
,
classHourBasic
);
classHourBasic
.
setClassCode
(
dailyStudyInfoVO
.
get
Down
Code
());
classHourBasic
.
setClassCode
(
dailyStudyInfoVO
.
get
Class
Code
());
//找到当天每次上线下线时间
//上线时间
...
...
src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java
View file @
ccfd90c
...
...
@@ -89,7 +89,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
if
(
count
==
0
&&
flag
)
{
if
(
vodPlayHistoryDO
.
getPlayLength
()
>
8
&&
vodPlayHistoryDO
.
getSuspendLength
()
<=
3000
)
{
if
(
vodPlayHistoryDO
.
getPlayLength
()
>
30
&&
vodPlayHistoryDO
.
getSuspendLength
()
<=
3000
)
{
Date
latestDailyDate
=
this
.
baseMapper
.
latestDailyStudyRecord
(
vodPlayHistoryDO
.
getMemberId
());
...
...
@@ -108,7 +108,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
//超过时长
int
playLength
=
6
*
3600
-
total
;
vodPlayHistoryDO
.
setPlayLength
(
playLength
);
if
(
playLength
>
8
)
{
if
(
playLength
>
30
)
{
FixLengthVO
fixLengthVO
=
fixPlayLength
(
date
,
latestDailyDate
,
vodPlayHistoryDO
.
getPlayLength
(),
vodPlayHistoryDO
.
getSuspendLength
());
if
(
null
!=
fixLengthVO
.
getSuspendLength
()
&&
null
!=
fixLengthVO
.
getPlayLength
())
{
vodPlayHistoryMapper
.
insertPlayRecord
(
vodPlayHistoryDO
.
getClassId
(),
vodPlayHistoryDO
.
getVodId
(),
vodPlayHistoryDO
.
getMemberId
(),
fixLengthVO
.
getPlayLength
()
...
...
@@ -159,7 +159,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
}
if
(
count
==
0
&&
flag
)
{
if
(
insertHistoryNewDTO
.
getPlayLength
()
>
8
&&
insertHistoryNewDTO
.
getSuspendLength
()
<=
3000
)
{
if
(
insertHistoryNewDTO
.
getPlayLength
()
>
30
&&
insertHistoryNewDTO
.
getSuspendLength
()
<=
3000
)
{
VodPlayHistoryDO
vodPlayHistoryDO
=
new
VodPlayHistoryDO
();
BeanUtils
.
copyProperties
(
insertHistoryNewDTO
,
vodPlayHistoryDO
);
//查看系统设定的时长
...
...
@@ -177,7 +177,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
if
(
total
+
vodPlayHistoryDO
.
getPlayLength
()
>
6
*
3600
)
{
int
playLength
=
6
*
3600
-
total
;
vodPlayHistoryDO
.
setPlayLength
(
playLength
);
if
(
playLength
>
8
)
{
if
(
playLength
>
30
)
{
FixLengthVO
fixLengthVO
=
fixPlayLength
(
date
,
latestDailyDate
,
vodPlayHistoryDO
.
getPlayLength
(),
vodPlayHistoryDO
.
getSuspendLength
());
if
(
null
!=
fixLengthVO
.
getSuspendLength
()
&&
null
!=
fixLengthVO
.
getPlayLength
())
{
vodPlayHistoryMapper
.
insertPlayRecord
(
vodPlayHistoryDO
.
getClassId
(),
vodPlayHistoryDO
.
getVodId
(),
vodPlayHistoryDO
.
getMemberId
(),
fixLengthVO
.
getPlayLength
()
...
...
src/main/java/com/subsidy/vo/renshe/DailyStudyInfoVO.java
View file @
ccfd90c
...
...
@@ -12,7 +12,7 @@ public class DailyStudyInfoVO {
/**
* 临时班级(临时项目)编号
*/
private
String
down
Code
;
private
String
class
Code
;
/**
* 学员身份证号,会对身份证号长度、格式进行校验、X用大写
*/
...
...
src/main/resources/mapper/DudaoMapper.xml
View file @
ccfd90c
...
...
@@ -216,7 +216,7 @@
class_dict t1
LEFT JOIN company_dict t3 ON t1.company_id = t3.id
WHERE
DATE_FORMAT( DATE_ADD( t1.
create
_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.
start
_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
and t1.class_code is not NULL
<if
test=
"classType != null and classType != ''"
>
...
...
src/main/resources/mapper/PushAnsweringDataMapper.xml
View file @
ccfd90c
...
...
@@ -12,13 +12,16 @@
t2.id AS 答疑id
FROM
answering_question t2
left join class_dict t3 on t2.class_id = t3.id
LEFT JOIN push_answering_data t1 ON t1.class_id = t2.class_id
AND t1.ask_id = t2.ask_id
AND t1.create_date = t2.create_date
AND t1.update_date = t2.update_date
WHERE
t2.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t2.update_date,
INTERVAL
1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t2.update_date,
interval
1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.create_date IS NULL
and t3.class_type = 0
</select>
</mapper>
src/main/resources/mapper/PushDetectionDataMapper.xml
View file @
ccfd90c
...
...
@@ -12,12 +12,15 @@
t2.id 活跃度id
FROM
activity_detection t2
left join class_dict t3 on t2.class_id = t3.id
LEFT JOIN push_detection_data t1 ON t1.class_id = t2.class_id
AND t1.member_id = t2.member_id
AND t1.create_date = t2.create_date
WHERE
t2.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t2.create_date,
INTERVAL
1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t2.create_date,
interval
1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.create_date IS NULL
and t3.class_type = 0
</select>
</mapper>
src/main/resources/mapper/PushExerciseDataMapper.xml
View file @
ccfd90c
...
...
@@ -12,14 +12,16 @@
t2.id as 考试id
FROM
exercise_done_result t2
left join class_dict t3 on t2.class_id = t3.id
LEFT JOIN push_exercise_data t1 ON t1.class_id = t2.class_id
AND t1.member_id = t2.member_id
AND t1.start_date = t2.start_date
AND t1.create_date = t2.create_date
WHERE
t2.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t2.create_date,
INTERVAL
1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t2.create_date,
interval
1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.create_date IS NULL
and t3.class_type = 0
</select>
</mapper>
src/main/resources/mapper/PushImageDataMapper.xml
View file @
ccfd90c
...
...
@@ -12,6 +12,7 @@
t2.id 人脸id
FROM
image_check_record t2
left join class_dict t3 on t2.class_id = t3.id
LEFT JOIN push_image_data t1 ON t1.class_id = t2.class_id
AND t1.member_id = t2.member_id
AND t1.occurred_time = t2.create_date
...
...
@@ -20,5 +21,6 @@
AND DATE_FORMAT( DATE_ADD( t2.create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.id IS NULL
AND t2.result = 1
and t3.class_type = 0
</select>
</mapper>
src/main/resources/mapper/PushVodDataMapper.xml
View file @
ccfd90c
...
...
@@ -12,6 +12,7 @@
t2.id as 视频id
FROM
vod_play_history t2
left join class_dict t3 on t2.class_id = t3.id
LEFT JOIN push_vod_data t1 ON t1.class_id = t2.class_id
AND t1.vod_id = t2.vod_id
AND t1.member_id = t2.member_id
...
...
@@ -20,8 +21,9 @@
AND t1.create_date = t2.create_date
WHERE
t2.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t2.create_date,
INTERVAL
1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t2.create_date,
interval
1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.create_date IS NULL
and t3.class_type = 0
</select>
</mapper>
src/main/resources/mapper/RenSheJuMapper.xml
View file @
ccfd90c
...
...
@@ -83,7 +83,7 @@
<select
id=
"dailyStudyInfo"
resultType=
"com.subsidy.vo.renshe.DailyStudyInfoVO"
>
SELECT
t.class_id,
t5.class_code
AS downCode
,
t5.class_code,
t3.id AS member_id,
t3.user_name AS studentName,
t3.telephone AS phone,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment