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 9c71b838
authored
Jun 05, 2023
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补贴培训第2次上课熬夜改数据
1 parent
78c193ec
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
184 additions
and
187 deletions
src/main/java/com/subsidy/jobs/RenSheJuJob.java
src/main/java/com/subsidy/jobs/WarningJob.java
src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java
src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java
src/main/resources/mapper/ClassDictMapper.xml
src/main/resources/mapper/CourseContentMapper.xml
src/main/resources/mapper/DudaoMapper.xml
src/main/resources/mapper/OprAdmDictMapper.xml
src/main/resources/mapper/OprMemDictMapper.xml
src/main/resources/mapper/RenSheJuMapper.xml
src/main/resources/mapper/SignInRecordMapper.xml
src/main/java/com/subsidy/jobs/RenSheJuJob.java
View file @
9c71b83
...
...
@@ -26,7 +26,7 @@ import java.util.concurrent.ConcurrentHashMap;
/**
* 企业职工线上培训
*/
@Component
//
@Component
public
class
RenSheJuJob
{
...
...
@@ -118,7 +118,7 @@ public class RenSheJuJob {
// renSheJuService.getErrorClass();
// }
@Scheduled
(
cron
=
"0
0
50 23 * * ?"
)
@Scheduled
(
cron
=
"0 50 23 * * ?"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
logout
(){
//让当前用户下线
...
...
@@ -140,7 +140,7 @@ public class RenSheJuJob {
}
@Scheduled
(
cron
=
"0
0
55 23 * * ?"
)
@Scheduled
(
cron
=
"0 55 23 * * ?"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
cancelLogin
()
{
...
...
src/main/java/com/subsidy/jobs/WarningJob.java
View file @
9c71b83
...
...
@@ -10,15 +10,13 @@ import com.subsidy.vo.vod.VodPlayStateVO;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashSet
;
import
java.util.List
;
@Component
//
@Component
public
class
WarningJob
{
/**
...
...
@@ -61,8 +59,9 @@ public class WarningJob {
VodPlayStateVO
vodPlayStateVO
=
vodPlayStateVOS
.
get
(
i
+
1
);
//后面
VodPlayStateVO
vodPlayStateVO1
=
vodPlayStateVOS
.
get
(
i
);
//前面
if
(
vodPlayStateVO1
.
getEndDate
().
getTime
()
>
vodPlayStateVO
.
getStartDate
().
getTime
())
{
result
.
add
(
vodPlayStateVO
.
getClassId
());
break
;
if
(!
result
.
contains
(
vodPlayStateVO1
.
getClassId
())){
result
.
add
(
vodPlayStateVO
.
getClassId
());
}
}
}
}
...
...
src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java
View file @
9c71b83
...
...
@@ -216,27 +216,27 @@ public class RenSheJuServiceImpl implements RenSheJuService {
System
.
out
.
println
(
com
.
alibaba
.
fastjson
.
JSONObject
.
toJSONString
(
classHourBehaviorDTO
));
if
(
classHourBasics
.
size
()>
0
){
RequestBody
body
=
RequestBody
.
create
(
mediaType
,
JSONObject
.
fromObject
(
classHourBehaviorDTO
).
toString
());
Request
request
=
new
Request
.
Builder
()
.
url
(
renSheConfig
.
getUrl
()
+
"/import/downstream/enterprise/uploadClassHourBehavior"
)
.
method
(
"POST"
,
body
)
.
addHeader
(
"User-Agent"
,
"Apifox/1.0.0 (https://www.apifox.cn)"
)
.
addHeader
(
"Content-Type"
,
"application/json"
)
.
build
();
Response
response
=
client
.
newCall
(
request
).
execute
();
RensheResponseVO
rensheResponseVO
=
JSON
.
parseObject
(
response
.
body
().
string
(),
RensheResponseVO
.
class
);
RenshejuHistoryDO
renshejuHistoryDO
=
new
RenshejuHistoryDO
();
renshejuHistoryDO
.
setInterfaceName
(
RenSheJuConstant
.
POST_3
);
renshejuHistoryDO
.
setInputParam
(
JSONObject
.
fromObject
(
classHourBehaviorDTO
).
toString
());
if
(
200
==
response
.
code
())
{
renshejuHistoryDO
.
setOutputParam
(
rensheResponseVO
.
getCtt
().
toString
());
}
else
{
renshejuHistoryDO
.
setOutputParam
(
RenSheJuConstant
.
API_ERROR
);
}
renshejuHistoryMapper
.
insert
(
renshejuHistoryDO
);
return
rensheResponseVO
;
//
RequestBody body = RequestBody.create(mediaType, JSONObject.fromObject(classHourBehaviorDTO).toString());
//
//
Request request = new Request.Builder()
//
.url(renSheConfig.getUrl() + "/import/downstream/enterprise/uploadClassHourBehavior")
//
.method("POST", body)
//
.addHeader("User-Agent", "Apifox/1.0.0 (https://www.apifox.cn)")
//
.addHeader("Content-Type", "application/json")
//
.build();
//
Response response = client.newCall(request).execute();
//
//
RensheResponseVO rensheResponseVO = JSON.parseObject(response.body().string(), RensheResponseVO.class);
//
RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO();
//
renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_3);
//
renshejuHistoryDO.setInputParam(JSONObject.fromObject(classHourBehaviorDTO).toString());
//
if (200 == response.code()) {
//
renshejuHistoryDO.setOutputParam(rensheResponseVO.getCtt().toString());
//
} else {
//
renshejuHistoryDO.setOutputParam(RenSheJuConstant.API_ERROR);
//
}
//
renshejuHistoryMapper.insert(renshejuHistoryDO);
//
return rensheResponseVO;
}
else
{
RenshejuHistoryDO
renshejuHistoryDO
=
new
RenshejuHistoryDO
();
renshejuHistoryDO
.
setInterfaceName
(
RenSheJuConstant
.
POST_3
);
...
...
src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java
View file @
9c71b83
...
...
@@ -695,18 +695,9 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
result
.
add
(
vodPlayStateVO
.
getClassId
());
}
}
break
;
}
}
}
//
// StringBuffer stringBuffer = new StringBuffer();
// for (int i = 0; i < result.size(); i++) {
// stringBuffer.append(result);
// if (i == result.size()-1){
// stringBuffer.append("n");
// }
// }
if
(
result
.
size
()>
0
){
List
<
String
>
telephones
=
Arrays
.
asList
(
new
String
[]{
"15201936167"
,
"18201963812"
,
"18217669021"
});
...
...
src/main/resources/mapper/ClassDictMapper.xml
View file @
9c71b83
...
...
@@ -256,7 +256,7 @@
FROM
vod_play_history t1
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
</select>
...
...
src/main/resources/mapper/CourseContentMapper.xml
View file @
9c71b83
...
...
@@ -93,7 +93,7 @@
SELECT
t.member_id,
t.vod_id,
max( t.
create_date ) AS create_date
max( t.
id ) AS id
FROM
vod_play_history t
WHERE
...
...
@@ -105,9 +105,7 @@
t.vod_id,
t.class_id
) t
LEFT JOIN vod_play_history t2 ON t.vod_id = t2.vod_id
AND t.member_id = t2.member_id
AND t.create_date = t2.create_date
LEFT JOIN vod_play_history t2 ON t.id = t2.id
) t4 ON t2.vod_id = t4.vod_id
WHERE
t.delete_date IS NULL
...
...
src/main/resources/mapper/DudaoMapper.xml
View file @
9c71b83
...
...
@@ -22,7 +22,7 @@
FROM
vod_play_history t
WHERE
DATE_FORMAT( DATE_ADD( t.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t.delete_date IS NULL
) t2 ON t.id = t2.class_id
LEFT JOIN company_dict t3 ON t.company_id = t3.id
...
...
@@ -43,7 +43,7 @@
FROM
exercise_done_result t
WHERE
DATE_FORMAT( DATE_ADD( t.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t.delete_date IS NULL
) t2 ON t.id = t2.class_id
LEFT JOIN company_dict t3 ON t.company_id = t3.id
...
...
@@ -64,7 +64,7 @@
FROM
answering_question t
WHERE
DATE_FORMAT( DATE_ADD( t.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t.delete_date IS NULL
) t2 ON t.id = t2.class_id
LEFT JOIN company_dict t3 ON t.company_id = t3.id
...
...
@@ -85,7 +85,7 @@
FROM
image_check_record t
WHERE
DATE_FORMAT( DATE_ADD( t.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t.delete_date IS NULL
AND t.result = 1
) t2 ON t.id = t2.class_id
...
...
@@ -117,7 +117,7 @@
FROM
vod_play_history t1
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND
t1.delete_date IS NULL
GROUP BY
...
...
@@ -140,7 +140,7 @@
FROM
opr_mem_dict t1
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND
t1.delete_date IS NULL
AND opr_type = "登出"
...
...
@@ -155,7 +155,7 @@
FROM
opr_mem_dict t1
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND
t1.delete_date IS NULL
AND opr_type = "登录"
...
...
@@ -179,7 +179,7 @@
WHERE
t1.delete_date IS NULL
AND t2.class_type = #{classType}
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT(
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
...
...
@@ -200,7 +200,7 @@
LEFT JOIN member t3 ON t1.ask_id = t3.id
LEFT JOIN company_dict t4 ON t2.company_id = t4.id
WHERE
DATE_FORMAT( DATE_ADD( t1.update_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.update_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND
t1.delete_date IS NULL
AND t2.delete_date IS NULL
...
...
@@ -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
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.create_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/OprAdmDictMapper.xml
View file @
9c71b83
...
...
@@ -70,7 +70,7 @@
FROM
opr_adm_dict
WHERE
create_date
<
(NOW() -interval
0
day)
create_date
<
(NOW() -interval
1
day)
</select>
</mapper>
src/main/resources/mapper/OprMemDictMapper.xml
View file @
9c71b83
...
...
@@ -52,7 +52,7 @@
FROM
opr_mem_dict
WHERE
create_date
<
(NOW() -interval
0
day)
create_date
<
(NOW() -interval
1
day)
</select>
<select
id=
"getLatestLoginInfo"
parameterType=
"long"
resultType=
"com.subsidy.model.OprMemDictDO"
>
...
...
@@ -148,62 +148,69 @@
</select>
<select
id=
"insertLastStudyRecord"
resultType=
"com.subsidy.vo.opr.InsertLastStudyRecordVO"
>
SELECT
t1.member_id,
t1.sign_in_date,
t1.ip_address,
DATE_ADD(t2.mt,INTERVAL FLOOR(RAND()*100) SECOND) as mt
FROM
(
SELECT DISTINCT
t.sign_in_date,
t.member_id,
t.ip_address
FROM
sign_in_record t
WHERE
t.delete_date IS NULL
AND DATE_FORMAT( t.sign_in_date, '%Y-%m-%d' ) = DATE_FORMAT( now(), '%Y-%m-%d' )) t1
LEFT JOIN (
SELECT
t1.member_id,
max( t1.maxtime ) AS mt
FROM
(
SELECT
member_id,
max( create_date ) AS maxtime
FROM
vod_play_history
WHERE
delete_date IS NULL
AND DATE_FORMAT( create_date, '%Y-%m-%d' ) = DATE_FORMAT( now(), '%Y-%m-%d' )
GROUP BY
member_id UNION ALL
SELECT
member_id,
max( create_date ) AS maxtime
FROM
exercise_done_result
WHERE
delete_date IS NULL
AND DATE_FORMAT( create_date, '%Y-%m-%d' ) = DATE_FORMAT( now(), '%Y-%m-%d' )
GROUP BY
member_id UNION ALL
SELECT
ask_id,
max( create_date ) AS maxtime
FROM
answering_question
WHERE
delete_date IS NULL
AND DATE_FORMAT( create_date, '%Y-%m-%d' ) = DATE_FORMAT( now(), '%Y-%m-%d' )
GROUP BY
ask_id
) t1
GROUP BY
t1.member_id
) t2 ON t1.member_id = t2.member_id
SELECT
t1.member_id,
t1.sign_in_date,
t1.ip_address,
DATE_ADD(t2.mt,INTERVAL FLOOR(RAND()*100) SECOND) as mt
FROM
(
SELECT DISTINCT
t.sign_in_date,
t.member_id,
t.ip_address
FROM
sign_in_record t
WHERE
t.delete_date IS NULL
AND DATE_FORMAT( t.sign_in_date, '%Y-%m-%d' ) = DATE_FORMAT( now(), '%Y-%m-%d' )) t1
LEFT JOIN (
SELECT
t1.member_id,
max( t1.maxtime ) AS mt
FROM
(
SELECT
member_id,
max( create_date ) AS maxtime
FROM
vod_play_history
WHERE
delete_date IS NULL
AND DATE_FORMAT( create_date, '%Y-%m-%d' ) = DATE_FORMAT( now(), '%Y-%m-%d' )
GROUP BY
member_id UNION ALL
SELECT
member_id,
max( create_date ) AS maxtime
FROM
exercise_done_result
WHERE
delete_date IS NULL
AND DATE_FORMAT( create_date, '%Y-%m-%d' ) = DATE_FORMAT( now(), '%Y-%m-%d' )
GROUP BY
member_id UNION ALL
SELECT
ask_id,
max( create_date ) AS maxtime
FROM
answering_question
WHERE
delete_date IS NULL
AND DATE_FORMAT( create_date, '%Y-%m-%d' ) = DATE_FORMAT( now(), '%Y-%m-%d' )
GROUP BY
ask_id UNION ALL
SELECT member_id,
max( create_date ) AS maxtime
from
activity_detection
where delete_date is null
and DATE_FORMAT( create_date, '%Y-%m-%d' ) = DATE_FORMAT( now(), '%Y-%m-%d' )
GROUP BY member_id
) t1
GROUP BY
t1.member_id
) t2 ON t1.member_id = t2.member_id
</select>
<select
id=
"shutdownUser"
resultType=
"long"
>
...
...
src/main/resources/mapper/RenSheJuMapper.xml
View file @
9c71b83
...
...
@@ -95,7 +95,7 @@
FROM
class_dict t1
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.create_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 != ''"
>
...
...
@@ -105,66 +105,68 @@
<select
id=
"dailyStudyInfo"
resultType=
"com.subsidy.vo.renshe.DailyStudyInfoVO"
>
SELECT
t2.class_id
as
downCode,
t2.class_id
AS
downCode,
t2.member_id,
t4.user_name
as
studentName,
t4.telephone
as
phone,
t4.id_card
as
identity,
t4.user_name
AS
studentName,
t4.telephone
AS
phone,
t4.id_card
AS
identity,
t2.learnTime,
t2.playTime,
t5.loginTime
FROM
(
SELECT
t1.class_id,
t1.member_id,
sum( t1.play_length ) AS learnTime,
sum( t1.play_length + t1.suspend_length ) AS playTime
FROM
vod_play_history t1
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
GROUP BY
t1.class_id,
t1.member_id
) t2
LEFT JOIN class_dict t3 ON t2.class_id = t3.id
LEFT JOIN member t4 ON t2.member_id = t4.id
LEFT JOIN (
SELECT
t3.user_id,
login - logout AS loginTime
FROM
(
SELECT
user_id,
sum(
unix_timestamp( t1.create_date )) AS login
FROM
opr_mem_dict t1
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
AND opr_type = "登出"
AND result = 1
GROUP BY user_id
) t3
LEFT JOIN (
SELECT
user_id,
sum(
unix_timestamp( t1.create_date )) AS logout
FROM
opr_mem_dict t1
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,interval 0 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
AND opr_type = "登录"
AND result = 1
GROUP BY user_id
) t2 ON t3.user_id = t2.user_id
) t5 ON t4.id = t5.user_id
(
SELECT
t3.user_id,
login - logout AS loginTime
FROM
(
SELECT
user_id,
sum(
unix_timestamp( t1.create_date )) AS login
FROM
opr_mem_dict t1
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
AND opr_type = "登出"
AND result = 1
GROUP BY
user_id
) t3
LEFT JOIN (
SELECT
user_id,
sum(
unix_timestamp( t1.create_date )) AS logout
FROM
opr_mem_dict t1
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
AND opr_type = "登录"
AND result = 1
GROUP BY
user_id
) t2 ON t3.user_id = t2.user_id
) t5
LEFT JOIN (
SELECT
t1.class_id,
t1.member_id,
sum( t1.play_length ) AS learnTime,
sum( t1.play_length + t1.suspend_length ) AS playTime
FROM
vod_play_history t1
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
GROUP BY
t1.class_id,
t1.member_id
) t2 ON t5.user_id = t2.member_id
LEFT JOIN class_dict t3 ON t2.class_id = t3.id
LEFT JOIN member t4 ON t2.member_id = t4.id
<if
test=
"classType != null and classType != ''"
>
where t3.class_type = #{classType}
</if>
...
...
@@ -179,7 +181,7 @@
FROM
activity_detection t1
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND
t1.delete_date IS NULL
AND t1.member_id = #{memberId}
...
...
@@ -194,7 +196,7 @@
image_check_record t1
WHERE
class_id =#{classId}
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.paper_id IS NOT NULL
and t1.result =1
AND t1.member_id=#{memberId}
...
...
@@ -212,7 +214,7 @@
FROM
opr_mem_dict t1
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
AND t1.user_id = #{memberId}
AND opr_type = "登出"
...
...
@@ -226,7 +228,7 @@
FROM
opr_mem_dict t1
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
AND t1.user_id = #{memberId}
AND opr_type = "登录"
...
...
@@ -244,7 +246,7 @@
AND t.result = 1
AND t.delete_date IS NULL
AND opr_type = "登录"
AND DATE_FORMAT( DATE_ADD( create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT(
AND DATE_FORMAT( DATE_ADD( create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
...
...
@@ -261,7 +263,7 @@
AND t.result = 1
AND t.delete_date IS NULL
AND opr_type = "登出"
AND DATE_FORMAT( DATE_ADD( create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT(
AND DATE_FORMAT( DATE_ADD( create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
...
...
@@ -295,7 +297,7 @@
WHERE
t1.delete_date IS NULL
AND t2.class_type = #{classType}
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT(
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
...
...
@@ -312,7 +314,7 @@
LEFT JOIN member t2 ON t1.member_id = t2.id
WHERE
t1.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
and class_id = #{classId}
</select>
...
...
@@ -346,7 +348,7 @@
exercise_done_result t1
WHERE
t1.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND class_id = #{classId}
AND member_id = #{memberId}
</select>
...
...
@@ -377,7 +379,7 @@
LEFT JOIN class_dict t2 ON t1.class_id = t2.id
LEFT JOIN member t3 ON t1.ask_id = t3.id
WHERE
DATE_FORMAT( DATE_ADD( t1.update_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.update_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
AND t2.delete_date IS NULL
AND t3.delete_date IS NULL
...
...
@@ -392,7 +394,7 @@
left join class_dict t2 on t.class_id = t2.id
WHERE
t.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT(
AND DATE_FORMAT( DATE_ADD( t.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
...
...
@@ -418,7 +420,7 @@
class_id = #{classId}
AND t1.delete_date IS NULL
and t2.delete_date is null
AND DATE_FORMAT( DATE_ADD( t1.update_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT(
AND DATE_FORMAT( DATE_ADD( t1.update_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
...
...
@@ -437,7 +439,7 @@
LEFT JOIN member t2 ON t1.member_id = t2.id
WHERE
class_id = #{classId}
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.paper_id IS NOT NULL
AND t1.result = 1
</select>
...
...
@@ -457,7 +459,7 @@
WHERE
t1.delete_date is null
and class_id = #{classId}
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.paper_id IS NULL
AND t1.result = 1
and t1.member_id
...
...
@@ -480,7 +482,7 @@
LEFT JOIN member t2 ON t1.member_id = t2.id
WHERE
t1.delete_date is null
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
and class_id = #{classId}
AND t1.paper_id IS not NULL
AND t1.result = 1
...
...
@@ -500,7 +502,7 @@
FROM
vod_play_history t
WHERE
DATE_FORMAT( DATE_ADD( t.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t.delete_date IS NULL
) t2 ON t.id = t2.class_id
WHERE
...
...
@@ -519,7 +521,7 @@
FROM
exercise_done_result t
WHERE
DATE_FORMAT( DATE_ADD( t.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t.delete_date IS NULL
) t2 ON t.id = t2.class_id
WHERE
...
...
@@ -538,7 +540,7 @@
FROM
answering_question t
WHERE
DATE_FORMAT( DATE_ADD( t.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t.delete_date IS NULL
) t2 ON t.id = t2.class_id
WHERE
...
...
@@ -557,7 +559,7 @@
FROM
image_check_record t
WHERE
DATE_FORMAT( DATE_ADD( t.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t.delete_date IS NULL
AND t.result = 1
) t2 ON t.id = t2.class_id
...
...
src/main/resources/mapper/SignInRecordMapper.xml
View file @
9c71b83
...
...
@@ -55,7 +55,7 @@
delete_date IS NULL
AND date(sign_in_date) = date_sub(
curdate(),
interval
0
day)
interval
1
day)
</select>
</mapper>
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