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 59dc36cf
authored
Apr 18, 2023
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oss
1 parent
589d1251
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
148 additions
and
46 deletions
src/main/java/com/subsidy/controller/CompanyDictController.java
src/main/java/com/subsidy/controller/CourseContentController.java
src/main/java/com/subsidy/service/CourseContentService.java
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java
src/main/java/com/subsidy/service/impl/CourseContentServiceImpl.java
src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java
src/main/java/com/subsidy/service/impl/ShehuihuaServiceImpl.java
src/main/java/com/subsidy/vo/course/ExportClassContentVO.java
src/main/resources/application.properties
src/main/resources/mapper/ClassDictMapper.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/controller/CompanyDictController.java
View file @
59dc36c
...
...
@@ -110,7 +110,7 @@ public class CompanyDictController {
@PostMapping
(
value
=
"getCompanyDataOverview"
)
@ApiOperation
(
"数据统计"
)
@LoginRequired
//
@LoginRequired
public
ResponseVO
getCompanyDataOverview
()
{
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
getCompanyDataOverview
());
}
...
...
src/main/java/com/subsidy/controller/CourseContentController.java
View file @
59dc36c
...
...
@@ -8,6 +8,8 @@ import com.subsidy.dto.vod.ChangeOrdersDTO;
import
com.subsidy.model.CourseContentDO
;
import
com.subsidy.service.CourseContentService
;
import
com.subsidy.util.ConstantUtils
;
import
com.subsidy.util.excel.ExcelUtil
;
import
com.subsidy.vo.course.ExportClassContentVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -16,14 +18,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* <p>
* 课程目录表 前端控制器
* </p>
*
* @author DengMin
* @since 2021-10-11
*/
import
java.util.List
;
@RestController
@Api
(
tags
=
"课程目录表"
)
@RequestMapping
(
"/courseContent"
)
...
...
@@ -59,4 +55,13 @@ public class CourseContentController {
public
ResponseVO
updateContent
(
@RequestBody
CourseContentDO
courseContentDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseContentService
.
updateContent
(
courseContentDO
));
}
@PostMapping
(
"exportClassContent"
)
@ApiOperation
(
"导出课程章节内容+视频 courseId 课程id"
)
// @LoginRequired
public
void
exportClassContent
(
@RequestBody
CourseContentDO
courseContentDO
){
List
<
ExportClassContentVO
>
exportClassContentVOS
=
courseContentService
.
exportClassContent
(
courseContentDO
);
ExcelUtil
.
writeExcel
(
exportClassContentVOS
,
ExportClassContentVO
.
class
);
}
}
src/main/java/com/subsidy/service/CourseContentService.java
View file @
59dc36c
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.subsidy.dto.content.GetContendVodsDTO
;
import
com.subsidy.dto.vod.ChangeOrdersDTO
;
import
com.subsidy.model.CourseContentDO
;
import
com.subsidy.vo.course.ExportClassContentVO
;
import
com.subsidy.vo.vod.GetContendVodsVO
;
import
java.util.List
;
...
...
@@ -25,4 +26,6 @@ public interface CourseContentService extends IService<CourseContentDO> {
String
addContent
(
CourseContentDO
courseContentDO
);
String
updateContent
(
CourseContentDO
courseContentDO
);
List
<
ExportClassContentVO
>
exportClassContent
(
CourseContentDO
courseContentDO
);
}
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
View file @
59dc36c
...
...
@@ -1353,6 +1353,8 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
//不带声调
format
.
setToneType
(
HanyuPinyinToneType
.
WITHOUT_TONE
);
List
<
ImportMemberDTO
>
failMembers
=
new
ArrayList
<>();
ExcelUtil
.
readExcelWithoutTitle
(
null
,
ImportMemberDTO
.
class
,
multipartFile
).
forEach
(
s
->
{
MemberDO
memberDO
=
memberMapper
.
selectOne
(
new
QueryWrapper
<
MemberDO
>()
...
...
@@ -1360,7 +1362,9 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
.
eq
(
MemberDO:
:
getTelephone
,
s
.
getTelephone
()));
if
(
null
!=
memberDO
)
{
//memberDOS.add(memberDO);
ImportMemberDTO
importMemberDTO
=
new
ImportMemberDTO
();
BeanUtils
.
copyProperties
(
memberDO
,
importMemberDTO
);
failMembers
.
add
(
importMemberDTO
);
}
else
{
MemberDO
memberDO1
=
new
MemberDO
();
memberDO1
.
setUserName
(
s
.
getUserName
());
...
...
src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java
View file @
59dc36c
...
...
@@ -243,6 +243,12 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
classTypeDictDO
.
setClassType
(
"企业内训"
);
classTypeDictDO
.
setCompanyId
(
companyDictDO
.
getId
());
classTypeDictMapper
.
insert
(
classTypeDictDO
);
classTypeDictDO
.
setClassType
(
"社会化、学徒制"
);
classTypeDictMapper
.
insert
(
classTypeDictDO
);
classTypeDictDO
.
setClassType
(
"补贴培训"
);
classTypeDictMapper
.
insert
(
classTypeDictDO
);
return
ConstantUtils
.
ADD_SUCCESS
;
}
...
...
src/main/java/com/subsidy/service/impl/CourseContentServiceImpl.java
View file @
59dc36c
...
...
@@ -3,11 +3,22 @@ package com.subsidy.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.subsidy.common.exception.HttpException
;
import
com.subsidy.dto.administer.SelfExportVO
;
import
com.subsidy.mapper.CourseContentMapper
;
import
com.subsidy.mapper.CourseDictMapper
;
import
com.subsidy.mapper.VodDictMapper
;
import
com.subsidy.model.CourseContentDO
;
import
com.subsidy.model.CourseDictDO
;
import
com.subsidy.service.CourseContentService
;
import
com.subsidy.util.ConstantUtils
;
import
com.subsidy.util.MathUtil
;
import
com.subsidy.util.excel.ExcelUtil
;
import
com.subsidy.vo.course.ExportClassContentVO
;
import
com.subsidy.vo.vod.GetContendVodsVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
...
...
@@ -21,6 +32,12 @@ import java.util.List;
@Service
public
class
CourseContentServiceImpl
extends
ServiceImpl
<
CourseContentMapper
,
CourseContentDO
>
implements
CourseContentService
{
@Autowired
private
VodDictMapper
vodDictMapper
;
@Autowired
private
CourseDictMapper
courseDictMapper
;
@Override
public
List
<
CourseContentDO
>
getContents
(
CourseContentDO
courseContentDO
)
{
return
this
.
baseMapper
.
selectList
(
new
QueryWrapper
<
CourseContentDO
>()
...
...
@@ -31,20 +48,20 @@ public class CourseContentServiceImpl extends ServiceImpl<CourseContentMapper, C
}
@Override
public
String
deleteContent
(
CourseContentDO
courseContentDO
){
public
String
deleteContent
(
CourseContentDO
courseContentDO
)
{
this
.
baseMapper
.
deleteById
(
courseContentDO
.
getId
());
return
ConstantUtils
.
DELETE_SUCCESS
;
}
@Override
public
String
addContent
(
CourseContentDO
courseContentDO
){
public
String
addContent
(
CourseContentDO
courseContentDO
)
{
Integer
orderNoTmp
=
this
.
baseMapper
.
selectMaxOrderNo
(
courseContentDO
.
getCourseId
());
int
orderNo
=
1
;
int
orderNo
=
1
;
if
(
null
!=
orderNoTmp
)
{
orderNo
=
orderNoTmp
+
1
;
if
(
null
!=
orderNoTmp
)
{
orderNo
=
orderNoTmp
+
1
;
}
courseContentDO
.
setOrderNo
(
orderNo
);
this
.
baseMapper
.
insert
(
courseContentDO
);
...
...
@@ -52,19 +69,59 @@ public class CourseContentServiceImpl extends ServiceImpl<CourseContentMapper, C
}
@Override
public
String
updateContent
(
CourseContentDO
courseContentDO
){
public
String
updateContent
(
CourseContentDO
courseContentDO
)
{
int
count
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
CourseContentDO
>()
.
lambda
()
.
eq
(
CourseContentDO:
:
getCourseId
,
courseContentDO
.
getCourseId
())
.
eq
(
CourseContentDO:
:
getContent
,
courseContentDO
.
getContent
())
.
ne
(
CourseContentDO:
:
getId
,
courseContentDO
.
getId
()));
.
eq
(
CourseContentDO:
:
getCourseId
,
courseContentDO
.
getCourseId
())
.
eq
(
CourseContentDO:
:
getContent
,
courseContentDO
.
getContent
())
.
ne
(
CourseContentDO:
:
getId
,
courseContentDO
.
getId
()));
if
(
count
>
0
)
{
if
(
count
>
0
)
{
throw
new
HttpException
(
40001
);
}
this
.
baseMapper
.
updateById
(
courseContentDO
);
return
ConstantUtils
.
SET_SUCCESS
;
}
public
List
<
ExportClassContentVO
>
exportClassContent
(
CourseContentDO
courseContentDO
)
{
List
<
ExportClassContentVO
>
exportClassContentVOS
=
new
ArrayList
<
ExportClassContentVO
>();
CourseDictDO
courseDictDO
=
courseDictMapper
.
selectById
(
courseContentDO
.
getCourseId
());
List
<
CourseContentDO
>
courseContentDOS
=
this
.
baseMapper
.
selectList
(
new
QueryWrapper
<
CourseContentDO
>()
.
lambda
()
.
eq
(
CourseContentDO:
:
getCourseId
,
courseContentDO
.
getCourseId
())
.
orderByAsc
(
CourseContentDO:
:
getOrderNo
)
.
orderByAsc
(
CourseContentDO:
:
getCreateDate
));
int
totalLength
=
0
;
for
(
CourseContentDO
ccd
:
courseContentDOS
)
{
List
<
GetContendVodsVO
>
contendVods
=
vodDictMapper
.
getContendVods
(
null
,
ccd
.
getId
());
for
(
GetContendVodsVO
cvv
:
contendVods
)
{
ExportClassContentVO
exportClassContentVO
=
new
ExportClassContentVO
();
exportClassContentVO
.
setCourseName
(
courseDictDO
.
getCourseName
());
exportClassContentVO
.
setContent
(
ccd
.
getContent
());
exportClassContentVO
.
setVodAliasName
(
cvv
.
getVodAliasName
());
exportClassContentVO
.
setVodLength
(
MathUtil
.
vodLength
(
cvv
.
getVodLength
()));
totalLength
+=
cvv
.
getVodLength
();
exportClassContentVOS
.
add
(
exportClassContentVO
);
}
}
//总时长(时分秒)
String
totalLengthTmp
=
MathUtil
.
secToTime
(
totalLength
);
//总时长(分钟)
String
totalMinute
=
MathUtil
.
ceilSecond
(
totalLength
);
exportClassContentVOS
.
stream
().
forEach
(
x
->
{
x
.
setTotalLength
(
totalLengthTmp
);
x
.
setTotalMinute
(
totalMinute
);
});
return
exportClassContentVOS
;
}
}
src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java
View file @
59dc36c
...
...
@@ -161,7 +161,7 @@ public class RenSheJuServiceImpl implements RenSheJuService {
loginList
.
setEndTime
(
Timestamp
.
valueOf
(
loginOutRecords
.
get
(
i
).
getCreateDate
()).
getTime
());
//查看这个人该时间段的学习记录
List
<
ChapterList3
>
chapterList3s
=
renSheJuMapper
.
dailyStudyRecords
(
dailyStudyInfoVO
.
getMemberId
(),
dailyStudyInfoVO
.
getDownCode
(),
loginRecords
.
get
(
0
).
getCreateDate
().
toString
().
replace
(
"T"
,
" "
),
loginOutRecords
.
get
(
i
).
getCreateDate
().
toString
().
replace
(
"T"
,
" "
));
List
<
ChapterList3
>
chapterList3s
=
renSheJuMapper
.
dailyStudyRecords
(
dailyStudyInfoVO
.
getMemberId
(),
dailyStudyInfoVO
.
getDownCode
(),
loginRecords
.
get
(
i
).
getCreateDate
().
toString
().
replace
(
"T"
,
" "
),
loginOutRecords
.
get
(
i
).
getCreateDate
().
toString
().
replace
(
"T"
,
" "
));
if
(
chapterList3s
.
size
()
>
0
)
{
loginList
.
setChapterList
(
chapterList3s
);
loginLists
.
add
(
loginList
);
...
...
src/main/java/com/subsidy/service/impl/ShehuihuaServiceImpl.java
View file @
59dc36c
...
...
@@ -201,7 +201,7 @@ public class ShehuihuaServiceImpl implements ShehuihuaService {
loginList
.
setEndTime
(
Timestamp
.
valueOf
(
loginOutRecords
.
get
(
i
).
getCreateDate
()).
getTime
());
//查看这个人该时间段的学习记录
List
<
ChapterList3
>
chapterList3s
=
renSheJuMapper
.
dailyStudyRecords
(
dailyStudyInfoVO
.
getMemberId
(),
dailyStudyInfoVO
.
getDownCode
(),
loginRecords
.
get
(
0
).
getCreateDate
().
toString
().
replace
(
"T"
,
" "
),
loginOutRecords
.
get
(
i
).
getCreateDate
().
toString
().
replace
(
"T"
,
" "
));
List
<
ChapterList3
>
chapterList3s
=
renSheJuMapper
.
dailyStudyRecords
(
dailyStudyInfoVO
.
getMemberId
(),
dailyStudyInfoVO
.
getDownCode
(),
loginRecords
.
get
(
i
).
getCreateDate
().
toString
().
replace
(
"T"
,
" "
),
loginOutRecords
.
get
(
i
).
getCreateDate
().
toString
().
replace
(
"T"
,
" "
));
if
(
chapterList3s
.
size
()
>
0
)
{
loginList
.
setChapterList
(
chapterList3s
);
loginLists
.
add
(
loginList
);
...
...
src/main/java/com/subsidy/vo/course/ExportClassContentVO.java
0 → 100644
View file @
59dc36c
package
com
.
subsidy
.
vo
.
course
;
import
com.subsidy.util.excel.ExcelColumn
;
import
lombok.Data
;
@Data
public
class
ExportClassContentVO
{
@ExcelColumn
(
col
=
1
,
value
=
"课程名"
)
private
String
courseName
;
@ExcelColumn
(
col
=
2
,
value
=
"总时长(时分秒)"
)
private
String
totalLength
;
@ExcelColumn
(
col
=
3
,
value
=
"总时长(分钟)"
)
private
String
totalMinute
;
@ExcelColumn
(
col
=
4
,
value
=
"章节"
)
private
String
content
;
@ExcelColumn
(
col
=
5
,
value
=
"视频名称"
)
private
String
vodAliasName
;
@ExcelColumn
(
col
=
6
,
value
=
"视频长度"
)
private
String
vodLength
;
}
src/main/resources/application.properties
View file @
59dc36c
# 环境配置
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 @
59dc36c
...
...
@@ -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
2
DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
</select>
...
...
src/main/resources/mapper/OprAdmDictMapper.xml
View file @
59dc36c
...
...
@@ -70,7 +70,7 @@
FROM
opr_adm_dict
WHERE
create_date
<
(NOW() - INTERVAL
1
DAY)
create_date
<
(NOW() - INTERVAL
2
DAY)
</select>
</mapper>
src/main/resources/mapper/OprMemDictMapper.xml
View file @
59dc36c
...
...
@@ -52,7 +52,7 @@
FROM
opr_mem_dict
WHERE
create_date
<
(NOW() - INTERVAL
1
DAY)
create_date
<
(NOW() - INTERVAL
2
DAY)
</select>
<select
id=
"getLatestLoginInfo"
parameterType=
"long"
resultType=
"com.subsidy.model.OprMemDictDO"
>
...
...
src/main/resources/mapper/RenSheJuMapper.xml
View file @
59dc36c
...
...
@@ -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
2
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
2
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
2
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
2
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
2
DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
AND t1.member_id = #{memberId}
AND t1.class_id = #{classId}
...
...
@@ -193,7 +193,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
2
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}
...
...
@@ -211,7 +211,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
2
DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
AND t1.user_id = #{memberId}
AND opr_type = "登出"
...
...
@@ -225,7 +225,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
2
DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
AND t1.user_id = #{memberId}
AND opr_type = "登录"
...
...
@@ -243,7 +243,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
2
DAY ), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
...
...
@@ -259,7 +259,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
2
DAY ), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
...
...
@@ -290,7 +290,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(
AND DATE_FORMAT( DATE_ADD( t1.create_date, INTERVAL
2
DAY ), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
...
...
@@ -307,7 +307,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
2
DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
And class_id = #{classId}
</select>
...
...
@@ -341,7 +341,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
2
DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND class_id = #{classId}
AND member_id = #{memberId}
</select>
...
...
@@ -372,7 +372,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
2
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
...
...
@@ -386,7 +386,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
2
DAY ), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
...
...
@@ -412,7 +412,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
2
DAY ), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
...
...
@@ -431,7 +431,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
2
DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.paper_id IS NOT NULL
AND t1.result = 1
</select>
...
...
@@ -451,7 +451,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
2
DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.paper_id IS NULL
AND t1.result = 1
and t1.member_id
...
...
@@ -474,7 +474,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
2
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
...
...
src/main/resources/mapper/SignInRecordMapper.xml
View file @
59dc36c
...
...
@@ -55,7 +55,7 @@
delete_date IS NULL
AND date(sign_in_date) = date_sub(
curdate(),
INTERVAL
1
DAY)
INTERVAL
2
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