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 c3ddb3a9
authored
Nov 03, 2021
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上线版本
1 parent
feb94308
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
171 additions
and
63 deletions
src/main/java/com/subsidy/controller/AdministerController.java
src/main/java/com/subsidy/controller/MemberController.java
src/main/java/com/subsidy/dto/administer/ClassDetailDTO.java
src/main/java/com/subsidy/dto/sign/ClassSignInfoDTO.java
src/main/java/com/subsidy/service/AdministerService.java
src/main/java/com/subsidy/service/MemberService.java
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
src/main/java/com/subsidy/service/impl/MemberServiceImpl.java
src/main/java/com/subsidy/service/impl/SignInRecordServiceImpl.java
src/main/java/com/subsidy/util/excel/ExcelUtil.java
src/main/java/com/subsidy/vo/administer/ExerciseTestVO.java
src/main/java/com/subsidy/vo/classdict/ClassDetailVO.java
src/main/java/com/subsidy/vo/member/ClassSignVO.java
src/main/java/com/subsidy/vo/member/ContentVodNewVO.java
src/main/java/com/subsidy/vo/member/StudyPageVO.java
src/main/resources/application.properties
src/main/resources/code.properties
src/main/resources/mapper/AdministerMapper.xml
src/main/resources/mapper/ClassDictMapper.xml
src/main/resources/mapper/MemberMapper.xml
src/main/resources/mapper/VodPlayHistoryMapper.xml
src/main/java/com/subsidy/controller/AdministerController.java
View file @
c3ddb3a
...
...
@@ -24,6 +24,7 @@ import io.swagger.annotations.Api;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Arrays
;
import
java.util.List
;
/**
...
...
@@ -83,14 +84,14 @@ public class AdministerController {
@PostMapping
(
"classSummary"
)
@ApiOperation
(
"课程汇总 id 班级id "
)
//
@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
classSummary
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classSummary
(
classDetailDTO
));
}
@PostMapping
(
"classDetail"
)
@ApiOperation
(
"班级管理--班级成员 id 班级id userName"
)
//
@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
classDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classDetail
(
classDetailDTO
));
}
...
...
@@ -98,9 +99,9 @@ public class AdministerController {
@PostMapping
(
"exportClassDetail"
)
@ApiOperation
(
"班级管理--班级成员--导出 id 班级id userName"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
void
exportClassDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
List
<
ClassDetailVO
>
classDetailVOS
=
administerService
.
exportClassDetail
(
classDetailDTO
);
ExcelUtil
.
writeExcel
(
classDetailVOS
,
ClassDetailVO
.
class
);
public
void
exportClassDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
classDetailDTO
.
setFlag
(
true
);
administerService
.
exportClassDetail
(
classDetailDTO
);
}
@PostMapping
(
"signDetail"
)
...
...
@@ -113,9 +114,9 @@ public class AdministerController {
@PostMapping
(
"exportSignDetail"
)
@ApiOperation
(
"班级管理--注册签到 id 班级id userName"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
void
exportSignDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
List
<
ClassSignVO
>
classSignVOS
=
administerService
.
exportSignDetail
(
classDetailDTO
);
ExcelUtil
.
writeExcel
(
classSignVOS
,
ClassSignVO
.
class
);
public
void
exportSignDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
classDetailDTO
.
setFlag
(
true
);
administerService
.
exportSignDetail
(
classDetailDTO
);
}
@PostMapping
(
"exerciseTest"
)
...
...
@@ -128,9 +129,9 @@ public class AdministerController {
@PostMapping
(
"exportExerciseTest"
)
@ApiOperation
(
"班级管理--测评成绩 id 班级id userName"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
void
exportExerciseTest
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
List
<
ExerciseTestVO
>
exerciseTestVOS
=
administerService
.
exportExerciseTest
(
classDetailDTO
);
ExcelUtil
.
writeExcel
(
exerciseTestVOS
,
ExerciseTestVO
.
class
);
public
void
exportExerciseTest
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
classDetailDTO
.
setFlag
(
true
);
administerService
.
exportExerciseTest
(
classDetailDTO
);
}
@PostMapping
(
"answerRecord"
)
...
...
@@ -143,9 +144,9 @@ public class AdministerController {
@PostMapping
(
"exportAnswerRecord"
)
@ApiOperation
(
"班级管理--答疑 id 班级id userName"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
void
exportAnswerRecord
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
List
<
AnswerRecordVO
>
answerRecordVOS
=
administerService
.
exportAnswerRecord
(
classDetailDTO
);
ExcelUtil
.
writeExcel
(
answerRecordVOS
,
AnswerRecordVO
.
class
);
public
void
exportAnswerRecord
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
classDetailDTO
.
setFlag
(
true
);
administerService
.
exportAnswerRecord
(
classDetailDTO
);
}
@PostMapping
(
"exportZip"
)
...
...
src/main/java/com/subsidy/controller/MemberController.java
View file @
c3ddb3a
...
...
@@ -61,7 +61,7 @@ public class MemberController {
@PostMapping
(
"updateMember"
)
@ApiOperation
(
"编辑成员 {id departmentId userName accountName telephone gender image idCard status}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
//
@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
public
ResponseVO
updateMember
(
@RequestBody
AddMemberDTO
addMemberDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
updateMember
(
addMemberDTO
));
}
...
...
src/main/java/com/subsidy/dto/administer/ClassDetailDTO.java
View file @
c3ddb3a
...
...
@@ -13,4 +13,6 @@ public class ClassDetailDTO {
private
String
userName
;
Boolean
flag
;
}
src/main/java/com/subsidy/dto/sign/ClassSignInfoDTO.java
View file @
c3ddb3a
...
...
@@ -14,6 +14,6 @@ public class ClassSignInfoDTO {
private
Integer
pageNum
;
private
Integer
i
d
;
private
Integer
companyI
d
;
}
src/main/java/com/subsidy/service/AdministerService.java
View file @
c3ddb3a
...
...
@@ -42,22 +42,22 @@ public interface AdministerService extends IService<AdministerDO> {
IPage
classDetail
(
ClassDetailDTO
classDetailDTO
);
List
<
ClassDetailVO
>
exportClassDetail
(
ClassDetailDTO
classDetailDTO
);
List
<
ClassDetailVO
>
exportClassDetail
(
ClassDetailDTO
classDetailDTO
)
throws
Exception
;
IPage
signDetail
(
ClassDetailDTO
classDetailDTO
);
List
<
ClassSignVO
>
exportSignDetail
(
ClassDetailDTO
classDetailDTO
);
List
<
ClassSignVO
>
exportSignDetail
(
ClassDetailDTO
classDetailDTO
)
throws
Exception
;
IPage
exerciseTest
(
ClassDetailDTO
classDetailDTO
);
List
<
ExerciseTestVO
>
exportExerciseTest
(
ClassDetailDTO
classDetailDTO
);
List
<
ExerciseTestVO
>
exportExerciseTest
(
ClassDetailDTO
classDetailDTO
)
throws
Exception
;
IPage
answerRecord
(
ClassDetailDTO
classDetailDTO
);
List
<
AnswerRecordVO
>
exportAnswerRecord
(
ClassDetailDTO
classDetailDTO
);
List
<
AnswerRecordVO
>
exportAnswerRecord
(
ClassDetailDTO
classDetailDTO
)
throws
Exception
;
void
export
(
ClassDetailDTO
classDetailDTO
)
throws
Exception
;
List
<
MemberDO
>
importMember
(
Long
companyId
,
MultipartFile
multipartFile
);
String
importMember
(
Long
companyId
,
MultipartFile
multipartFile
);
}
src/main/java/com/subsidy/service/MemberService.java
View file @
c3ddb3a
...
...
@@ -39,7 +39,7 @@ public interface MemberService extends IService<MemberDO> {
MemberStudyPageVO
studyPage
(
MemberDO
memberDO
);
List
<
ContentVodVO
>
contentVod
(
ContentMemberDTO
contentVodDTO
);
ContentVodNewVO
contentVod
(
ContentMemberDTO
contentVodDTO
);
List
<
ContentFilesVO
>
contentFiles
(
ContentMemberDTO
contentMemberDTO
);
...
...
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
View file @
c3ddb3a
This diff is collapsed.
Click to expand it.
src/main/java/com/subsidy/service/impl/MemberServiceImpl.java
View file @
c3ddb3a
...
...
@@ -2,6 +2,7 @@ package com.subsidy.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.subsidy.common.exception.HttpException
;
import
com.subsidy.dto.administer.VerifyCodeDTO
;
...
...
@@ -135,40 +136,44 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
public
String
updateMember
(
AddMemberDTO
addMemberDTO
)
{
Integer
count
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
MemberDO
>()
.
lambda
()
.
eq
(
MemberDO:
:
getTelephone
,
addMemberDTO
.
getTelephone
())
.
eq
(
MemberDO:
:
getDepartmentId
,
addMemberDTO
.
getDepartmentId
())
.
ne
(
MemberDO:
:
getId
,
addMemberDTO
.
getId
()));
if
(
count
>
0
)
{
throw
new
HttpException
(
20002
);
}
if
(
null
!=
addMemberDTO
.
getDepartmentIds
()){
Integer
count
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
MemberDO
>()
.
lambda
()
.
eq
(
MemberDO:
:
getTelephone
,
addMemberDTO
.
getTelephone
())
.
eq
(
MemberDO:
:
getDepartmentId
,
addMemberDTO
.
getDepartmentId
())
.
ne
(
MemberDO:
:
getId
,
addMemberDTO
.
getId
()));
Integer
count1
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
MemberDO
>()
.
lambda
()
.
eq
(
MemberDO:
:
getAccountName
,
addMemberDTO
.
getAccountName
())
.
eq
(
MemberDO:
:
getDepartmentId
,
addMemberDTO
.
getDepartmentId
())
.
ne
(
MemberDO:
:
getId
,
addMemberDTO
.
getId
()));
if
(
count
>
0
)
{
throw
new
HttpException
(
20002
);
}
Integer
count1
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
MemberDO
>()
.
lambda
()
.
eq
(
MemberDO:
:
getAccountName
,
addMemberDTO
.
getAccountName
())
.
eq
(
MemberDO:
:
getDepartmentId
,
addMemberDTO
.
getDepartmentId
())
.
ne
(
MemberDO:
:
getId
,
addMemberDTO
.
getId
()));
if
(
count1
>
0
)
{
throw
new
HttpException
(
20002
);
if
(
count1
>
0
)
{
throw
new
HttpException
(
20002
);
}
}
MemberDO
memberDO
=
new
MemberDO
();
BeanUtils
.
copyProperties
(
addMemberDTO
,
memberDO
);
this
.
baseMapper
.
updateById
(
memberDO
);
memberDepartmentMappingMapper
.
delete
(
new
QueryWrapper
<
MemberDepartmentMappingDO
>()
.
lambda
()
.
eq
(
MemberDepartmentMappingDO:
:
getMemberId
,
addMemberDTO
.
getId
()));
//部门
List
<
Long
>
longs
=
addMemberDTO
.
getDepartmentIds
();
for
(
Long
lg
:
longs
)
{
MemberDepartmentMappingDO
memberDepartmentMappingDO
=
new
MemberDepartmentMappingDO
();
memberDepartmentMappingDO
.
setMemberId
(
memberDO
.
getId
());
memberDepartmentMappingDO
.
setDepartmentId
(
lg
);
memberDepartmentMappingMapper
.
insert
(
memberDepartmentMappingDO
);
if
(
null
!=
addMemberDTO
.
getDepartmentIds
()){
memberDepartmentMappingMapper
.
delete
(
new
QueryWrapper
<
MemberDepartmentMappingDO
>()
.
lambda
()
.
eq
(
MemberDepartmentMappingDO:
:
getMemberId
,
addMemberDTO
.
getId
()));
//部门
List
<
Long
>
longs
=
addMemberDTO
.
getDepartmentIds
();
for
(
Long
lg
:
longs
)
{
MemberDepartmentMappingDO
memberDepartmentMappingDO
=
new
MemberDepartmentMappingDO
();
memberDepartmentMappingDO
.
setMemberId
(
memberDO
.
getId
());
memberDepartmentMappingDO
.
setDepartmentId
(
lg
);
memberDepartmentMappingMapper
.
insert
(
memberDepartmentMappingDO
);
}
}
return
ConstantUtils
.
SET_SUCCESS
;
...
...
@@ -291,7 +296,9 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
return
memberStudyPageVO
;
}
public
List
<
ContentVodVO
>
contentVod
(
ContentMemberDTO
contentVodDTO
)
{
public
ContentVodNewVO
contentVod
(
ContentMemberDTO
contentVodDTO
)
{
ContentVodNewVO
contentVodNewVO
=
new
ContentVodNewVO
();
List
<
ContentVodVO
>
contentVodVOS
=
new
ArrayList
<>();
List
<
CourseContentDO
>
courseContentDOS
=
courseContentMapper
.
selectList
(
new
QueryWrapper
<
CourseContentDO
>()
...
...
@@ -345,7 +352,20 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
contentVodVOS
.
add
(
contentVodVO
);
}
return
contentVodVOS
;
contentVodNewVO
.
setContentVodVOS
(
contentVodVOS
);
List
<
VodPlayHistoryDO
>
vodPlayHistoryDOS
=
vodPlayHistoryMapper
.
selectList
(
new
QueryWrapper
<
VodPlayHistoryDO
>()
.
lambda
()
.
eq
(
VodPlayHistoryDO:
:
getClassId
,
contentVodDTO
.
getClassId
())
.
eq
(
VodPlayHistoryDO:
:
getMemberId
,
contentVodDTO
.
getMemberId
())
.
orderByDesc
(
VodPlayHistoryDO:
:
getCreateDate
));
if
(
vodPlayHistoryDOS
.
size
()>
0
){
VodPlayHistoryDO
vodPlayHistoryDO
=
vodPlayHistoryDOS
.
get
(
0
);
VodDictDO
vodDictDO
=
vodDictMapper
.
selectById
(
vodPlayHistoryDO
.
getVodId
());
BeanUtils
.
copyProperties
(
vodDictDO
,
contentVodNewVO
);
contentVodNewVO
.
setPlayRecord
(
vodPlayHistoryDO
.
getPlayRecord
());
}
return
contentVodNewVO
;
}
public
List
<
ContentFilesVO
>
contentFiles
(
ContentMemberDTO
contentMemberDTO
)
{
...
...
src/main/java/com/subsidy/service/impl/SignInRecordServiceImpl.java
View file @
c3ddb3a
...
...
@@ -84,7 +84,7 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig
Page
pager
=
new
Page
(
classSignInfoDTO
.
getPageNum
(),
classSignInfoDTO
.
getPageSize
());
IPage
<
ClassSignInfoVO
>
classSignInfoVOIPage
=
this
.
baseMapper
.
classSignInfo
(
pager
,
classSignInfoDTO
.
getClassName
(),
classSignInfoDTO
.
getCourseName
(),
classSignInfoDTO
.
getId
());
IPage
<
ClassSignInfoVO
>
classSignInfoVOIPage
=
this
.
baseMapper
.
classSignInfo
(
pager
,
classSignInfoDTO
.
getClassName
(),
classSignInfoDTO
.
getCourseName
(),
classSignInfoDTO
.
get
Company
Id
());
List
<
ClassSignInfoVO
>
classSignInfoVOS
=
classSignInfoVOIPage
.
getRecords
();
for
(
ClassSignInfoVO
classSignInfoVO
:
classSignInfoVOS
){
...
...
@@ -140,7 +140,7 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig
passNum
++;
}
}
classSignInfoVO
.
setPassRate
(
100
*
MathUtil
.
intDivFloorPercent
(
passNum
,
classMemberMappingDOS
.
size
()));
classSignInfoVO
.
setPassRate
(
MathUtil
.
intDivFloorPercent
(
passNum
,
classMemberMappingDOS
.
size
()));
//平均签到数 向上取整
...
...
src/main/java/com/subsidy/util/excel/ExcelUtil.java
View file @
c3ddb3a
This diff is collapsed.
Click to expand it.
src/main/java/com/subsidy/vo/administer/ExerciseTestVO.java
View file @
c3ddb3a
...
...
@@ -20,4 +20,8 @@ public class ExerciseTestVO {
@ExcelColumn
(
col
=
3
,
value
=
"最高分"
)
private
String
result
;
private
String
idCard
;
private
String
telephone
;
}
src/main/java/com/subsidy/vo/classdict/ClassDetailVO.java
View file @
c3ddb3a
...
...
@@ -4,7 +4,7 @@ import com.subsidy.util.excel.ExcelColumn;
import
lombok.Data
;
@Data
public
class
ClassDetailVO
{
public
class
ClassDetailVO
<
T
>
{
private
Long
id
;
...
...
@@ -16,7 +16,7 @@ public class ClassDetailVO {
private
String
accountName
;
@ExcelColumn
(
col
=
3
,
value
=
"身份证号"
)
private
String
idCard
s
;
private
String
idCard
;
@ExcelColumn
(
col
=
4
,
value
=
"联系方式"
)
private
String
telephone
;
...
...
src/main/java/com/subsidy/vo/member/ClassSignVO.java
View file @
c3ddb3a
...
...
@@ -13,6 +13,10 @@ public class ClassSignVO {
@ExcelColumn
(
col
=
1
,
value
=
"成员名称"
)
private
String
userName
;
private
String
idCard
;
private
String
telephone
;
/**
* 签到次数
*/
...
...
src/main/java/com/subsidy/vo/member/ContentVodNewVO.java
0 → 100644
View file @
c3ddb3a
package
com
.
subsidy
.
vo
.
member
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.subsidy.model.VodDictDO
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
ContentVodNewVO
{
private
Integer
playRecord
;
private
Long
id
;
/**
* 目录id
*/
private
Long
contentId
;
/**
* 视频名称
*/
private
String
vodName
;
/**
* 视频时长
*/
private
Integer
vodLength
;
/**
* 视频格式
*/
private
String
vodType
;
/**
* 视频大小
*/
private
String
vodSize
;
/**
* 视频地址
*/
private
String
vodUrl
;
/**
* 视频编码
*/
private
String
vodCode
;
/**
* 讲师名称
*/
private
String
teacherName
;
/**
* 封面
*/
private
String
coverPage
;
private
List
<
ContentVodVO
>
contentVodVOS
;
}
src/main/java/com/subsidy/vo/member/StudyPageVO.java
View file @
c3ddb3a
...
...
@@ -21,4 +21,6 @@ public class StudyPageVO {
private
Integer
doneMember
;
private
String
className
;
}
src/main/resources/application.properties
View file @
c3ddb3a
# 环境配置
spring.profiles.active
=
prod
spring.profiles.active
=
dev
# 文件编码 UTF8
spring.mandatory-file-
encoding
=
UTF-8
...
...
src/main/resources/code.properties
View file @
c3ddb3a
...
...
@@ -28,3 +28,5 @@ meishu.code-message[80002]=uuid验证失败
meishu.code-message[90001]=该类目已存在
meishu.code-message[10001]=导入失败
src/main/resources/mapper/AdministerMapper.xml
View file @
c3ddb3a
...
...
@@ -67,7 +67,8 @@
t2.id,
t2.user_name,
t2.account_name,
t2.telephone
t2.telephone,
t2.id_card
FROM
class_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
...
...
@@ -85,7 +86,8 @@
t2.id,
t2.user_name,
t2.account_name,
t2.telephone
t2.telephone,
t2.id_card
FROM
class_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
...
...
src/main/resources/mapper/ClassDictMapper.xml
View file @
c3ddb3a
...
...
@@ -43,6 +43,7 @@
<if
test=
"className != null and className !=''"
>
and t.class_name like concat('%',#{className} ,'%')
</if>
order by t.create_date desc
</select>
<select
id=
"getClassVods"
parameterType=
"long"
resultType=
"com.subsidy.model.VodDictDO"
>
...
...
src/main/resources/mapper/MemberMapper.xml
View file @
c3ddb3a
...
...
@@ -29,7 +29,8 @@
t3.id,
t2.id as classId,
t3.course_name,
t2.end_date
t2.end_date,
t2.class_name
FROM
class_member_mapping t
LEFT JOIN class_dict t2 ON t.class_id = t2.id
...
...
src/main/resources/mapper/VodPlayHistoryMapper.xml
View file @
c3ddb3a
...
...
@@ -30,21 +30,26 @@
t2.teacher_name,
t2.vod_url,
t2.vod_name,
round( t.play_record *100/ t2.vod_length ,0) AS percent
t3.play_record,
round( t3.play_record * 100 / t2.vod_length, 0 ) AS percent
FROM
(
SELECT
t.vod_id,
t.play_recor
d,
max( t.update_date )
t.member_i
d,
max( t.create_date ) AS playDate
FROM
vod_play_history t
WHERE
t.delete_date IS NULL
AND t.member_id = #{memberId}
GROUP BY
t.vod_id
t.vod_id,
t.member_id
) t
LEFT JOIN vod_play_history t3 ON t.playDate = t3.create_date
AND t.vod_id = t3.vod_id
AND t.member_id = t3.member_id
LEFT JOIN vod_dict t2 ON t.vod_id = t2.id
WHERE
t2.delete_date IS NULL
...
...
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