Commit 59dc36cf by 涂亚平

oss

1 parent 589d1251
...@@ -110,7 +110,7 @@ public class CompanyDictController { ...@@ -110,7 +110,7 @@ public class CompanyDictController {
@PostMapping(value = "getCompanyDataOverview") @PostMapping(value = "getCompanyDataOverview")
@ApiOperation("数据统计") @ApiOperation("数据统计")
@LoginRequired // @LoginRequired
public ResponseVO getCompanyDataOverview() { public ResponseVO getCompanyDataOverview() {
return ResponseData.generateCreatedResponse(0, companyDictService.getCompanyDataOverview()); return ResponseData.generateCreatedResponse(0, companyDictService.getCompanyDataOverview());
} }
......
...@@ -8,6 +8,8 @@ import com.subsidy.dto.vod.ChangeOrdersDTO; ...@@ -8,6 +8,8 @@ import com.subsidy.dto.vod.ChangeOrdersDTO;
import com.subsidy.model.CourseContentDO; import com.subsidy.model.CourseContentDO;
import com.subsidy.service.CourseContentService; import com.subsidy.service.CourseContentService;
import com.subsidy.util.ConstantUtils; 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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -16,14 +18,8 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -16,14 +18,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
/** import java.util.List;
* <p>
* 课程目录表 前端控制器
* </p>
*
* @author DengMin
* @since 2021-10-11
*/
@RestController @RestController
@Api(tags = "课程目录表") @Api(tags = "课程目录表")
@RequestMapping("/courseContent") @RequestMapping("/courseContent")
...@@ -59,4 +55,13 @@ public class CourseContentController { ...@@ -59,4 +55,13 @@ public class CourseContentController {
public ResponseVO updateContent(@RequestBody CourseContentDO courseContentDO){ public ResponseVO updateContent(@RequestBody CourseContentDO courseContentDO){
return ResponseData.generateCreatedResponse(0,courseContentService.updateContent(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);
}
} }
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.dto.content.GetContendVodsDTO; import com.subsidy.dto.content.GetContendVodsDTO;
import com.subsidy.dto.vod.ChangeOrdersDTO; import com.subsidy.dto.vod.ChangeOrdersDTO;
import com.subsidy.model.CourseContentDO; import com.subsidy.model.CourseContentDO;
import com.subsidy.vo.course.ExportClassContentVO;
import com.subsidy.vo.vod.GetContendVodsVO; import com.subsidy.vo.vod.GetContendVodsVO;
import java.util.List; import java.util.List;
...@@ -25,4 +26,6 @@ public interface CourseContentService extends IService<CourseContentDO> { ...@@ -25,4 +26,6 @@ public interface CourseContentService extends IService<CourseContentDO> {
String addContent(CourseContentDO courseContentDO); String addContent(CourseContentDO courseContentDO);
String updateContent(CourseContentDO courseContentDO); String updateContent(CourseContentDO courseContentDO);
List<ExportClassContentVO> exportClassContent(CourseContentDO courseContentDO);
} }
...@@ -1353,6 +1353,8 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis ...@@ -1353,6 +1353,8 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
//不带声调 //不带声调
format.setToneType(HanyuPinyinToneType.WITHOUT_TONE); format.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
List<ImportMemberDTO> failMembers = new ArrayList<>();
ExcelUtil.readExcelWithoutTitle(null, ImportMemberDTO.class, multipartFile).forEach(s -> { ExcelUtil.readExcelWithoutTitle(null, ImportMemberDTO.class, multipartFile).forEach(s -> {
MemberDO memberDO = memberMapper.selectOne(new QueryWrapper<MemberDO>() MemberDO memberDO = memberMapper.selectOne(new QueryWrapper<MemberDO>()
...@@ -1360,7 +1362,9 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis ...@@ -1360,7 +1362,9 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
.eq(MemberDO::getTelephone, s.getTelephone())); .eq(MemberDO::getTelephone, s.getTelephone()));
if (null != memberDO) { if (null != memberDO) {
//memberDOS.add(memberDO); ImportMemberDTO importMemberDTO = new ImportMemberDTO();
BeanUtils.copyProperties(memberDO,importMemberDTO);
failMembers.add(importMemberDTO);
} else { } else {
MemberDO memberDO1 = new MemberDO(); MemberDO memberDO1 = new MemberDO();
memberDO1.setUserName(s.getUserName()); memberDO1.setUserName(s.getUserName());
......
...@@ -243,6 +243,12 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -243,6 +243,12 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
classTypeDictDO.setClassType("企业内训"); classTypeDictDO.setClassType("企业内训");
classTypeDictDO.setCompanyId(companyDictDO.getId()); classTypeDictDO.setCompanyId(companyDictDO.getId());
classTypeDictMapper.insert(classTypeDictDO); classTypeDictMapper.insert(classTypeDictDO);
classTypeDictDO.setClassType("社会化、学徒制");
classTypeDictMapper.insert(classTypeDictDO);
classTypeDictDO.setClassType("补贴培训");
classTypeDictMapper.insert(classTypeDictDO);
return ConstantUtils.ADD_SUCCESS; return ConstantUtils.ADD_SUCCESS;
} }
......
...@@ -3,11 +3,22 @@ package com.subsidy.service.impl; ...@@ -3,11 +3,22 @@ package com.subsidy.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.common.exception.HttpException; import com.subsidy.common.exception.HttpException;
import com.subsidy.dto.administer.SelfExportVO;
import com.subsidy.mapper.CourseContentMapper; import com.subsidy.mapper.CourseContentMapper;
import com.subsidy.mapper.CourseDictMapper;
import com.subsidy.mapper.VodDictMapper;
import com.subsidy.model.CourseContentDO; import com.subsidy.model.CourseContentDO;
import com.subsidy.model.CourseDictDO;
import com.subsidy.service.CourseContentService; import com.subsidy.service.CourseContentService;
import com.subsidy.util.ConstantUtils; 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 org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -21,6 +32,12 @@ import java.util.List; ...@@ -21,6 +32,12 @@ import java.util.List;
@Service @Service
public class CourseContentServiceImpl extends ServiceImpl<CourseContentMapper, CourseContentDO> implements CourseContentService { public class CourseContentServiceImpl extends ServiceImpl<CourseContentMapper, CourseContentDO> implements CourseContentService {
@Autowired
private VodDictMapper vodDictMapper;
@Autowired
private CourseDictMapper courseDictMapper;
@Override @Override
public List<CourseContentDO> getContents(CourseContentDO courseContentDO) { public List<CourseContentDO> getContents(CourseContentDO courseContentDO) {
return this.baseMapper.selectList(new QueryWrapper<CourseContentDO>() return this.baseMapper.selectList(new QueryWrapper<CourseContentDO>()
...@@ -31,20 +48,20 @@ public class CourseContentServiceImpl extends ServiceImpl<CourseContentMapper, C ...@@ -31,20 +48,20 @@ public class CourseContentServiceImpl extends ServiceImpl<CourseContentMapper, C
} }
@Override @Override
public String deleteContent(CourseContentDO courseContentDO){ public String deleteContent(CourseContentDO courseContentDO) {
this.baseMapper.deleteById(courseContentDO.getId()); this.baseMapper.deleteById(courseContentDO.getId());
return ConstantUtils.DELETE_SUCCESS; return ConstantUtils.DELETE_SUCCESS;
} }
@Override @Override
public String addContent(CourseContentDO courseContentDO){ public String addContent(CourseContentDO courseContentDO) {
Integer orderNoTmp = this.baseMapper.selectMaxOrderNo(courseContentDO.getCourseId()); Integer orderNoTmp = this.baseMapper.selectMaxOrderNo(courseContentDO.getCourseId());
int orderNo = 1 ; int orderNo = 1;
if (null!=orderNoTmp){ if (null != orderNoTmp) {
orderNo = orderNoTmp+1; orderNo = orderNoTmp + 1;
} }
courseContentDO.setOrderNo(orderNo); courseContentDO.setOrderNo(orderNo);
this.baseMapper.insert(courseContentDO); this.baseMapper.insert(courseContentDO);
...@@ -52,19 +69,59 @@ public class CourseContentServiceImpl extends ServiceImpl<CourseContentMapper, C ...@@ -52,19 +69,59 @@ public class CourseContentServiceImpl extends ServiceImpl<CourseContentMapper, C
} }
@Override @Override
public String updateContent(CourseContentDO courseContentDO){ public String updateContent(CourseContentDO courseContentDO) {
int count = this.baseMapper.selectCount(new QueryWrapper<CourseContentDO>() int count = this.baseMapper.selectCount(new QueryWrapper<CourseContentDO>()
.lambda() .lambda()
.eq(CourseContentDO::getCourseId,courseContentDO.getCourseId()) .eq(CourseContentDO::getCourseId, courseContentDO.getCourseId())
.eq(CourseContentDO::getContent,courseContentDO.getContent()) .eq(CourseContentDO::getContent, courseContentDO.getContent())
.ne(CourseContentDO::getId,courseContentDO.getId())); .ne(CourseContentDO::getId, courseContentDO.getId()));
if (count>0){ if (count > 0) {
throw new HttpException(40001); throw new HttpException(40001);
} }
this.baseMapper.updateById(courseContentDO); this.baseMapper.updateById(courseContentDO);
return ConstantUtils.SET_SUCCESS; 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;
}
} }
...@@ -161,7 +161,7 @@ public class RenSheJuServiceImpl implements RenSheJuService { ...@@ -161,7 +161,7 @@ public class RenSheJuServiceImpl implements RenSheJuService {
loginList.setEndTime(Timestamp.valueOf(loginOutRecords.get(i).getCreateDate()).getTime()); 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) { if (chapterList3s.size() > 0) {
loginList.setChapterList(chapterList3s); loginList.setChapterList(chapterList3s);
loginLists.add(loginList); loginLists.add(loginList);
......
...@@ -201,7 +201,7 @@ public class ShehuihuaServiceImpl implements ShehuihuaService { ...@@ -201,7 +201,7 @@ public class ShehuihuaServiceImpl implements ShehuihuaService {
loginList.setEndTime(Timestamp.valueOf(loginOutRecords.get(i).getCreateDate()).getTime()); 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) { if (chapterList3s.size() > 0) {
loginList.setChapterList(chapterList3s); loginList.setChapterList(chapterList3s);
loginLists.add(loginList); loginLists.add(loginList);
......
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;
}
# 环境配置 # 环境配置
spring.profiles.active=dev spring.profiles.active=prod
#和CPU数 #和CPU数
spring.server.acceptorThreadCount=600 spring.server.acceptorThreadCount=600
spring.server.minSpareThreads=100 spring.server.minSpareThreads=100
......
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
FROM FROM
vod_play_history t1 vod_play_history t1
WHERE 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.delete_date IS NULL
</select> </select>
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
FROM FROM
opr_adm_dict opr_adm_dict
WHERE WHERE
create_date &lt; (NOW() - INTERVAL 1 DAY) create_date &lt; (NOW() - INTERVAL 2 DAY)
</select> </select>
</mapper> </mapper>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
FROM FROM
opr_mem_dict opr_mem_dict
WHERE WHERE
create_date &lt; (NOW() - INTERVAL 1 DAY) create_date &lt; (NOW() - INTERVAL 2 DAY)
</select> </select>
<select id="getLatestLoginInfo" parameterType="long" resultType="com.subsidy.model.OprMemDictDO"> <select id="getLatestLoginInfo" parameterType="long" resultType="com.subsidy.model.OprMemDictDO">
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
FROM FROM
class_dict t1 class_dict t1
WHERE 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.delete_date IS NULL
and t1.class_code is not NULL and t1.class_code is not NULL
<if test="classType != null and classType != ''"> <if test="classType != null and classType != ''">
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
FROM FROM
vod_play_history t1 vod_play_history t1
WHERE 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.delete_date IS NULL
GROUP BY GROUP BY
t1.class_id, t1.class_id,
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
FROM FROM
opr_mem_dict t1 opr_mem_dict t1
WHERE 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.delete_date IS NULL
AND opr_type = "登出" AND opr_type = "登出"
AND result = 1 AND result = 1
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
FROM FROM
opr_mem_dict t1 opr_mem_dict t1
WHERE 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.delete_date IS NULL
AND opr_type = "登录" AND opr_type = "登录"
AND result = 1 AND result = 1
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
FROM FROM
activity_detection t1 activity_detection t1
WHERE 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.delete_date IS NULL
AND t1.member_id = #{memberId} AND t1.member_id = #{memberId}
AND t1.class_id = #{classId} AND t1.class_id = #{classId}
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
image_check_record t1 image_check_record t1
WHERE WHERE
class_id =#{classId} 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.paper_id IS NOT NULL
and t1.result =1 and t1.result =1
AND t1.member_id=#{memberId} AND t1.member_id=#{memberId}
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
FROM FROM
opr_mem_dict t1 opr_mem_dict t1
WHERE 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.delete_date IS NULL
AND t1.user_id = #{memberId} AND t1.user_id = #{memberId}
AND opr_type = "登出" AND opr_type = "登出"
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
FROM FROM
opr_mem_dict t1 opr_mem_dict t1
WHERE 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.delete_date IS NULL
AND t1.user_id = #{memberId} AND t1.user_id = #{memberId}
AND opr_type = "登录" AND opr_type = "登录"
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
AND t.result = 1 AND t.result = 1
AND t.delete_date IS NULL AND t.delete_date IS NULL
AND opr_type = "登录" 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(), NOW(),
'%Y-%m-%d' '%Y-%m-%d'
) )
...@@ -259,7 +259,7 @@ ...@@ -259,7 +259,7 @@
AND t.result = 1 AND t.result = 1
AND t.delete_date IS NULL AND t.delete_date IS NULL
AND opr_type = "登出" 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(), NOW(),
'%Y-%m-%d' '%Y-%m-%d'
) )
...@@ -290,7 +290,7 @@ ...@@ -290,7 +290,7 @@
exercise_done_result t1 exercise_done_result t1
WHERE WHERE
t1.delete_date IS NULL 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(), NOW(),
'%Y-%m-%d' '%Y-%m-%d'
) )
...@@ -307,7 +307,7 @@ ...@@ -307,7 +307,7 @@
LEFT JOIN member t2 ON t1.member_id = t2.id LEFT JOIN member t2 ON t1.member_id = t2.id
WHERE WHERE
t1.delete_date IS NULL 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 class_id = #{classId}
</select> </select>
...@@ -341,7 +341,7 @@ ...@@ -341,7 +341,7 @@
exercise_done_result t1 exercise_done_result t1
WHERE WHERE
t1.delete_date IS NULL 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 class_id = #{classId}
AND member_id = #{memberId} AND member_id = #{memberId}
</select> </select>
...@@ -372,7 +372,7 @@ ...@@ -372,7 +372,7 @@
LEFT JOIN class_dict t2 ON t1.class_id = t2.id LEFT JOIN class_dict t2 ON t1.class_id = t2.id
LEFT JOIN member t3 ON t1.ask_id = t3.id LEFT JOIN member t3 ON t1.ask_id = t3.id
WHERE 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 t1.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
AND t3.delete_date IS NULL AND t3.delete_date IS NULL
...@@ -386,7 +386,7 @@ ...@@ -386,7 +386,7 @@
left join class_dict t2 on t.class_id = t2.id left join class_dict t2 on t.class_id = t2.id
WHERE WHERE
t.delete_date IS NULL 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(), NOW(),
'%Y-%m-%d' '%Y-%m-%d'
) )
...@@ -412,7 +412,7 @@ ...@@ -412,7 +412,7 @@
class_id = #{classId} class_id = #{classId}
AND t1.delete_date IS NULL AND t1.delete_date IS NULL
and t2.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(), NOW(),
'%Y-%m-%d' '%Y-%m-%d'
) )
...@@ -431,7 +431,7 @@ ...@@ -431,7 +431,7 @@
LEFT JOIN member t2 ON t1.member_id = t2.id LEFT JOIN member t2 ON t1.member_id = t2.id
WHERE WHERE
class_id = #{classId} 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.paper_id IS NOT NULL
AND t1.result = 1 AND t1.result = 1
</select> </select>
...@@ -451,7 +451,7 @@ ...@@ -451,7 +451,7 @@
WHERE WHERE
t1.delete_date is null t1.delete_date is null
and class_id = #{classId} 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.paper_id IS NULL
AND t1.result = 1 AND t1.result = 1
and t1.member_id and t1.member_id
...@@ -474,7 +474,7 @@ ...@@ -474,7 +474,7 @@
LEFT JOIN member t2 ON t1.member_id = t2.id LEFT JOIN member t2 ON t1.member_id = t2.id
WHERE WHERE
t1.delete_date is null 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 class_id = #{classId}
AND t1.paper_id IS not NULL AND t1.paper_id IS not NULL
AND t1.result = 1 AND t1.result = 1
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
delete_date IS NULL delete_date IS NULL
AND date(sign_in_date) = date_sub( AND date(sign_in_date) = date_sub(
curdate(), curdate(),
INTERVAL 1 DAY) INTERVAL 2 DAY)
</select> </select>
</mapper> </mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!