Commit 096878dd by 涂亚平

解决时间交叉,活跃度检测的问题

1 parent 4f1af516
Showing with 217 additions and 178 deletions
......@@ -36,7 +36,7 @@ public class ActivityDetectionController {
private ActivityDetectionService activityDetectionService;
@PostMapping("verify")
@ApiOperation("验证滑块 ticket randStr memberId classId checkType:检测类型:0:滑块 1:人脸 ")
@ApiOperation("验证滑块 ticket randStr vodId memberId classId checkType:检测类型:0:滑块 1:人脸 ")
@TimeRequired
public ResponseVO verify(@RequestBody VerifyDTO verifyDTO, HttpServletRequest request){
return ResponseData.generateCreatedResponse(0,activityDetectionService.verify(verifyDTO,request));
......@@ -49,7 +49,7 @@ public class ActivityDetectionController {
}
@PostMapping("verifyError")
@ApiOperation("验证失败记录 classId memberId")
@ApiOperation("验证失败记录 vodId classId memberId")
public ResponseVO verifyError(@RequestBody ActivityDetectionDO activityDetectionDO){
return ResponseData.generateCreatedResponse(0,activityDetectionService.verifyError(activityDetectionDO));
}
......
......@@ -181,7 +181,7 @@ public class AdministerController {
@PostMapping("classVodDailyInfo")
@ApiOperation("学习记录---每日学习时长(视频维度)")
@LoginRequired
// @LoginRequired
public ResponseVO classVodDailyInfo(@RequestBody ClassVodDailyInfoDTO classVodDailyInfoDTO) {
return ResponseData.generateCreatedResponse(0, administerService.classVodDailyInfo(classVodDailyInfoDTO));
}
......
......@@ -16,6 +16,7 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
......@@ -39,17 +40,17 @@ public class VodPlayHistoryController {
"memberId 成员id playLength 播放时长 playRecord 位点 suspendLength暂停时长 ")
@LoginRequired
@TimeRequired
public ResponseVO insertHistory(@RequestBody VodPlayHistoryDO vodPlayHistoryDO){
return ResponseData.generateCreatedResponse(0,vodPlayHistoryService.insertHistory(vodPlayHistoryDO));
public ResponseVO insertHistory(@RequestBody VodPlayHistoryDO vodPlayHistoryDO, HttpServletRequest request){
return ResponseData.generateCreatedResponse(0,vodPlayHistoryService.insertHistory(vodPlayHistoryDO,request));
}
@RequestMapping("insertHistoryNew")
@ApiOperation("记录学生看视频位置 classId班级id vodId 视频id memberId 成员id " +
"playLength 播放时长 playRecord 位点 suspendLength")
@TimeRequired
public ResponseVO insertHistoryNew(@RequestBody String param){
public ResponseVO insertHistoryNew(@RequestBody String param,HttpServletRequest request){
InsertHistoryNewDTO insertHistoryNewDTO = JSON.parseObject(param, InsertHistoryNewDTO.class);
return ResponseData.generateCreatedResponse(0,vodPlayHistoryService.insertHistoryNew(insertHistoryNewDTO));
return ResponseData.generateCreatedResponse(0,vodPlayHistoryService.insertHistoryNew(insertHistoryNewDTO,request));
}
@PostMapping("dataFix")
......
......@@ -13,6 +13,10 @@ public class VerifyDTO {
private Long memberId;
private Long vodId;
private Long classId;
private Integer clickStatus;
}
......@@ -64,76 +64,76 @@ public class RenSheJuJob {
private String env;
/**
// * POST-2:班级基本信息信息采集接口
// /**
//// * POST-2:班级基本信息信息采集接口
//// */
// @Scheduled(cron = "0 0 1 * * ?")
// public void classBaseInfo() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.classBaseInfo();
// }
// }
//
// /**
// * POST-3:学时信息采集接口
// */
@Scheduled(cron = "0 0 1 * * ?")
public void classBaseInfo() throws IOException {
if ("prod".equals(env)) {
renSheJuService.classBaseInfo();
}
}
/**
* POST-3:学时信息采集接口
*/
@Scheduled(cron = "0 5 1 * * ?")
public void classHourBehavior() throws IOException {
if ("prod".equals(env)) {
renSheJuService.classHourBehavior();
}
}
/**
* POST-4:考试信息采集接口
*/
@Scheduled(cron = "0 10 1 * * ?")
public void uploadChapterBehavior() throws IOException {
if ("prod".equals(env)) {
renSheJuService.uploadChapterBehavior();
}
}
/**
* POST-5:答疑辅导采集接口
*/
@Scheduled(cron = "0 15 1 * * ?")
public void uploadClassAnswerQuestionBehavior() throws IOException {
if ("prod".equals(env)) {
renSheJuService.uploadClassAnswerQuestionBehavior();
}
}
/**
* POST-6 班级活跃度/实名认证照片信息采集接口
*/
@Scheduled(cron = "0 20 1 * * ?")
public void uploadImage() throws IOException {
if ("prod".equals(env)) {
renSheJuService.uploadImage();
}
}
/**
* POST-7 获取培训待绑定的(班级编号,项目编号)列表
*/
@Scheduled(cron = "0 25 1 * * ?")
public void getClassCodeByPrivateKey() throws IOException {
if ("prod".equals(env)) {
renSheJuService.getClassCodeByPrivateKey();
}
}
/**
* POST-8 上下游班级数据绑定接口
*/
@Scheduled(cron = "0 30 1 * * ?")
public void uploadClassCode() throws IOException {
if ("prod".equals(env)) {
renSheJuService.uploadClassCode();
}
System.gc();
}
// @Scheduled(cron = "0 5 1 * * ?")
// public void classHourBehavior() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.classHourBehavior();
// }
// }
//
// /**
// * POST-4:考试信息采集接口
// */
// @Scheduled(cron = "0 10 1 * * ?")
// public void uploadChapterBehavior() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.uploadChapterBehavior();
// }
// }
//
// /**
// * POST-5:答疑辅导采集接口
// */
// @Scheduled(cron = "0 15 1 * * ?")
// public void uploadClassAnswerQuestionBehavior() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.uploadClassAnswerQuestionBehavior();
// }
// }
//
// /**
// * POST-6 班级活跃度/实名认证照片信息采集接口
// */
// @Scheduled(cron = "0 20 1 * * ?")
// public void uploadImage() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.uploadImage();
// }
// }
//
// /**
// * POST-7 获取培训待绑定的(班级编号,项目编号)列表
// */
// @Scheduled(cron = "0 25 1 * * ?")
// public void getClassCodeByPrivateKey() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.getClassCodeByPrivateKey();
// }
// }
//
// /**
// * POST-8 上下游班级数据绑定接口
// */
// @Scheduled(cron = "0 30 1 * * ?")
// public void uploadClassCode() throws IOException {
// if ("prod".equals(env)) {
// renSheJuService.uploadClassCode();
// }
// System.gc();
// }
// /**
// * POST-9 获取推送失败班级列表
......
......@@ -106,7 +106,7 @@ public interface VodPlayHistoryMapper extends BaseMapper<VodPlayHistoryDO> {
/**
* 插入一条学习数据
*/
void insertPlayRecord(Long classId,Long vodId,Long memberId,Integer playLength,Integer suspendLength,Integer playRecord,Integer playCount,Date createDate);
void insertPlayRecord(Long classId,Long vodId,Long memberId,Integer playLength,Integer suspendLength,Integer playRecord,Date createDate,String ipAddress);
/**
* 修改一条记录
......@@ -132,4 +132,9 @@ public interface VodPlayHistoryMapper extends BaseMapper<VodPlayHistoryDO> {
*/
List<Long> vodMembers(Long classId);
/**
* 查看某个学员今天最近的一次学习记录
*/
Date latestDailyStudyRecord(Long memberId);
}
......@@ -31,6 +31,11 @@ public class ActivityDetectionDO extends BaseModel {
private Long classId;
/**
* 视频id
*/
private Long vodId;
/**
* 人员id
*/
private Long memberId;
......
......@@ -133,4 +133,9 @@ public class ClassDictDO extends BaseModel {
*/
private String professionRank;
/**
* 弹窗提醒
*/
private Integer activityFlag;
}
......@@ -60,8 +60,7 @@ public class VodPlayHistoryDO extends BaseModel {
/**
* 聚合
*/
private Integer playCount;
private String ipAddress;
private LocalDateTime playDate;
}
......@@ -8,6 +8,7 @@ import com.subsidy.model.VodPlayHistoryDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.vo.vod.VodPlayStateVO;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
......@@ -22,9 +23,9 @@ import java.util.List;
*/
public interface VodPlayHistoryService extends IService<VodPlayHistoryDO> {
String insertHistory(VodPlayHistoryDO vodPlayHistoryDO);
String insertHistory(VodPlayHistoryDO vodPlayHistoryDO,HttpServletRequest request);
String insertHistoryNew(InsertHistoryNewDTO insertHistoryNewDTO);
String insertHistoryNew(InsertHistoryNewDTO insertHistoryNewDT,HttpServletRequest request);
void dataFix(SignDatePlaysDTO dataFixDTO);
......
......@@ -30,47 +30,54 @@ import javax.servlet.http.HttpServletRequest;
@Service
public class ActivityDetectionServiceImpl extends ServiceImpl<ActivityDetectionMapper, ActivityDetectionDO> implements ActivityDetectionService {
@Autowired
private VodPlayHistoryMapper vodPlayHistoryMapper;
public String verify(VerifyDTO verifyDTO, HttpServletRequest request) {
public String verify(VerifyDTO verifyDTO, HttpServletRequest request){
try {
try{
DescribeCaptchaResultResponse resp = ActivityDetectionUtils.activityDetection(request,verifyDTO.getTicket(),verifyDTO.getRandStr());
// 输出json格式的字符串回包
ActivityDetectionDO activityDetectionDO = new ActivityDetectionDO();
activityDetectionDO.setClassId(verifyDTO.getClassId());
activityDetectionDO.setMemberId(verifyDTO.getMemberId());
activityDetectionDO.setRequestId(resp.getRequestId());
activityDetectionDO.setCheckType(0);
if (resp.getCaptchaCode()==1){
if (verifyDTO.getClickStatus() == 1) {
ActivityDetectionDO activityDetectionDO = new ActivityDetectionDO();
activityDetectionDO.setClassId(verifyDTO.getClassId());
activityDetectionDO.setMemberId(verifyDTO.getMemberId());
activityDetectionDO.setCheckType(0);
activityDetectionDO.setVodId(verifyDTO.getVodId());
//成功
activityDetectionDO.setStatus(1);
this.baseMapper.insert(activityDetectionDO);
return ConstantUtils.SUCCESS_VERIFY;
}else {
//失败
activityDetectionDO.setStatus(0);
this.baseMapper.insert(activityDetectionDO);
//
// //失败的话删掉这个人最新的学习数据
// Long latestRecord = vodPlayHistoryMapper.memberLatestRecord(verifyDTO.getMemberId());
// vodPlayHistoryMapper.deleteById(latestRecord);
} else {
DescribeCaptchaResultResponse resp = ActivityDetectionUtils.activityDetection(request, verifyDTO.getTicket(), verifyDTO.getRandStr());
// 输出json格式的字符串回包
ActivityDetectionDO activityDetectionDO = new ActivityDetectionDO();
activityDetectionDO.setClassId(verifyDTO.getClassId());
activityDetectionDO.setMemberId(verifyDTO.getMemberId());
activityDetectionDO.setRequestId(resp.getRequestId());
activityDetectionDO.setCheckType(0);
activityDetectionDO.setVodId(verifyDTO.getVodId());
if (resp.getCaptchaCode() == 1) {
//成功
activityDetectionDO.setStatus(1);
this.baseMapper.insert(activityDetectionDO);
return ConstantUtils.SUCCESS_VERIFY;
} else {
//失败
activityDetectionDO.setStatus(0);
this.baseMapper.insert(activityDetectionDO);
throw new HttpException(19001);
throw new HttpException(19001);
}
}
} catch (Exception e) {
// System.out.println(e.toString());
System.out.println(e.toString());
}
return ConstantUtils.SUCCESS_VERIFY;
}
public IPage<GetCheckHistoryVO> getCheckHistory(GetCheckHistoryDTO getCheckHistoryDTO){
public IPage<GetCheckHistoryVO> getCheckHistory(GetCheckHistoryDTO getCheckHistoryDTO) {
Page pager = new Page(getCheckHistoryDTO.getPageNum(), getCheckHistoryDTO.getPageSize());
return this.baseMapper.getCheckHistory(pager,getCheckHistoryDTO.getClassId(),getCheckHistoryDTO.getMemberId());
return this.baseMapper.getCheckHistory(pager, getCheckHistoryDTO.getClassId(), getCheckHistoryDTO.getMemberId());
}
public String verifyError(ActivityDetectionDO activityDetectionDO){
public String verifyError(ActivityDetectionDO activityDetectionDO) {
activityDetectionDO.setStatus(0);
activityDetectionDO.setCheckType(0);
this.baseMapper.insert(activityDetectionDO);
......
......@@ -301,12 +301,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
CompanyDictDO companyDictDO = companyDictMapper.selectById(memberDO.getCompanyId());
if ("冻结".equals(memberDO.getStatus())) {
// OprMemDictDO oprMemDictDO = new OprMemDictDO();
// oprMemDictDO.setUserId(memberDO.getId());
// oprMemDictDO.setOprType("登录");
// oprMemDictDO.setResult(0);
// oprMemDictDO.setIpAddress(IpAddressUtil.getIpAddress(request));
// oprMemDictMapper.insert(oprMemDictDO);
throw new HttpException(10013);
}
......@@ -332,17 +326,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
// oprMemDictMapper.insert(oprMemDictDO);
throw new HttpException(70010);
}
//审计日志
// OprMemDictDO oprMemDictDO = oprMemDictMapper.getLatestLoginInfo(memberDO.getId());
// if (null == oprMemDictDO || !(oprMemDictDO.getResult() == 1 && "登录".equals(oprMemDictDO.getOprType()))) {
// oprMemDictDO = new OprMemDictDO();
// oprMemDictDO.setUserId(memberDO.getId());
// oprMemDictDO.setOprType("登录");
// oprMemDictDO.setResult(1);
// oprMemDictDO.setIpAddress(IpAddressUtil.getIpAddress(request));
// oprMemDictMapper.insert(oprMemDictDO);
// }
//mongoTemplate.insert(oprMemDictDO);
userRoleVO.setCompanyId(companyDictDO.getId());
userRoleVO.setSuperviseName(companyDictDO.getSuperviseName());
userRoleVO.setCompanyName(companyDictDO.getCompanyName());
......@@ -373,7 +356,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
throw new HttpException(10017);
}
/**
* 最近5次都输入失败,5分钟后再验证
*/
......@@ -790,6 +772,21 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
if (1 == classDictDO1.getIsOrder()) {
for (MemberVodVO memberVodVO : memberVodVOS) {
//当前视频有没有做过活跃度检测
Integer count = activityDetectionMapper.selectCount(new QueryWrapper<ActivityDetectionDO>()
.lambda()
.eq(ActivityDetectionDO::getVodId, memberVodVO.getId())
.eq(ActivityDetectionDO::getMemberId, contentVodDTO.getMemberId())
.eq(ActivityDetectionDO::getClassId, contentVodDTO.getClassId())
.eq(ActivityDetectionDO::getStatus, 1));
if (count > 0) {
memberVodVO.setActivityStatus(true);
} else {
memberVodVO.setActivityStatus(false);
}
if (i == 0 && contentStatus) {
//第一个视频默认打开
memberVodVO.setStatus(true);
......
......@@ -166,8 +166,7 @@ public class RenSheJuServiceImpl implements RenSheJuService {
List<DailyStudyInfoVO> result = new ArrayList<>();
// List<Long> vodClassIds = new ArrayList<>();
//
// vodClassIds.add(451L);
try {
for (Long classId : vodClassIds) {
......
......@@ -13,37 +13,40 @@ public class ActivityDetectionUtils {
/**
* 活跃度检测工具类
* @param request
* @param randstr
* @return
*
* @throws Exception
*/
public static DescribeCaptchaResultResponse activityDetection(HttpServletRequest request,String ticket, String randstr) throws Exception {
// 实例化一个认证对象,入参需要传入腾讯云账户secretId,secretKey,此处还需注意密钥对的保密
// 密钥可前往https://console.cloud.tencent.com/cam/capi网站进行获取
Credential cred = new Credential(ConstantUtils.SECRET_ID, ConstantUtils.SECRET_KEY);
// 实例化一个http选项,可选的,没有特殊需求可以跳过
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("captcha.tencentcloudapi.com");
// 实例化一个client选项,可选的,没有特殊需求可以跳过
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
// 实例化要请求产品的client对象,clientProfile是可选的
CaptchaClient client = new CaptchaClient(cred, "", clientProfile);
// 实例化一个请求对象,每个接口都会对应一个request对象
DescribeCaptchaResultRequest req = new DescribeCaptchaResultRequest();
req.setCaptchaType(9L);
String ip = IpAddressUtil.getIpAddress(request);
req.setUserIp(ip);
req.setRandstr(randstr);
req.setCaptchaAppId(ConstantUtils.CAPTCHAAPP_ID);
req.setAppSecretKey(ConstantUtils.APP_SECRET_KEY);
req.setBusinessId(ConstantUtils.BUSINESS_ID);
req.setTicket(ticket);
// 返回的resp是一个DescribeCaptchaResultResponse的实例,与请求对象对应
return client.DescribeCaptchaResult(req);
public static DescribeCaptchaResultResponse activityDetection(HttpServletRequest request, String ticket, String randstr) {
try {
// 实例化一个认证对象,入参需要传入腾讯云账户secretId,secretKey,此处还需注意密钥对的保密
// 密钥可前往https://console.cloud.tencent.com/cam/capi网站进行获取
Credential cred = new Credential(ConstantUtils.SECRET_ID, ConstantUtils.SECRET_KEY);
// 实例化一个http选项,可选的,没有特殊需求可以跳过
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("captcha.tencentcloudapi.com");
// 实例化一个client选项,可选的,没有特殊需求可以跳过
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
// 实例化要请求产品的client对象,clientProfile是可选的
CaptchaClient client = new CaptchaClient(cred, "", clientProfile);
// 实例化一个请求对象,每个接口都会对应一个request对象
DescribeCaptchaResultRequest req = new DescribeCaptchaResultRequest();
req.setCaptchaType(9L);
String ip = IpAddressUtil.getIpAddress(request);
req.setUserIp(ip);
req.setRandstr(randstr);
req.setCaptchaAppId(ConstantUtils.CAPTCHAAPP_ID);
req.setAppSecretKey(ConstantUtils.APP_SECRET_KEY);
req.setBusinessId(ConstantUtils.BUSINESS_ID);
req.setTicket(ticket);
// 返回的resp是一个DescribeCaptchaResultResponse的实例,与请求对象对应
return client.DescribeCaptchaResult(req);
} catch (Exception e) {
}
return null;
}
}
......@@ -67,4 +67,6 @@ public class ClassSettingsVO {
private Integer deviceNoRecord;
private Integer timeLimit;
private Integer activityFlag;
}
......@@ -24,4 +24,5 @@ public class MemberVodVO {
private String leftLength;
private Boolean activityStatus;
}
package com.subsidy.vo.vod;
import lombok.Data;
@Data
public class FixLengthVO {
private Integer suspendLength;
private Integer playLength;
}
......@@ -2,14 +2,21 @@
spring.server.port=23457
# 数据源配置
spring.datasource.url=jdbc:mysql://116.62.57.92:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
#spring.datasource.url=jdbc:mysql://rm-uf6rab73w0qg843opxo.mysql.rds.aliyuncs.com:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
#spring.datasource.url=jdbc:mysql://116.62.57.92:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
##spring.datasource.url=jdbc:mysql://rm-uf6rab73w0qg843opxo.mysql.rds.aliyuncs.com:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
#spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
##spring.datasource.username=ykadmin_new
##spring.datasource.password=youkedb608@good
#spring.datasource.username=devloper
#spring.datasource.password=dev@1553$
# 数据源配置 8.0数据库
spring.datasource.url=jdbc:mysql://139.224.253.21:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.username=ykadmin_new
#spring.datasource.password=youkedb608@good
spring.datasource.username=devloper
spring.datasource.password=dev@1553$
spring.datasource.username=root
spring.datasource.password=ykhladmin302
spring.datasource.druid.initialSize=5
spring.datasource.druid.minIdle=5
......
......@@ -203,7 +203,7 @@
AND t2.class_id = #{classId}
GROUP BY
t2.member_id,
t2.class_id
t2.class_id
) t2 ON t1.id = t2.member_id
order by t1.account_name ASC
</select>
......
......@@ -80,7 +80,7 @@
<select id="getCLassMemberByCompanyId" resultType="com.subsidy.model.ClassMemberMappingDO">
SELECT
t.*
distinct t.*
FROM
class_member_mapping t
LEFT JOIN class_dict t1 ON t1.id = t.class_id
......@@ -88,7 +88,6 @@
t1.company_id = #{companyId}
AND t.delete_date IS NULL
AND t1.delete_date IS NULL
GROUP BY t.member_id
</select>
</mapper>
......@@ -413,7 +413,7 @@
FROM
member m
LEFT JOIN class_member_mapping cm ON cm.member_id = m.id
LEFT JOIN ( SELECT member_id, count( 1 ) AS ts, class_id FROM exercise_done_result WHERE score >= 60 GROUP BY class_id ) AS r ON r.member_id = m.id AND r.class_id = cm.class_id
LEFT JOIN ( SELECT member_id, count( 1 ) AS ts, class_id FROM exercise_done_result WHERE score >= 60 GROUP BY class_id,member_id ) AS r ON r.member_id = m.id AND r.class_id = cm.class_id
WHERE
cm.class_id = #{classId}
AND r.ts is NULL
......
......@@ -108,7 +108,6 @@
FROM
(
SELECT
id,
user_id,
opr_type,
max( create_date ) AS time1
......@@ -126,7 +125,6 @@
) t1
LEFT JOIN (
SELECT
id,
user_id,
opr_type,
max( create_date ) AS time2
......@@ -143,8 +141,7 @@
create_date DESC
) t2 ON t1.user_id = t2.user_id
WHERE
t2.id IS NULL
OR t2.time2 &lt; t1.time1
t2.time2 &lt; t1.time1
</select>
<select id="insertLastStudyRecord" resultType="com.subsidy.vo.opr.InsertLastStudyRecordVO">
......
......@@ -118,15 +118,13 @@
LEFT JOIN (
SELECT
t3.user_id,
login - logout AS loginTime,
t3.create_date
login - logout AS loginTime
FROM
(
SELECT
user_id,
sum(
unix_timestamp( t1.create_date )) AS login,
create_date
unix_timestamp( t1.create_date )) AS login
FROM
opr_mem_dict t1
WHERE
......@@ -141,8 +139,7 @@
SELECT
user_id,
sum(
unix_timestamp( t1.create_date )) AS logout,
create_date
unix_timestamp( t1.create_date )) AS logout
FROM
opr_mem_dict t1
WHERE
......@@ -467,7 +464,6 @@
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
GROUP BY t1.class_id,t1.member_id
ORDER BY t1.create_date desc
</select>
......@@ -490,7 +486,6 @@
and class_id = #{classId}
AND t1.paper_id IS not NULL
AND t1.result = 1
GROUP BY t1.class_id,t1.member_id
ORDER BY t1.create_date desc
</select>
......
......@@ -126,7 +126,7 @@
t2.content_id = #{conetntId}
AND t1.delete_date IS NULL
AND t2.delete_date IS NULL
GROUP BY
order BY
t1.order_no DESC
</select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!