Commit e58aafd0 by 涂亚平

2.2.1上线了。。。。

1 parent da8e4a00
......@@ -95,7 +95,7 @@ public class AdministerController {
@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));
}
......@@ -198,7 +198,7 @@ public class AdministerController {
@PostMapping("exportZip")
@ApiOperation("下载压缩包 id 班级id")
@CrossOrigin
//@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
public void exportZip(@RequestBody ClassDetailDTO classDetailDTO)throws Exception{
administerService.export(classDetailDTO);
}
......
......@@ -66,7 +66,7 @@ public class ClassDictController {
@PostMapping("classDetail")
@ApiOperation("获取一个班级详情 id")
@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
//@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
public ResponseVO classDetail(@RequestBody ClassDictDO classDictDO){
return ResponseData.generateCreatedResponse(0,classDictService.classDetail(classDictDO));
}
......
......@@ -50,7 +50,7 @@ public class ClassNoticeController {
}
@PostMapping("queryClassNotices")
@ApiOperation("查看某个课程的通知提醒 classId 课程id status 状态(待发送/已发送)")
@ApiOperation("查看某个课程的通知提醒 classId 课程id noticeType 状态(待发送/已发送)")
public ResponseVO queryClassNotices(@RequestBody ClassNoticeDO classNoticeDO){
return ResponseData.generateCreatedResponse(0,classNoticeService.queryClassNotices(classNoticeDO));
}
......
......@@ -50,7 +50,7 @@ public class CourseDictController {
@PostMapping("queryCourses")
@ApiOperation("平台运营者--查询课程 pageSize pageNum courseName fieldId categoryId jobId rankId courseType openStatus")
@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
//@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
public ResponseVO queryCourses(@RequestBody QueryCoursesDTO queryCoursesDTO){
return ResponseData.generateCreatedResponse(0,courseDictService.queryCourses(queryCoursesDTO));
}
......
......@@ -67,7 +67,7 @@ public class CourseNotificationJob implements Job {
}
ClassNoticeDO classNotice = new ClassNoticeDO();
classNotice.setId(classNoticeDO.getId());
classNotice.setStatus(CourseNotification.SENT);
//classNotice.setStatus(CourseNotification.SENT);
classNoticeMapper.updateById(classNotice);
}
}
......
......@@ -41,9 +41,5 @@ public class ClassNoticeDO extends BaseModel {
*/
private String noticeTime;
/**
* 发送状态
*/
private String status;
}
......@@ -25,6 +25,7 @@ import com.subsidy.mapper.FieldDictMapper;
import com.subsidy.mapper.MemberDepartmentMappingMapper;
import com.subsidy.mapper.MemberMapper;
import com.subsidy.mapper.OprAdmDictMapper;
import com.subsidy.mapper.PaperDictMapper;
import com.subsidy.mapper.RoleAdministerMappingMapper;
import com.subsidy.mapper.SignInRecordMapper;
import com.subsidy.mapper.VodDictMapper;
......@@ -41,6 +42,7 @@ import com.subsidy.model.ExerciseDoneResultDO;
import com.subsidy.model.MemberDO;
import com.subsidy.model.MemberDepartmentMappingDO;
import com.subsidy.model.OprAdmDictDO;
import com.subsidy.model.PaperDictDO;
import com.subsidy.model.RoleAdministerMappingDO;
import com.subsidy.model.SignInRecordDO;
import com.subsidy.model.VodDictDO;
......@@ -187,6 +189,9 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
//@Autowired
//private MongoTemplate mongoTemplate;
@Autowired
private PaperDictMapper paperDictMapper;
public LoginVO login(AdministerDO administerDO) {
LoginVO loginVO = new LoginVO();
......@@ -322,7 +327,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
public IPage<OperatorsVO> operators(OperatorsDTO operatorsDTO) {
Page pager = new Page(operatorsDTO.getPageNum(), operatorsDTO.getPageSize());
IPage<OperatorsVO> operatorsVOIPage = companyDictMapper.operators(pager, operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(), null,0);
IPage<OperatorsVO> operatorsVOIPage = companyDictMapper.operators(pager, operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(), null, 0);
List<OperatorsVO> operatorsVOS = operatorsVOIPage.getRecords();
for (OperatorsVO operatorsVO : operatorsVOS) {
......@@ -421,7 +426,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
//视频
int i = 0;
for (VodDictDO vodDictDO : vodDictDOS) {
int totalPlayLength = vodPlayHistoryMapper.memberVodTotalLength(classMemberMappingDO.getMemberId(), vodDictDO.getId(),classDetailDTO.getId());
int totalPlayLength = vodPlayHistoryMapper.memberVodTotalLength( classDetailDTO.getId(),classMemberMappingDO.getMemberId(), vodDictDO.getId());
if (totalPlayLength >= vodDictDO.getVodLength()) {
i++;
}
......@@ -472,7 +477,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
int playLength = 0;
//该成员完成了几个视频
for (VodDictDO vodDictDO : vodDictDOS) {
int totalPlayLength = vodPlayHistoryMapper.memberVodTotalLength(classDetailVO.getId(), vodDictDO.getId(),classDetailDTO.getId());
int totalPlayLength = vodPlayHistoryMapper.memberVodTotalLength(classDetailDTO.getId(),classDetailVO.getId(), vodDictDO.getId());
if (totalPlayLength >= vodDictDO.getVodLength()) {
i++;
}
......@@ -513,8 +518,8 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
//long set = redisUtil.scan(RedisPrefixConstant.SUBSIDY_SIGN_INFO_PREFIX + classDetailVO.getId() + ":classId:" + classDetailDTO.getId() + "*").stream().count();
Integer set = signInRecordMapper.selectCount(new QueryWrapper<SignInRecordDO>()
.lambda()
.eq(SignInRecordDO::getClassId,classDetailDTO.getId())
.eq(SignInRecordDO::getMemberId,classDetailVO.getId()));
.eq(SignInRecordDO::getClassId, classDetailDTO.getId())
.eq(SignInRecordDO::getMemberId, classDetailVO.getId()));
classDetailVO.setSignCounts(set);
......@@ -543,7 +548,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
int playLength = 0;
//该成员完成了几个视频
for (VodDictDO vodDictDO : vodDictDOS) {
int totalPlayLength = vodPlayHistoryMapper.memberVodTotalLength(classDetailVO.getId(), vodDictDO.getId(),classDetailDTO.getId());
int totalPlayLength = vodPlayHistoryMapper.memberVodTotalLength(classDetailDTO.getId(),classDetailVO.getId(), vodDictDO.getId());
if (totalPlayLength >= vodDictDO.getVodLength()) {
i++;
}
......@@ -592,8 +597,8 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
//long set = redisUtil.scan(RedisPrefixConstant.SUBSIDY_SIGN_INFO_PREFIX + classDetailVO.getId() + ":classId:" + classDetailDTO.getId() + "*").stream().count();
Integer set = signInRecordMapper.selectCount(new QueryWrapper<SignInRecordDO>()
.lambda()
.eq(SignInRecordDO::getClassId,classDetailDTO.getId())
.eq(SignInRecordDO::getMemberId,classDetailVO.getId()));
.eq(SignInRecordDO::getClassId, classDetailDTO.getId())
.eq(SignInRecordDO::getMemberId, classDetailVO.getId()));
classDetailVO.setSignCounts(set);
......@@ -624,7 +629,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
int playLength = 0;
//该成员完成了几个视频
for (VodDictDO vodDictDO : vodDictDOS) {
int totalPlayLength = vodPlayHistoryMapper.memberVodTotalLength(classSignVO.getId(), vodDictDO.getId(),classDetailDTO.getId());
int totalPlayLength = vodPlayHistoryMapper.memberVodTotalLength(classDetailDTO.getId(),classSignVO.getId(), vodDictDO.getId());
if (totalPlayLength >= vodDictDO.getVodLength()) {
i++;
}
......@@ -645,8 +650,8 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
//Set<String> set = redisUtil.scan(RedisPrefixConstant.SUBSIDY_SIGN_INFO_PREFIX + classSignVO.getId() + ":classId:" + classDetailDTO.getId() + "*");
List<SignInRecordDO> signInRecordDOS = signInRecordMapper.selectList(new QueryWrapper<SignInRecordDO>()
.lambda()
.eq(SignInRecordDO::getClassId,classDetailDTO.getId())
.eq(SignInRecordDO::getMemberId,classSignVO.getId())
.eq(SignInRecordDO::getClassId, classDetailDTO.getId())
.eq(SignInRecordDO::getMemberId, classSignVO.getId())
.orderByAsc(SignInRecordDO::getSignInDate));
classSignVO.setSignCounts(signInRecordDOS.size());
......@@ -655,7 +660,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
for (SignInRecordDO signInRecordDO : signInRecordDOS) {
//String[] array = signInRecordDO.split(":");
//时间戳转时间
stringBuilder.append(signInRecordDO.getSignInDate().toString().replace("T"," ").split(" " )[0]).append(";");
stringBuilder.append(signInRecordDO.getSignInDate().toString().replace("T", " ").split(" ")[0]).append(";");
}
if (StringUtils.isNotBlank(stringBuilder.toString())) {
String signInDate = stringBuilder.toString().substring(0, stringBuilder.length() - 1);
......@@ -683,7 +688,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
int playLength = 0;
//该成员完成了几个视频
for (VodDictDO vodDictDO : vodDictDOS) {
int totalPlayLength = vodPlayHistoryMapper.memberVodTotalLength(classSignVO.getId(), vodDictDO.getId(),classDetailDTO.getId());
int totalPlayLength = vodPlayHistoryMapper.memberVodTotalLength(classDetailDTO.getId(),classSignVO.getId(), vodDictDO.getId());
if (totalPlayLength >= vodDictDO.getVodLength()) {
i++;
}
......@@ -702,8 +707,8 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
//Set<String> set = redisUtil.scan(RedisPrefixConstant.SUBSIDY_SIGN_INFO_PREFIX + classSignVO.getId() + ":classId:" + classDetailDTO.getId() + "*");
List<SignInRecordDO> signInRecordDOS = signInRecordMapper.selectList(new QueryWrapper<SignInRecordDO>()
.lambda()
.eq(SignInRecordDO::getClassId,classDetailDTO.getId())
.eq(SignInRecordDO::getMemberId,classSignVO.getId())
.eq(SignInRecordDO::getClassId, classDetailDTO.getId())
.eq(SignInRecordDO::getMemberId, classSignVO.getId())
.orderByAsc(SignInRecordDO::getSignInDate));
classSignVO.setSignCounts(signInRecordDOS.size());
......@@ -715,7 +720,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
for (SignInRecordDO signInRecordDO : signInRecordDOS) {
//String[] array = signInRecordDO.split(":");
//时间戳转时间
stringBuilder.append(signInRecordDO.getSignInDate().toString().replace("T"," ").split(" ")[0]).append(";");
stringBuilder.append(signInRecordDO.getSignInDate().toString().replace("T", " ").split(" ")[0]).append(";");
}
if (StringUtils.isNotBlank(stringBuilder.toString())) {
String signInDate = stringBuilder.toString().substring(0, stringBuilder.length() - 1);
......@@ -743,7 +748,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
for (ExerciseTestVO exerciseTestVO : classSignVOS) {
//学生测试完成情况
TestScoreInfoVO testScoreInfoVO = exerciseDoneResultMapper.testScoreInfo(classDetailDTO.getPaperId(), exerciseTestVO.getId(),classDetailDTO.getId());
TestScoreInfoVO testScoreInfoVO = exerciseDoneResultMapper.testScoreInfo(classDetailDTO.getPaperId(), exerciseTestVO.getId(), classDetailDTO.getId());
exerciseTestVO.setPaperId(exerciseTestVO.getPaperId());
if (null != testScoreInfoVO) {
exerciseTestVO.setScore(testScoreInfoVO.getScore());
......@@ -773,7 +778,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
for (ExerciseTestVO exerciseTestVO : exerciseTestVOS) {
//学生测试完成情况
//查看课程卷子
TestScoreInfoVO testScoreInfoVO = exerciseDoneResultMapper.testScoreInfo(classDetailDTO.getPaperId(), exerciseTestVO.getId(),classDetailDTO.getId());
TestScoreInfoVO testScoreInfoVO = exerciseDoneResultMapper.testScoreInfo(classDetailDTO.getPaperId(), exerciseTestVO.getId(), classDetailDTO.getId());
exerciseTestVO.setPaperId(exerciseTestVO.getPaperId());
if (null != testScoreInfoVO) {
exerciseTestVO.setScore(testScoreInfoVO.getScore());
......@@ -1228,22 +1233,24 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
* 测试成绩
*/
//查看某个课程下有几个试卷
List<ExerciseDoneResultDO> exerciseDoneResultDOS = exerciseDoneResultMapper.selectList(new QueryWrapper<ExerciseDoneResultDO>()
//查看这个班级的课程下有几个试卷
//通过班级找课程
ClassDictDO classDictDO1 = classDictMapper.selectById(classDetailDTO.getId());
//通过课程id去找这个课程有几套卷子
List<PaperDictDO> paperDictDOS = paperDictMapper.selectList(new QueryWrapper<PaperDictDO>()
.lambda()
.eq(ExerciseDoneResultDO::getClassId,classDetailDTO.getId()));
.eq(PaperDictDO::getCourseId, classDictDO1.getCourseId()));
for (int i = 0 ; i < exerciseDoneResultDOS.size();i++){
for (int i = 0 ; i < paperDictDOS.size() ; i ++){
ByteArrayOutputStream baos2 = new ByteArrayOutputStream();
classDetailDTO.setFlag(false);
classDetailDTO.setPaperId(exerciseDoneResultDOS.get(i).getPaperId());
classDetailDTO.setPaperId(paperDictDOS.get(i).getId());
List<ExerciseTestVO> exerciseTestVOS = exportExerciseTest(classDetailDTO);
testListExcel(companyDictDO.getCompanyName(), studyDate, courseDictDO.getCourseName(), "测试成绩表", ExcelFormatUtils.scoreList, exerciseTestVOS, null, 0, baos2);
compressFileToZipStream(zipOutputStream, baos2, "test"+i+".xlsx");
compressFileToZipStream(zipOutputStream, baos2, "test" + i + ".xlsx");
}
/**
* 答疑记录
*/
......@@ -1317,7 +1324,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
try {
//日期格式
if (!StringUtils.isEmpty(s.getInductionDate())){
if (!StringUtils.isEmpty(s.getInductionDate())) {
String DATE_PATTERN = "yyyy-MM-dd";
SimpleDateFormat sdf = new SimpleDateFormat("E MMM dd HH:mm:ss z yyyy", Locale.US);
Date date = sdf.parse(s.getInductionDate());
......@@ -1497,7 +1504,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
sheet.addMergedRegion(cellRangeAddress21);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress21, sheet, workbook); //给合并过的单元格加边框
CellRangeAddress cellRangeAddress22 = new CellRangeAddress(1, 1, 5, 10);
CellRangeAddress cellRangeAddress22 = new CellRangeAddress(1, 1, 5, 11);
sheet.addMergedRegion(cellRangeAddress22);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress22, sheet, workbook); //给合并过的单元格加边框
......@@ -1513,7 +1520,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
sheet.addMergedRegion(cellRangeAddress31);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress31, sheet, workbook); //给合并过的单元格加边框
CellRangeAddress cellRangeAddress32 = new CellRangeAddress(2, 2, 5, 10);
CellRangeAddress cellRangeAddress32 = new CellRangeAddress(2, 2, 5, 11);
sheet.addMergedRegion(cellRangeAddress32);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress32, sheet, workbook); //给合并过的单元格加边框
thirdRow.createCell(0).setCellValue(thirdHead[0]);
......
......@@ -135,7 +135,7 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
throw new HttpException(70001);
}
classNoticeDO.setClassId(classDictDO.getId());
classNoticeDO.setStatus(CourseNotification.UNSENT);
//classNoticeDO.setStatus(CourseNotification.UNSENT);
classNoticeMapper.insert(classNoticeDO);
Map<String, Object> params = new HashMap<>();
params.put("classId", classNoticeDO.getClassId());
......
......@@ -87,10 +87,14 @@ public class ClassHourDictServiceImpl extends ServiceImpl<ClassHourDictMapper, C
//ClassHourDictDO classHourDictDO1 = (ClassHourDictDO) redisUtil.get(RedisPrefixConstant.SUBSIDY_SETTINGS_PREFIX + getSettingVO.getCompanyId());
//getSettingVO.setId(classHourDictDO1.getId());
//String[] nullParams = MyBeanUtils.getNullPropertyNames(getSettingVO);
//BeanUtils.copyProperties(getSettingVO, classHourDictDO1,nullParams);
//redisUtil.set(RedisPrefixConstant.SUBSIDY_SETTINGS_PREFIX+getSettingVO.getCompanyId(), classHourDictDO1);
//this.baseMapper.updateById(classHourDictDO1);
ClassHourDictDO classHourDictDO1 = this.baseMapper.selectOne(new QueryWrapper<ClassHourDictDO>()
.lambda()
.eq(ClassHourDictDO::getCompanyId,getSettingVO.getCompanyId()));
String[] nullParams = MyBeanUtils.getNullPropertyNames(getSettingVO);
BeanUtils.copyProperties(getSettingVO,classHourDictDO1,nullParams);
this.baseMapper.updateById(classHourDictDO1);
if (getSettingVO.getRotationImgDictDOS().size()>0){
List<RotationImgDictDO> rotationImgDictDOS = getSettingVO.getRotationImgDictDOS();
......
......@@ -22,6 +22,7 @@ import com.subsidy.vo.classdict.ClassAndCompanyInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
......@@ -50,19 +51,18 @@ public class ClassNoticeServiceImpl extends ServiceImpl<ClassNoticeMapper, Class
@Transactional(rollbackFor = Exception.class)
@Override
public String addNotice(ClassNoticeDO classNoticeDO) {
if(DateFormatUtil.parse(classNoticeDO.getNoticeTime(),"yyyy-MM-dd HH").before(new Date())) {
if (DateFormatUtil.parse(classNoticeDO.getNoticeTime(), "yyyy-MM-dd HH").before(new Date())) {
throw new HttpException(70001);
}
classNoticeDO.setStatus(CourseNotification.UNSENT);
this.baseMapper.insert(classNoticeDO);
ClassDictDO classDictDO = classDictMapper.selectById(classNoticeDO.getClassId());
Map<String, Object> params = new HashMap<>();
params.put("classId", classNoticeDO.getClassId());
params.put("id", classNoticeDO.getId());
String name = classDictDO.getClassName()+"-"+classNoticeDO.getNoticeType()+"-"+classNoticeDO.getNoticeTime();
quartzUtil.addSimpleJob(CourseNotificationJob.class,DateFormatUtil.parse(classNoticeDO.getNoticeTime(), "yyyy-MM-dd HH:mm:ss") , params, name, "CourseNotificationJob");
String name = classDictDO.getClassName() + "-" + classNoticeDO.getNoticeType() + "-" + classNoticeDO.getNoticeTime();
quartzUtil.addSimpleJob(CourseNotificationJob.class, DateFormatUtil.parse(classNoticeDO.getNoticeTime(), "yyyy-MM-dd HH:mm:ss"), params, name, "CourseNotificationJob");
return ConstantUtils.ADD_SUCCESS;
}
......@@ -78,41 +78,41 @@ public class ClassNoticeServiceImpl extends ServiceImpl<ClassNoticeMapper, Class
this.baseMapper.deleteById(classNoticeDO.getId());
ClassDictDO classDictDO = classDictMapper.selectById(noticeDO.getClassId());
String name = classDictDO.getClassName()+"-"+noticeDO.getNoticeType()+"-"+noticeDO.getNoticeTime();
String name = classDictDO.getClassName() + "-" + noticeDO.getNoticeType() + "-" + noticeDO.getNoticeTime();
quartzUtil.deleteJob(name, "CourseNotificationJob");
return ConstantUtils.DELETE_SUCCESS;
}
public List<ClassNoticeDO> queryClassNotices(ClassNoticeDO classNoticeDO){
public List<ClassNoticeDO> queryClassNotices(ClassNoticeDO classNoticeDO) {
return this.baseMapper.selectList(new QueryWrapper<ClassNoticeDO>()
.lambda()
.eq(ClassNoticeDO::getStatus, classNoticeDO.getStatus())
.eq(ClassNoticeDO::getClassId,classNoticeDO.getClassId()));
.eq(ClassNoticeDO::getNoticeType, classNoticeDO.getNoticeType())
.eq(ClassNoticeDO::getClassId, classNoticeDO.getClassId()));
}
@Override
public void sendNotification(SendNotificationDTO sendNotificationDTO) {
ClassAndCompanyInfoVO cmInfo = classDictMapper.getClassAndCompanyInfoVO(sendNotificationDTO.getClassId());
if(sendNotificationDTO.getSendType().equals(SmsCode.ALL.getType())) {
String params = "{\"company\":\""+ cmInfo.getCompany() +"\", \"course\":\""+ cmInfo.getCourseName() +"\", \"startDate\": \""+ cmInfo.getStartDate()+"\", \"endDate\": \""+ cmInfo.getEndDate()+"\"}";
if (sendNotificationDTO.getSendType().equals(SmsCode.ALL.getType())) {
String params = "{\"company\":\"" + cmInfo.getCompany() + "\", \"course\":\"" + cmInfo.getCourseName() + "\", \"startDate\": \"" + cmInfo.getStartDate() + "\", \"endDate\": \"" + cmInfo.getEndDate() + "\"}";
List<MemberDO> list = memberMapper.getMemberList(sendNotificationDTO.getClassId());
if(list != null) {
if (list != null) {
for (MemberDO memberDO : list) {
SMSUtils.sendNoticeSMS(SmsCode.ALL.getCode(), memberDO.getTelephone(), params);
}
}
} else if(sendNotificationDTO.getSendType().equals(SmsCode.NOT_SIGNED_IN.getType())) {
String params = "{ \"name\": \""+ cmInfo.getName() +"\", \"course\":\""+ cmInfo.getCourseName()+"\"}";
} else if (sendNotificationDTO.getSendType().equals(SmsCode.NOT_SIGNED_IN.getType())) {
String params = "{ \"name\": \"" + cmInfo.getName() + "\", \"course\":\"" + cmInfo.getCourseName() + "\"}";
List<MemberDO> list = memberMapper.getMemberListBySignInRecord(sendNotificationDTO.getClassId());
if(list != null) {
if (list != null) {
for (MemberDO memberDO : list) {
SMSUtils.sendNoticeSMS(SmsCode.NOT_SIGNED_IN.getCode(), memberDO.getTelephone(), params);
}
}
} else if(sendNotificationDTO.getSendType().equals(SmsCode.UNFINISHED.getType())) {
String params = "{ \"name\": \""+ cmInfo.getName() +"\", \"course\":\""+ cmInfo.getCourseName()+"\"}";
} else if (sendNotificationDTO.getSendType().equals(SmsCode.UNFINISHED.getType())) {
String params = "{ \"name\": \"" + cmInfo.getName() + "\", \"course\":\"" + cmInfo.getCourseName() + "\"}";
List<MemberDO> list = memberMapper.getUnfinishedMemberList(sendNotificationDTO.getClassId());
if(list != null) {
if (list != null) {
for (MemberDO memberDO : list) {
SMSUtils.sendNoticeSMS(SmsCode.UNFINISHED.getCode(), memberDO.getTelephone(), params);
}
......
......@@ -687,7 +687,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
for (ClassMemberMappingDO classMemberMappingDO : classMemberMappingDOS) {
List<VodDictDO> vodDictDOS = classDictMapper.getClassVods(classMemberMappingDO.getClassId());
for (VodDictDO vodDictDO : vodDictDOS) {
int playLength = vodPlayHistoryMapper.memberVodTotalLength(memberDO.getId(), vodDictDO.getId(), classMemberMappingDO.getClassId());
int playLength = vodPlayHistoryMapper.memberVodTotalLength(classMemberMappingDO.getClassId(),memberDO.getId(), vodDictDO.getId());
if (playLength < vodDictDO.getVodLength()) {
break;
}
......
......@@ -158,7 +158,7 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig
//视频
int i = 0;
for (VodDictDO vodDictDO : vodDictDOS) {
int totalPlayLength = vodPlayHistoryMapper.memberVodTotalLength(classMemberMappingDO.getMemberId(), vodDictDO.getId(),classMemberMappingDO.getClassId());
int totalPlayLength = vodPlayHistoryMapper.memberVodTotalLength(classMemberMappingDO.getClassId(),classMemberMappingDO.getMemberId(), vodDictDO.getId());
if (totalPlayLength >= vodDictDO.getVodLength()) {
i++;
}
......
......@@ -466,7 +466,7 @@ public class ExcelUtil {
sheet.addMergedRegion(cellRangeAddress21);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress21, sheet, workbook); //给合并过的单元格加边框
CellRangeAddress cellRangeAddress22 = new CellRangeAddress(1, 1, 5, 10);
CellRangeAddress cellRangeAddress22 = new CellRangeAddress(1, 1, 5, 11);
sheet.addMergedRegion(cellRangeAddress22);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress22, sheet, workbook); //给合并过的单元格加边框
......@@ -482,7 +482,7 @@ public class ExcelUtil {
sheet.addMergedRegion(cellRangeAddress31);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress31, sheet, workbook); //给合并过的单元格加边框
CellRangeAddress cellRangeAddress32 = new CellRangeAddress(2, 2, 5, 10);
CellRangeAddress cellRangeAddress32 = new CellRangeAddress(2, 2, 5, 11);
sheet.addMergedRegion(cellRangeAddress32);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress32, sheet, workbook); //给合并过的单元格加边框
thirdRow.createCell(0).setCellValue(thirdHead[0]);
......
# 环境配置
spring.profiles.active=dev
spring.profiles.active=prod
# 端口号
spring.server.port=23457
spring.server.port=23459
#嵌入tomcat配置
#和CPU数
spring.server.acceptorThreadCount=600
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!