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 01bc5cbc
authored
Jun 01, 2023
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补贴培训第一次上课
1 parent
7944d5ce
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
124 additions
and
76 deletions
src/main/java/com/subsidy/jobs/DudaoJob.java
src/main/java/com/subsidy/jobs/RenSheJuJob.java
src/main/java/com/subsidy/jobs/ShehuihuaJob.java
src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java
src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java
src/main/resources/application.properties
src/main/resources/mapper/ClassDictMapper.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/DudaoJob.java
View file @
01bc5cb
...
...
@@ -2,6 +2,7 @@
//
//import com.subsidy.service.DudaoService;
//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;
//
...
...
@@ -13,33 +14,45 @@
//@Component
//public class DudaoJob {
//
// @Value("${spring.profiles.active}")
// private String env;
//
// @Autowired
// private DudaoService dudaoService;
//
// @Scheduled(cron = "0 0 2 * * ?")
// public void classBaseInfo() throws IOException {
// dudaoService.classBaseInfo();
// if ("prod".equals(env)){
// dudaoService.classBaseInfo();
// }
// }
//
// @Scheduled(cron = "0 5 2 * * ?")
// public void classHourBehavior() throws IOException {
// dudaoService.classHourBehavior();
// if ("prod".equals(env)){
// dudaoService.classHourBehavior();
// }
// }
//
// @Scheduled(cron = "0 10 2 * * ?")
// public void uploadChapterBehavior() throws IOException {
// dudaoService.uploadChapterBehavior();
// if ("prod".equals(env)){
// dudaoService.uploadChapterBehavior();
// }
// }
//
// @Scheduled(cron = "0 15 2 * * ?")
// public void uploadClassAnswerQuestionBehavior() throws IOException {
// dudaoService.uploadClassAnswerQuestionBehavior();
// if ("prod".equals(env)){
// dudaoService.uploadClassAnswerQuestionBehavior();
// }
// }
//
// @Scheduled(cron = "0 20 2 * * ?")
// public void uploadClassCode()throws IOException {
// dudaoService.uploadClassCode();
// if ("prod".equals(env)){
// dudaoService.uploadClassCode();
// }
// }
//
//}
src/main/java/com/subsidy/jobs/RenSheJuJob.java
View file @
01bc5cb
...
...
@@ -9,6 +9,7 @@ import com.subsidy.util.IpAddressUtil;
import
com.subsidy.util.websocket.WebSocketUtil
;
import
com.subsidy.vo.opr.InsertLastStudyRecordVO
;
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
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -35,12 +36,18 @@ public class RenSheJuJob {
@Autowired
private
OprMemDictMapper
oprMemDictMapper
;
@Value
(
"${spring.profiles.active}"
)
private
String
env
;
/**
* POST-2:班级基本信息信息采集接口
*/
@Scheduled
(
cron
=
"0 0 1 * * ?"
)
public
void
classBaseInfo
()
throws
IOException
{
renSheJuService
.
classBaseInfo
();
if
(
"prod"
.
equals
(
env
)){
renSheJuService
.
classBaseInfo
();
}
}
/**
...
...
@@ -48,7 +55,9 @@ public class RenSheJuJob {
*/
@Scheduled
(
cron
=
"0 5 1 * * ?"
)
public
void
classHourBehavior
()
throws
IOException
{
renSheJuService
.
classHourBehavior
();
if
(
"prod"
.
equals
(
env
)){
renSheJuService
.
classHourBehavior
();
}
}
/**
...
...
@@ -56,7 +65,9 @@ public class RenSheJuJob {
*/
@Scheduled
(
cron
=
"0 10 1 * * ?"
)
public
void
uploadChapterBehavior
()
throws
IOException
{
renSheJuService
.
uploadChapterBehavior
();
if
(
"prod"
.
equals
(
env
)){
renSheJuService
.
uploadChapterBehavior
();
}
}
/**
...
...
@@ -64,7 +75,9 @@ public class RenSheJuJob {
*/
@Scheduled
(
cron
=
"0 15 1 * * ?"
)
public
void
uploadClassAnswerQuestionBehavior
()
throws
IOException
{
renSheJuService
.
uploadClassAnswerQuestionBehavior
();
if
(
"prod"
.
equals
(
env
)){
renSheJuService
.
uploadClassAnswerQuestionBehavior
();
}
}
/**
...
...
@@ -72,7 +85,9 @@ public class RenSheJuJob {
*/
@Scheduled
(
cron
=
"0 20 1 * * ?"
)
public
void
uploadImage
()
throws
IOException
{
renSheJuService
.
uploadImage
();
if
(
"prod"
.
equals
(
env
)){
renSheJuService
.
uploadImage
();
}
}
/**
...
...
@@ -80,7 +95,9 @@ public class RenSheJuJob {
*/
@Scheduled
(
cron
=
"0 25 1 * * ?"
)
public
void
getClassCodeByPrivateKey
()
throws
IOException
{
renSheJuService
.
getClassCodeByPrivateKey
();
if
(
"prod"
.
equals
(
env
)){
renSheJuService
.
getClassCodeByPrivateKey
();
}
}
/**
...
...
@@ -88,7 +105,9 @@ public class RenSheJuJob {
*/
@Scheduled
(
cron
=
"0 30 1 * * ?"
)
public
void
uploadClassCode
()
throws
IOException
{
renSheJuService
.
uploadClassCode
();
if
(
"prod"
.
equals
(
env
)){
renSheJuService
.
uploadClassCode
();
}
}
// /**
...
...
@@ -121,7 +140,7 @@ public class RenSheJuJob {
}
@Scheduled
(
cron
=
"00 5
5 23
* * ?"
)
@Scheduled
(
cron
=
"00 5
0 18
* * ?"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
cancelLogin
()
{
...
...
src/main/java/com/subsidy/jobs/ShehuihuaJob.java
View file @
01bc5cb
package
com
.
subsidy
.
jobs
;
import
com.subsidy.service.ShehuihuaService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
java.io.IOException
;
/**`
* 社会化、学徒制数据推送
*/
@Component
public
class
ShehuihuaJob
{
//package com.subsidy.jobs;
//
//import com.subsidy.service.ShehuihuaService;
//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;
//
///**`
// * 社会化、学徒制数据推送
// */
//@Component
//public class ShehuihuaJob {
//
// @Value("${spring.profiles.active}")
// private String env;
//
// @Autowired
// private ShehuihuaService shehuihuaService;
//
...
...
@@ -22,7 +25,9 @@ public class ShehuihuaJob {
// */
// @Scheduled(cron = "0 0 2 * * ?")
// public void getClassCodeByPrivateKey()throws IOException {
// shehuihuaService.getClassCodeByPrivateKey();
// if ("prod".equals(env)){
// shehuihuaService.getClassCodeByPrivateKey();
// }
// }
//
// /**
...
...
@@ -30,7 +35,9 @@ public class ShehuihuaJob {
// */
// @Scheduled(cron = "0 5 2 * * ?")
// public void uploadClass() throws IOException {
// shehuihuaService.uploadClass();
// if ("prod".equals(env)){
// shehuihuaService.uploadClass();
// }
// }
//
// /**
...
...
@@ -38,7 +45,9 @@ public class ShehuihuaJob {
// */
// @Scheduled(cron = "0 10 2 * * ?")
// public void classHourBehavior() throws IOException {
// shehuihuaService.classHourBehavior();
// if ("prod".equals(env)){
// shehuihuaService.classHourBehavior();
// }
// }
//
// /**
...
...
@@ -46,7 +55,9 @@ public class ShehuihuaJob {
// */
// @Scheduled(cron = "0 15 2 * * ?")
// public void uploadChapterBehavior() throws IOException {
// shehuihuaService.uploadChapterBehavior();
// if ("prod".equals(env)){
// shehuihuaService.uploadChapterBehavior();
// }
// }
//
// /**
...
...
@@ -54,7 +65,9 @@ public class ShehuihuaJob {
// */
// @Scheduled(cron = "0 20 2 * * ?")
// public void uploadClassAnswerQuestionBehavior()throws IOException {
// shehuihuaService.uploadClassAnswerQuestionBehavior();
// if ("prod".equals(env)){
// shehuihuaService.uploadClassAnswerQuestionBehavior();
// }
// }
//
// /**
...
...
@@ -62,7 +75,9 @@ public class ShehuihuaJob {
// */
// @Scheduled(cron = "0 25 2 * * ?")
// public void uploadImage()throws IOException {
// shehuihuaService.uploadImage();
// if ("prod".equals(env)){
// shehuihuaService.uploadImage();
// }
// }
}
//
//
}
src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java
View file @
01bc5cb
...
...
@@ -122,6 +122,7 @@ public class RenSheJuServiceImpl implements RenSheJuService {
}
renshejuHistoryMapper
.
insert
(
renshejuHistoryDO
);
return
rensheResponseVO
;
// return null;
}
else
{
RenshejuHistoryDO
renshejuHistoryDO
=
new
RenshejuHistoryDO
();
renshejuHistoryDO
.
setInterfaceName
(
RenSheJuConstant
.
POST_2
);
...
...
src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java
View file @
01bc5cb
...
...
@@ -633,7 +633,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
public
HashSet
<
Long
>
testPlays
(
VodPlayHistoryDO
vodPlayHistoryDO
)
{
String
classIds
=
"40
0
"
;
String
classIds
=
"40
2
"
;
String
[]
classIdArr
=
classIds
.
split
(
","
);
...
...
src/main/resources/application.properties
View file @
01bc5cb
# 环境配置
spring.profiles.active
=
dev
spring.profiles.active
=
prod
#和CPU数
spring.server.acceptorThreadCount
=
600
spring.server.minSpareThreads
=
100
...
...
src/main/resources/mapper/ClassDictMapper.xml
View file @
01bc5cb
...
...
@@ -256,7 +256,7 @@
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' )
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
</select>
...
...
src/main/resources/mapper/DudaoMapper.xml
View file @
01bc5cb
...
...
@@ -22,7 +22,7 @@
FROM
vod_play_history t
WHERE
DATE_FORMAT( DATE_ADD( t.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t.create_date,interval
0
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
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t.create_date,interval
0
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
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t.create_date,interval
0
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
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t.create_date,interval
0
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
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
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
...
...
@@ -140,7 +140,7 @@
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' )
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 = "登出"
...
...
@@ -155,7 +155,7 @@
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' )
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 = "登录"
...
...
@@ -179,7 +179,7 @@
WHERE
t1.delete_date IS NULL
AND t2.class_type = #{classType}
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT(
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
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
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.update_date,interval
0
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
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
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 t1.class_code is not NULL
<if
test=
"classType != null and classType != ''"
>
...
...
src/main/resources/mapper/OprAdmDictMapper.xml
View file @
01bc5cb
...
...
@@ -70,7 +70,7 @@
FROM
opr_adm_dict
WHERE
create_date
<
(NOW() -interval
1
day)
create_date
<
(NOW() -interval
0
day)
</select>
</mapper>
src/main/resources/mapper/OprMemDictMapper.xml
View file @
01bc5cb
...
...
@@ -52,7 +52,7 @@
FROM
opr_mem_dict
WHERE
create_date
<
(NOW() -interval
1
day)
create_date
<
(NOW() -interval
0
day)
</select>
<select
id=
"getLatestLoginInfo"
parameterType=
"long"
resultType=
"com.subsidy.model.OprMemDictDO"
>
...
...
src/main/resources/mapper/RenSheJuMapper.xml
View file @
01bc5cb
...
...
@@ -95,7 +95,7 @@
FROM
class_dict t1
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.create_date,interval
0
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 != ''"
>
...
...
@@ -123,7 +123,7 @@
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' )
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,
...
...
@@ -144,7 +144,7 @@
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' )
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
...
...
@@ -158,7 +158,7 @@
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' )
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
...
...
@@ -179,7 +179,7 @@
FROM
activity_detection t1
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.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND
t1.delete_date IS NULL
AND t1.member_id = #{memberId}
...
...
@@ -194,7 +194,7 @@
image_check_record t1
WHERE
class_id =#{classId}
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
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 +212,7 @@
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' )
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 t1.user_id = #{memberId}
AND opr_type = "登出"
...
...
@@ -226,7 +226,7 @@
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' )
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 t1.user_id = #{memberId}
AND opr_type = "登录"
...
...
@@ -244,7 +244,7 @@
AND t.result = 1
AND t.delete_date IS NULL
AND opr_type = "登录"
AND DATE_FORMAT( DATE_ADD( create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT(
AND DATE_FORMAT( DATE_ADD( create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
...
...
@@ -261,7 +261,7 @@
AND t.result = 1
AND t.delete_date IS NULL
AND opr_type = "登出"
AND DATE_FORMAT( DATE_ADD( create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT(
AND DATE_FORMAT( DATE_ADD( create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
...
...
@@ -295,7 +295,7 @@
WHERE
t1.delete_date IS NULL
AND t2.class_type = #{classType}
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT(
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
...
...
@@ -312,7 +312,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
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
and class_id = #{classId}
</select>
...
...
@@ -346,7 +346,7 @@
exercise_done_result t1
WHERE
t1.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND class_id = #{classId}
AND member_id = #{memberId}
</select>
...
...
@@ -377,7 +377,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
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.update_date,interval
0
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 +392,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
1
day), '%Y-%m-%d' ) = DATE_FORMAT(
AND DATE_FORMAT( DATE_ADD( t.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
...
...
@@ -418,7 +418,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
1
day), '%Y-%m-%d' ) = DATE_FORMAT(
AND DATE_FORMAT( DATE_ADD( t1.update_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
...
...
@@ -437,7 +437,7 @@
LEFT JOIN member t2 ON t1.member_id = t2.id
WHERE
class_id = #{classId}
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.paper_id IS NOT NULL
AND t1.result = 1
</select>
...
...
@@ -457,7 +457,7 @@
WHERE
t1.delete_date is null
and class_id = #{classId}
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
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 +480,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
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t1.create_date,interval
0
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 +500,7 @@
FROM
vod_play_history t
WHERE
DATE_FORMAT( DATE_ADD( t.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t.create_date,interval
0
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 +519,7 @@
FROM
exercise_done_result t
WHERE
DATE_FORMAT( DATE_ADD( t.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t.create_date,interval
0
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 +538,7 @@
FROM
answering_question t
WHERE
DATE_FORMAT( DATE_ADD( t.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t.create_date,interval
0
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 +557,7 @@
FROM
image_check_record t
WHERE
DATE_FORMAT( DATE_ADD( t.create_date,interval
1
day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t.create_date,interval
0
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 @
01bc5cb
...
...
@@ -55,7 +55,7 @@
delete_date IS NULL
AND date(sign_in_date) = date_sub(
curdate(),
interval
1
day)
interval
0
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