Commit e58aafd0 by 涂亚平

2.2.1上线了。。。。

1 parent da8e4a00
...@@ -95,7 +95,7 @@ public class AdministerController { ...@@ -95,7 +95,7 @@ public class AdministerController {
@PostMapping("classDetail") @PostMapping("classDetail")
@ApiOperation("班级管理--班级成员 id 班级id userName") @ApiOperation("班级管理--班级成员 id 班级id userName")
@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) //@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
public ResponseVO classDetail(@RequestBody ClassDetailDTO classDetailDTO){ public ResponseVO classDetail(@RequestBody ClassDetailDTO classDetailDTO){
return ResponseData.generateCreatedResponse(0,administerService.classDetail(classDetailDTO)); return ResponseData.generateCreatedResponse(0,administerService.classDetail(classDetailDTO));
} }
...@@ -198,7 +198,7 @@ public class AdministerController { ...@@ -198,7 +198,7 @@ public class AdministerController {
@PostMapping("exportZip") @PostMapping("exportZip")
@ApiOperation("下载压缩包 id 班级id") @ApiOperation("下载压缩包 id 班级id")
@CrossOrigin @CrossOrigin
//@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
public void exportZip(@RequestBody ClassDetailDTO classDetailDTO)throws Exception{ public void exportZip(@RequestBody ClassDetailDTO classDetailDTO)throws Exception{
administerService.export(classDetailDTO); administerService.export(classDetailDTO);
} }
......
...@@ -66,7 +66,7 @@ public class ClassDictController { ...@@ -66,7 +66,7 @@ public class ClassDictController {
@PostMapping("classDetail") @PostMapping("classDetail")
@ApiOperation("获取一个班级详情 id") @ApiOperation("获取一个班级详情 id")
@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) //@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
public ResponseVO classDetail(@RequestBody ClassDictDO classDictDO){ public ResponseVO classDetail(@RequestBody ClassDictDO classDictDO){
return ResponseData.generateCreatedResponse(0,classDictService.classDetail(classDictDO)); return ResponseData.generateCreatedResponse(0,classDictService.classDetail(classDictDO));
} }
......
...@@ -50,7 +50,7 @@ public class ClassNoticeController { ...@@ -50,7 +50,7 @@ public class ClassNoticeController {
} }
@PostMapping("queryClassNotices") @PostMapping("queryClassNotices")
@ApiOperation("查看某个课程的通知提醒 classId 课程id status 状态(待发送/已发送)") @ApiOperation("查看某个课程的通知提醒 classId 课程id noticeType 状态(待发送/已发送)")
public ResponseVO queryClassNotices(@RequestBody ClassNoticeDO classNoticeDO){ public ResponseVO queryClassNotices(@RequestBody ClassNoticeDO classNoticeDO){
return ResponseData.generateCreatedResponse(0,classNoticeService.queryClassNotices(classNoticeDO)); return ResponseData.generateCreatedResponse(0,classNoticeService.queryClassNotices(classNoticeDO));
} }
......
...@@ -50,7 +50,7 @@ public class CourseDictController { ...@@ -50,7 +50,7 @@ public class CourseDictController {
@PostMapping("queryCourses") @PostMapping("queryCourses")
@ApiOperation("平台运营者--查询课程 pageSize pageNum courseName fieldId categoryId jobId rankId courseType openStatus") @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){ public ResponseVO queryCourses(@RequestBody QueryCoursesDTO queryCoursesDTO){
return ResponseData.generateCreatedResponse(0,courseDictService.queryCourses(queryCoursesDTO)); return ResponseData.generateCreatedResponse(0,courseDictService.queryCourses(queryCoursesDTO));
} }
......
...@@ -67,7 +67,7 @@ public class CourseNotificationJob implements Job { ...@@ -67,7 +67,7 @@ public class CourseNotificationJob implements Job {
} }
ClassNoticeDO classNotice = new ClassNoticeDO(); ClassNoticeDO classNotice = new ClassNoticeDO();
classNotice.setId(classNoticeDO.getId()); classNotice.setId(classNoticeDO.getId());
classNotice.setStatus(CourseNotification.SENT); //classNotice.setStatus(CourseNotification.SENT);
classNoticeMapper.updateById(classNotice); classNoticeMapper.updateById(classNotice);
} }
} }
......
...@@ -41,9 +41,5 @@ public class ClassNoticeDO extends BaseModel { ...@@ -41,9 +41,5 @@ public class ClassNoticeDO extends BaseModel {
*/ */
private String noticeTime; private String noticeTime;
/**
* 发送状态
*/
private String status;
} }
...@@ -135,7 +135,7 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -135,7 +135,7 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
throw new HttpException(70001); throw new HttpException(70001);
} }
classNoticeDO.setClassId(classDictDO.getId()); classNoticeDO.setClassId(classDictDO.getId());
classNoticeDO.setStatus(CourseNotification.UNSENT); //classNoticeDO.setStatus(CourseNotification.UNSENT);
classNoticeMapper.insert(classNoticeDO); classNoticeMapper.insert(classNoticeDO);
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("classId", classNoticeDO.getClassId()); params.put("classId", classNoticeDO.getClassId());
......
...@@ -87,10 +87,14 @@ public class ClassHourDictServiceImpl extends ServiceImpl<ClassHourDictMapper, C ...@@ -87,10 +87,14 @@ public class ClassHourDictServiceImpl extends ServiceImpl<ClassHourDictMapper, C
//ClassHourDictDO classHourDictDO1 = (ClassHourDictDO) redisUtil.get(RedisPrefixConstant.SUBSIDY_SETTINGS_PREFIX + getSettingVO.getCompanyId()); //ClassHourDictDO classHourDictDO1 = (ClassHourDictDO) redisUtil.get(RedisPrefixConstant.SUBSIDY_SETTINGS_PREFIX + getSettingVO.getCompanyId());
//getSettingVO.setId(classHourDictDO1.getId()); //getSettingVO.setId(classHourDictDO1.getId());
//String[] nullParams = MyBeanUtils.getNullPropertyNames(getSettingVO);
//BeanUtils.copyProperties(getSettingVO, classHourDictDO1,nullParams); //BeanUtils.copyProperties(getSettingVO, classHourDictDO1,nullParams);
//redisUtil.set(RedisPrefixConstant.SUBSIDY_SETTINGS_PREFIX+getSettingVO.getCompanyId(), classHourDictDO1); //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){ if (getSettingVO.getRotationImgDictDOS().size()>0){
List<RotationImgDictDO> rotationImgDictDOS = getSettingVO.getRotationImgDictDOS(); List<RotationImgDictDO> rotationImgDictDOS = getSettingVO.getRotationImgDictDOS();
......
...@@ -22,6 +22,7 @@ import com.subsidy.vo.classdict.ClassAndCompanyInfoVO; ...@@ -22,6 +22,7 @@ import com.subsidy.vo.classdict.ClassAndCompanyInfoVO;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -50,19 +51,18 @@ public class ClassNoticeServiceImpl extends ServiceImpl<ClassNoticeMapper, Class ...@@ -50,19 +51,18 @@ public class ClassNoticeServiceImpl extends ServiceImpl<ClassNoticeMapper, Class
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public String addNotice(ClassNoticeDO classNoticeDO) { 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); throw new HttpException(70001);
} }
classNoticeDO.setStatus(CourseNotification.UNSENT);
this.baseMapper.insert(classNoticeDO); this.baseMapper.insert(classNoticeDO);
ClassDictDO classDictDO = classDictMapper.selectById(classNoticeDO.getClassId()); ClassDictDO classDictDO = classDictMapper.selectById(classNoticeDO.getClassId());
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("classId", classNoticeDO.getClassId()); params.put("classId", classNoticeDO.getClassId());
params.put("id", classNoticeDO.getId()); params.put("id", classNoticeDO.getId());
String name = classDictDO.getClassName()+"-"+classNoticeDO.getNoticeType()+"-"+classNoticeDO.getNoticeTime(); 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"); quartzUtil.addSimpleJob(CourseNotificationJob.class, DateFormatUtil.parse(classNoticeDO.getNoticeTime(), "yyyy-MM-dd HH:mm:ss"), params, name, "CourseNotificationJob");
return ConstantUtils.ADD_SUCCESS; return ConstantUtils.ADD_SUCCESS;
} }
...@@ -78,41 +78,41 @@ public class ClassNoticeServiceImpl extends ServiceImpl<ClassNoticeMapper, Class ...@@ -78,41 +78,41 @@ public class ClassNoticeServiceImpl extends ServiceImpl<ClassNoticeMapper, Class
this.baseMapper.deleteById(classNoticeDO.getId()); this.baseMapper.deleteById(classNoticeDO.getId());
ClassDictDO classDictDO = classDictMapper.selectById(noticeDO.getClassId()); 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"); quartzUtil.deleteJob(name, "CourseNotificationJob");
return ConstantUtils.DELETE_SUCCESS; return ConstantUtils.DELETE_SUCCESS;
} }
public List<ClassNoticeDO> queryClassNotices(ClassNoticeDO classNoticeDO){ public List<ClassNoticeDO> queryClassNotices(ClassNoticeDO classNoticeDO) {
return this.baseMapper.selectList(new QueryWrapper<ClassNoticeDO>() return this.baseMapper.selectList(new QueryWrapper<ClassNoticeDO>()
.lambda() .lambda()
.eq(ClassNoticeDO::getStatus, classNoticeDO.getStatus()) .eq(ClassNoticeDO::getNoticeType, classNoticeDO.getNoticeType())
.eq(ClassNoticeDO::getClassId,classNoticeDO.getClassId())); .eq(ClassNoticeDO::getClassId, classNoticeDO.getClassId()));
} }
@Override @Override
public void sendNotification(SendNotificationDTO sendNotificationDTO) { public void sendNotification(SendNotificationDTO sendNotificationDTO) {
ClassAndCompanyInfoVO cmInfo = classDictMapper.getClassAndCompanyInfoVO(sendNotificationDTO.getClassId()); ClassAndCompanyInfoVO cmInfo = classDictMapper.getClassAndCompanyInfoVO(sendNotificationDTO.getClassId());
if(sendNotificationDTO.getSendType().equals(SmsCode.ALL.getType())) { if (sendNotificationDTO.getSendType().equals(SmsCode.ALL.getType())) {
String params = "{\"company\":\""+ cmInfo.getCompany() +"\", \"course\":\""+ cmInfo.getCourseName() +"\", \"startDate\": \""+ cmInfo.getStartDate()+"\", \"endDate\": \""+ cmInfo.getEndDate()+"\"}"; String params = "{\"company\":\"" + cmInfo.getCompany() + "\", \"course\":\"" + cmInfo.getCourseName() + "\", \"startDate\": \"" + cmInfo.getStartDate() + "\", \"endDate\": \"" + cmInfo.getEndDate() + "\"}";
List<MemberDO> list = memberMapper.getMemberList(sendNotificationDTO.getClassId()); List<MemberDO> list = memberMapper.getMemberList(sendNotificationDTO.getClassId());
if(list != null) { if (list != null) {
for (MemberDO memberDO : list) { for (MemberDO memberDO : list) {
SMSUtils.sendNoticeSMS(SmsCode.ALL.getCode(), memberDO.getTelephone(), params); SMSUtils.sendNoticeSMS(SmsCode.ALL.getCode(), memberDO.getTelephone(), params);
} }
} }
} else if(sendNotificationDTO.getSendType().equals(SmsCode.NOT_SIGNED_IN.getType())) { } else if (sendNotificationDTO.getSendType().equals(SmsCode.NOT_SIGNED_IN.getType())) {
String params = "{ \"name\": \""+ cmInfo.getName() +"\", \"course\":\""+ cmInfo.getCourseName()+"\"}"; String params = "{ \"name\": \"" + cmInfo.getName() + "\", \"course\":\"" + cmInfo.getCourseName() + "\"}";
List<MemberDO> list = memberMapper.getMemberListBySignInRecord(sendNotificationDTO.getClassId()); List<MemberDO> list = memberMapper.getMemberListBySignInRecord(sendNotificationDTO.getClassId());
if(list != null) { if (list != null) {
for (MemberDO memberDO : list) { for (MemberDO memberDO : list) {
SMSUtils.sendNoticeSMS(SmsCode.NOT_SIGNED_IN.getCode(), memberDO.getTelephone(), params); SMSUtils.sendNoticeSMS(SmsCode.NOT_SIGNED_IN.getCode(), memberDO.getTelephone(), params);
} }
} }
} else if(sendNotificationDTO.getSendType().equals(SmsCode.UNFINISHED.getType())) { } else if (sendNotificationDTO.getSendType().equals(SmsCode.UNFINISHED.getType())) {
String params = "{ \"name\": \""+ cmInfo.getName() +"\", \"course\":\""+ cmInfo.getCourseName()+"\"}"; String params = "{ \"name\": \"" + cmInfo.getName() + "\", \"course\":\"" + cmInfo.getCourseName() + "\"}";
List<MemberDO> list = memberMapper.getUnfinishedMemberList(sendNotificationDTO.getClassId()); List<MemberDO> list = memberMapper.getUnfinishedMemberList(sendNotificationDTO.getClassId());
if(list != null) { if (list != null) {
for (MemberDO memberDO : list) { for (MemberDO memberDO : list) {
SMSUtils.sendNoticeSMS(SmsCode.UNFINISHED.getCode(), memberDO.getTelephone(), params); SMSUtils.sendNoticeSMS(SmsCode.UNFINISHED.getCode(), memberDO.getTelephone(), params);
} }
......
...@@ -687,7 +687,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -687,7 +687,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
for (ClassMemberMappingDO classMemberMappingDO : classMemberMappingDOS) { for (ClassMemberMappingDO classMemberMappingDO : classMemberMappingDOS) {
List<VodDictDO> vodDictDOS = classDictMapper.getClassVods(classMemberMappingDO.getClassId()); List<VodDictDO> vodDictDOS = classDictMapper.getClassVods(classMemberMappingDO.getClassId());
for (VodDictDO vodDictDO : vodDictDOS) { 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()) { if (playLength < vodDictDO.getVodLength()) {
break; break;
} }
......
...@@ -158,7 +158,7 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig ...@@ -158,7 +158,7 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig
//视频 //视频
int i = 0; int i = 0;
for (VodDictDO vodDictDO : vodDictDOS) { 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()) { if (totalPlayLength >= vodDictDO.getVodLength()) {
i++; i++;
} }
......
...@@ -466,7 +466,7 @@ public class ExcelUtil { ...@@ -466,7 +466,7 @@ public class ExcelUtil {
sheet.addMergedRegion(cellRangeAddress21); sheet.addMergedRegion(cellRangeAddress21);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress21, sheet, workbook); //给合并过的单元格加边框 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); sheet.addMergedRegion(cellRangeAddress22);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress22, sheet, workbook); //给合并过的单元格加边框 setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress22, sheet, workbook); //给合并过的单元格加边框
...@@ -482,7 +482,7 @@ public class ExcelUtil { ...@@ -482,7 +482,7 @@ public class ExcelUtil {
sheet.addMergedRegion(cellRangeAddress31); sheet.addMergedRegion(cellRangeAddress31);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress31, sheet, workbook); //给合并过的单元格加边框 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); sheet.addMergedRegion(cellRangeAddress32);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress32, sheet, workbook); //给合并过的单元格加边框 setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress32, sheet, workbook); //给合并过的单元格加边框
thirdRow.createCell(0).setCellValue(thirdHead[0]); thirdRow.createCell(0).setCellValue(thirdHead[0]);
......
# 环境配置 # 环境配置
spring.profiles.active=dev spring.profiles.active=prod
# 端口号 # 端口号
spring.server.port=23457 spring.server.port=23459
#嵌入tomcat配置 #嵌入tomcat配置
#和CPU数 #和CPU数
spring.server.acceptorThreadCount=600 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!