Commit f2ce604e authored by 王淑君's avatar 王淑君

Merge remote-tracking branch 'origin/meiteng' into meiteng

parents f3168d9f 16a2d697
...@@ -153,76 +153,16 @@ public class BChapterController extends PaginationController<BChapter> { ...@@ -153,76 +153,16 @@ public class BChapterController extends PaginationController<BChapter> {
MessageConstant.MESSAGE_ALERT_ERROR, MessageConstant.MESSAGE_ALERT_ERROR,
newFileUrl); newFileUrl);
} }
// @RequestMapping(value = "/downloadFile", method = RequestMethod.GET)
// public ResponseEntity<InputStreamResource> downloadFile(BFile bfile)
// throws IOException {
// log.debug("----------df1----------");
// String filePath = bChapterService.getDownLoadUrl(bfile);
// log.debug("----------df2----------");
// FileSystemResource file = new FileSystemResource(filePath);
// log.debug("----------df3----------");
// HttpHeaders headers = new HttpHeaders();
// log.debug("----------df4----------");
// headers.add("Cache-Control", "no-cache, no-store, must-revalidate");
// headers.add("Content-Disposition", String.format("attachment; filename=\"%s\"", file.getFilename()));
// headers.add("Pragma", "no-cache");
// headers.add("Expires", "0");
// log.debug("----------df5----------");
// return ResponseEntity
// .ok()
// .headers(headers)
// .contentLength(file.contentLength())
// .contentType(MediaType.parseMediaType("application/octet-stream"))
// .body(new InputStreamResource(file.getInputStream()));
// }
//
// //文件下载相关代码
// @RequestMapping("/download")
// public void downloadFile(BFile bfile, HttpServletResponse response) {
// String filePath = bChapterService.getDownLoadUrl(bfile);
// File file = new File(filePath);
// if (StringUtils.isNotEmpty(file.getName())) {
// //设置文件路径
// if (file.exists()) {
// log.debug("------------------test1------------------");
// // response.setContentType("application/force-download");
//// response.setContentType("multipart/form-data");
//
// response.setContentType("application/octet-stream;charset=utf-8");
//// response.setHeader("content-type", "application/octet-stream");
// String asd = file.getName();
// //response.setHeader("Content-Disposition", "attachment;fileName=" + file.getName());// 设置文件名
// response.setHeader("Content-Disposition", "attachment; filename=\"" + file.getName() + "\"; filename*=utf-8''" + file.getName());
//
// log.debug("------------------test2------------------");
// byte[] buffer = new byte[2048];
// FileInputStream fis = null;
// log.debug("------------------test3------------------");
// try {
// fis = new FileInputStream(file);
// OutputStream out = new BufferedOutputStream(response.getOutputStream());
// int b = 0;
// while ((b = fis.read(buffer)) != -1) {
// out.write(buffer, 0, b); //4.写到输出流(out)中
// }
// out.flush();
// out.close();
// } catch (Exception e) {
// e.printStackTrace();
// } finally {
// if (fis != null) {
// try {
// fis.close();
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
//
// }
// }
// }
// }
// @ApiOperation(value = "209 查询章节带进度(外部分享)", notes = "查询章节带进度(外部分享)", response = QueryChapterListResDTO.class)
// @GetMapping(value = "/queryShareBChaptersWithProgress")
// public Result queryShareBChaptersWithProgress(CurUser curUser, @RequestParam String lessonId, BindingResult br) {
// Map<String, Object> map = new HashedMap();
// return Result.builder(new PersistModel(1),
// MessageConstant.MESSAGE_ALERT_SUCCESS,
// MessageConstant.MESSAGE_ALERT_ERROR,
// bChapterService.queryBChaptersWithProgress(lessonId,curUser));
// }
// //
......
...@@ -45,21 +45,23 @@ public interface BChapterRepository extends BaseMapper<BChapter> { ...@@ -45,21 +45,23 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
* @param param * @param param
* @return * @return
*/ */
@Select("<script>" + @Select("<script>SELECT\n" +
"SELECT " + "\tbc.*,\n" +
"bc.*, " + "\tbf.file_size AS fileSize \n" +
"bf.file_size " + "FROM\n" +
"FROM " + "\tb_chapter bc\n" +
"b_chapter bc " + "\tLEFT JOIN b_file bf ON bf.chapter_id = bc.business_id \n" +
"LEFT JOIN b_file bf ON bf.chapter_id = bc.business_id " + "WHERE\n" +
"WHERE " + "\tbc.del_flag = 0 \n" +
"bc.del_flag = 0 " + "\tAND bc.flag = 1 \n" +
"AND bc.flag = 1 " + "\tAND bc.pid = - 1 \n" +
"AND bc.pid = - 1 " + "\tAND bc.lesson_id = #{lessonId}\n" +
"AND bc.lesson_id = #{lessonId} " + "\t\n" +
"AND bc.corp_id = #{corpId} " + " <if test=\"corpId !=null and corpId != ''\">and bc.corp_id = #{corpId}</if>" +
"ORDER BY sort ASC" + // "\tAND bc.corp_id = #{corpId}\n" +
"</script>") "\t\n" +
"ORDER BY\n" +
"\tsort ASC</script>")
@ResultMap(value = "SupperChildListResultMap") @ResultMap(value = "SupperChildListResultMap")
List<QueryChapterListResDTO> queryBChapters(Map<String, Object> param); List<QueryChapterListResDTO> queryBChapters(Map<String, Object> param);
......
...@@ -178,7 +178,7 @@ public class BChapterServiceImpl implements BChapterService { ...@@ -178,7 +178,7 @@ public class BChapterServiceImpl implements BChapterService {
mtUserGetsReqDTOlecDept.setCorpId(curUser.getCorpId()); mtUserGetsReqDTOlecDept.setCorpId(curUser.getCorpId());
mtUserGetsReqDTOlecDept.setIds(lecturerIds); mtUserGetsReqDTOlecDept.setIds(lecturerIds);
List<MTUserInfoRspDTO> mtUserInfoRspDTOLecDeptList = mtCotactApiRequestClient.userGets(mtUserGetsReqDTOlecDept); List<MTUserInfoRspDTO> mtUserInfoRspDTOLecDeptList = mtCotactApiRequestClient.userGets(mtUserGetsReqDTOlecDept);
if (mtUserInfoRspDTOLecDeptList != null && mtUserInfoRspDTOList.size() > 0){ if (mtUserInfoRspDTOLecDeptList != null && mtUserInfoRspDTOLecDeptList.size() > 0){
mtUserInfoRspDTOLecDeptList.forEach(mtUserInfoRspDTO -> { mtUserInfoRspDTOLecDeptList.forEach(mtUserInfoRspDTO -> {
if (mtUserInfoRspDTO.getDepts() != null && mtUserInfoRspDTO.getDepts().size() > 0 && mtUserInfoRspDTO.getId().equals(bLesson.getLecturerId())){ if (mtUserInfoRspDTO.getDepts() != null && mtUserInfoRspDTO.getDepts().size() > 0 && mtUserInfoRspDTO.getId().equals(bLesson.getLecturerId())){
//设置部门名 //设置部门名
......
...@@ -352,6 +352,9 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> { ...@@ -352,6 +352,9 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
@Select("<script> select blp.business_id businessId," + @Select("<script> select blp.business_id businessId," +
" bl.lesson_name LessonTitle , " + " bl.lesson_name LessonTitle , " +
" bl.class_hour classHour , " + " bl.class_hour classHour , " +
" bl.train_start_date trainStartDate , " +
" bl.train_over_date trainOverDate , " +
" bl.train_sign_time trainSignTime , " +
" blp.is_appoint isAppoint , " + " blp.is_appoint isAppoint , " +
" blp.is_finish isFinish , " + " blp.is_finish isFinish , " +
" blp.learn_progress learnProgress , " + " blp.learn_progress learnProgress , " +
...@@ -395,8 +398,8 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> { ...@@ -395,8 +398,8 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
"<if test= \" param.appointDateSort !=null and param.appointDateSort !='' and param.appointDateSort =='1'.toString()\"> ORDER BY appointDate ASC </if> "+ "<if test= \" param.appointDateSort !=null and param.appointDateSort !='' and param.appointDateSort =='1'.toString()\"> ORDER BY appointDate ASC </if> "+
"<if test= \" param.finishDateSort !=null and param.finishDateSort !='' and param.finishDateSort =='0'.toString()\"> ORDER BY blp.finish_date DESC </if> "+ "<if test= \" param.finishDateSort !=null and param.finishDateSort !='' and param.finishDateSort =='0'.toString()\"> ORDER BY blp.finish_date DESC </if> "+
"<if test= \" param.finishDateSort !=null and param.finishDateSort !='' and param.finishDateSort =='1'.toString()\"> ORDER BY blp.finish_date ASC </if> "+ "<if test= \" param.finishDateSort !=null and param.finishDateSort !='' and param.finishDateSort =='1'.toString()\"> ORDER BY blp.finish_date ASC </if> "+
"<if test= \" param.applyDateSort !=null and param.applyDateSort !='' and param.applyDateSort =='0'.toString()\"> ORDER BY appointDate DESC </if> "+ "<if test= \" param.applyDateSort !=null and param.applyDateSort !='' and param.applyDateSort =='0'.toString()\"> ORDER BY applyDate DESC </if> "+
"<if test= \" param.applyDateSort !=null and param.applyDateSort !='' and param.applyDateSort =='1'.toString()\"> ORDER BY appointDate ASC </if> "+ "<if test= \" param.applyDateSort !=null and param.applyDateSort !='' and param.applyDateSort =='1'.toString()\"> ORDER BY applyDate ASC </if> "+
"<if test= \" param.signDateSort !=null and param.signDateSort !='' and param.signDateSort =='0'.toString()\"> ORDER BY blp.sign_date DESC </if> "+ "<if test= \" param.signDateSort !=null and param.signDateSort !='' and param.signDateSort =='0'.toString()\"> ORDER BY blp.sign_date DESC </if> "+
"<if test= \" param.signDateSort !=null and param.signDateSort !='' and param.signDateSort =='1'.toString()\"> ORDER BY blp.sign_date ASC </if> "+ "<if test= \" param.signDateSort !=null and param.signDateSort !='' and param.signDateSort =='1'.toString()\"> ORDER BY blp.sign_date ASC </if> "+
"<if test= \" param.learnProgressSort !=null and param.learnProgressSort !='' and param.learnProgressSort =='0'.toString()\"> ORDER BY CAST(learnProgress AS UNSIGNED) DESC </if> "+ "<if test= \" param.learnProgressSort !=null and param.learnProgressSort !='' and param.learnProgressSort =='0'.toString()\"> ORDER BY CAST(learnProgress AS UNSIGNED) DESC </if> "+
...@@ -460,6 +463,17 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> { ...@@ -460,6 +463,17 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
" where business_id=#{businessId}", " where business_id=#{businessId}",
"</script>"}) "</script>"})
int updateAtChapter(BLessonPerson bLessonPerson); int updateAtChapter(BLessonPerson bLessonPerson);
/**
* 根据课程Id 查询人员id
* @param lessonId
* @return
*/
@Select("select business_id from b_lesson_person where 1=1 " +
" and del_flag = 0 and flag = 1 " +
" and lesson_id = #{lessonId} ")
List<String> queryPersonId(String lessonId);
} }
package org.rcisoft.business.blesson.dao; package org.rcisoft.business.blesson.dao;
import org.apache.ibatis.annotations.*; import org.apache.ibatis.annotations.*;
import org.rcisoft.business.bchapter.entity.BChapter;
import org.rcisoft.business.blabel.dto.QueryLabelResDTO; import org.rcisoft.business.blabel.dto.QueryLabelResDTO;
import org.rcisoft.business.blesson.dto.*; import org.rcisoft.business.blesson.dto.*;
import org.rcisoft.business.blesson.entity.*; import org.rcisoft.business.blesson.entity.*;
...@@ -1160,5 +1159,12 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -1160,5 +1159,12 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" </script>") " </script>")
int isInViewRange(@Param("curUser") CurUser curUser, @Param("lessonId") String lessonId, @Param("departs") List<String> departs); int isInViewRange(@Param("curUser") CurUser curUser, @Param("lessonId") String lessonId, @Param("departs") List<String> departs);
@Select("<script>" +
" select business_id, lesson_name " +
" from b_lesson where 1 = 1 " +
" and del_flag = 0 and flag = 1 " +
" AND #{param.nowDate} between SUBDATE(train_start_date,interval #{param.timeValue} ${param.valueTypeStr}) and SUBDATE(SUBDATE(train_start_date,interval #{param.timeValue} ${param.valueTypeStr}),interval -60 second)</script>")
@ResultMap(value = "MessageResultMap")
List<BLesson> selectLessonAtMessageTask(@Param("param") FindLessonAtMessageTaskDTO param);
} }
package org.rcisoft.business.blesson.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FindLessonAtMessageTaskDTO {
private String corpId;
private String timeValue;
private String valueTypeStr;
private Date nowDate;
}
...@@ -51,6 +51,19 @@ public class StudentTrackingRspDTO { ...@@ -51,6 +51,19 @@ public class StudentTrackingRspDTO {
@Transient @Transient
private Date applyDate; private Date applyDate;
@DateTimeFormat(pattern="yyyy/MM/dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy/MM/dd HH:mm:ss")
@ApiModelProperty(value = "培训开始时间")
private Date trainStartDate;
@DateTimeFormat(pattern="yyyy/MM/dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy/MM/dd HH:mm:ss")
@ApiModelProperty(value = "培训结束时间")
private Date trainOverDate;
@ApiModelProperty(value = "培训签到时间(培训开始前 分钟数)")
private String trainSignTime;
@DateTimeFormat(pattern="yyyy/MM/dd HH:mm:ss") @DateTimeFormat(pattern="yyyy/MM/dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy/MM/dd HH:mm:ss") @JsonFormat(timezone = "GMT+8",pattern = "yyyy/MM/dd HH:mm:ss")
@ApiModelProperty(value = "签到日期") @ApiModelProperty(value = "签到日期")
......
...@@ -151,8 +151,6 @@ public class BLesson extends IdEntity<BLesson> { ...@@ -151,8 +151,6 @@ public class BLesson extends IdEntity<BLesson> {
@Length(min = 1,max = 255,message = "长度最小为1,最大为255") @Length(min = 1,max = 255,message = "长度最小为1,最大为255")
private String trainAddress; private String trainAddress;
@DateTimeFormat(pattern="yyyy/MM/dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy/MM/dd HH:mm:ss")
@ApiModelProperty(value = "培训签到时间(培训开始前 分钟数)") @ApiModelProperty(value = "培训签到时间(培训开始前 分钟数)")
@Length(min = 1,max = 15,message = "长度最小为1,最大为15") @Length(min = 1,max = 15,message = "长度最小为1,最大为15")
private String trainSignTime; private String trainSignTime;
...@@ -272,6 +270,10 @@ public class BLesson extends IdEntity<BLesson> { ...@@ -272,6 +270,10 @@ public class BLesson extends IdEntity<BLesson> {
@Transient @Transient
private Date signStartDate; private Date signStartDate;
@Transient
@ApiModelProperty(value = "学员id集合")
List<String> personList;
public void initModel(){ public void initModel(){
// this.setDefaultUrl(global.getDEFAULT_COURSE_LOCATION()); // this.setDefaultUrl(global.getDEFAULT_COURSE_LOCATION());
......
...@@ -1377,7 +1377,24 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -1377,7 +1377,24 @@ public class BLessonServiceImpl implements BLessonService {
trainTypeSelStr = "and now() > bl.train_over_date"; trainTypeSelStr = "and now() > bl.train_over_date";
} }
return bLessonPersonRepository.userManageLesson(userLessonDTO,trainTypeSelStr); List<StudentTrackingRspDTO> studentTrackingRspDTOList = bLessonPersonRepository.userManageLesson(userLessonDTO,trainTypeSelStr);
Date now = new Date();
studentTrackingRspDTOList.forEach(studentTrackingRspDTO -> {
if (studentTrackingRspDTO.getTrainStartDate() == null || studentTrackingRspDTO.getTrainOverDate() == null || studentTrackingRspDTO.getTrainSignTime() == null){
return;
}
Long time = Long.parseLong(studentTrackingRspDTO.getTrainSignTime()) * 60 * 1000;
Date signStart = new Date(studentTrackingRspDTO.getTrainStartDate().getTime() - time);
if (now.before(signStart)){
studentTrackingRspDTO.setTrainType("0");
}else if (studentTrackingRspDTO.getTrainOverDate().before(now)){
studentTrackingRspDTO.setTrainType("2");
}else{
studentTrackingRspDTO.setTrainType("1");
}
});
return studentTrackingRspDTOList;
} }
@Override @Override
......
...@@ -40,5 +40,17 @@ public interface BMessageRepository extends BaseMapper<BMessage> { ...@@ -40,5 +40,17 @@ public interface BMessageRepository extends BaseMapper<BMessage> {
"#{item.name},#{item.timeValue},#{item.valueType},#{item.corpId},#{item.sort})" + "#{item.name},#{item.timeValue},#{item.valueType},#{item.corpId},#{item.sort})" +
"</foreach></script>") "</foreach></script>")
int insertList(List<BMessage> bMessageList); int insertList(List<BMessage> bMessageList);
/**
* 查询 bMessage
*
*/
@Select("<script>select * from b_message where 1=1 "
+ " and del_flag = 0 "
+ " and name = #{name} "
+ "</script>")
@ResultMap(value = "BaseResultMap" )
List<BMessage> queryByNameAndCorp(@Param("name") String name);
} }
...@@ -35,7 +35,7 @@ public interface BRStudentChapterRepository extends BaseMapper<BRStudentChapter> ...@@ -35,7 +35,7 @@ public interface BRStudentChapterRepository extends BaseMapper<BRStudentChapter>
*/ */
@Select("<script>select * from b_r_student_chapter brsc where 1=1 " @Select("<script>select * from b_r_student_chapter brsc where 1=1 "
+ "<if test=\"chapterId !=null and chapterId != '' \">and brsc.chapter_id = #{chapterId} </if> " + "<if test=\"chapterId !=null and chapterId != '' \">and brsc.chapter_id = #{chapterId} </if> "
+ "<if test=\"studentId !=null and studentId != '' \">and brsc.student_id = #{studentId} </if> " + "and brsc.student_id = #{studentId} "
+ "</script>") + "</script>")
@ResultMap(value = "BRStudentChapterResultMap" ) @ResultMap(value = "BRStudentChapterResultMap" )
List<BRStudentChapter> queryByStuIdAndChapter(@Param("chapterId") String chapterId,@Param("studentId") String studentId); List<BRStudentChapter> queryByStuIdAndChapter(@Param("chapterId") String chapterId,@Param("studentId") String studentId);
......
...@@ -139,7 +139,7 @@ public class BRStudentChapterServiceImpl implements BRStudentChapterService { ...@@ -139,7 +139,7 @@ public class BRStudentChapterServiceImpl implements BRStudentChapterService {
}else { }else {
BLessonPerson bLessonPerson = new BLessonPerson(); BLessonPerson bLessonPerson = new BLessonPerson();
UserUtil.setCurrentPersistOperation(bLessonPerson); UserUtil.setCurrentPersistOperation(bLessonPerson);
bLessonPerson = this.dealBLessonPerson(bLessonPersonList.get(0),brStudentChapterDto,totalProgress); bLessonPerson = this.dealBLessonPerson(bLessonPerson,brStudentChapterDto,totalProgress);
bLessonPerson.setPersonId(brStudentChapterDto.getStudentId()); bLessonPerson.setPersonId(brStudentChapterDto.getStudentId());
bLessonPerson.setLessonId(brStudentChapterDto.getLessonId()); bLessonPerson.setLessonId(brStudentChapterDto.getLessonId());
//TODO 判断是否为已学完 曾经是否学完过 奖励积分 //TODO 判断是否为已学完 曾经是否学完过 奖励积分
......
...@@ -45,7 +45,7 @@ public class CurUserAspect { ...@@ -45,7 +45,7 @@ public class CurUserAspect {
* 获取当前登陆人 * 获取当前登陆人
* @param joinPoint * @param joinPoint
*/ */
@Before("execution(* org.rcisoft..*.controller.*.*(..))") @Before("execution(* org.rcisoft..*.controller.*.*(..) ) ")
public void beforeInsert(JoinPoint joinPoint) throws ParseException { public void beforeInsert(JoinPoint joinPoint) throws ParseException {
if (joinPoint.getArgs().length < 2) if (joinPoint.getArgs().length < 2)
return; return;
...@@ -64,8 +64,13 @@ public class CurUserAspect { ...@@ -64,8 +64,13 @@ public class CurUserAspect {
//非法权限 //非法权限
log.debug("uid:\t" + curUser.getUserId() + "\t corpId:\t" + curUser.getCorpId() + "\t operate" log.debug("uid:\t" + curUser.getUserId() + "\t corpId:\t" + curUser.getCorpId() + "\t operate"
+ methodSignature.getName()); + methodSignature.getName());
//如果为外部分享 直接返回
if (StringUtils.isNotEmpty(curUser.getIsExternalShare()) && "1".equals(curUser.getIsExternalShare()) ){
return;
}
if(StringUtils.isEmpty(curUser.getUserId()) || StringUtils.isEmpty(curUser.getCorpId())) if(StringUtils.isEmpty(curUser.getUserId()) || StringUtils.isEmpty(curUser.getCorpId()))
throw new ServiceException(ResultExceptionEnum.USER_NO_AUTHEN); throw new ServiceException(ResultExceptionEnum.USER_NO_AUTHEN);
UserUtil.setCurUser(curUser); UserUtil.setCurUser(curUser);
//多线程判断是否有管理员 //多线程判断是否有管理员
......
package org.rcisoft.core.task;
//通知定时任务
import lombok.extern.slf4j.Slf4j;
import org.rcisoft.business.blesson.dao.BLessonRepository;
import org.rcisoft.business.blesson.dto.FindLessonAtMessageTaskDTO;
import org.rcisoft.business.blesson.entity.BLesson;
import org.rcisoft.business.bmessage.dao.BMessageRepository;
import org.rcisoft.business.bmessage.entity.BMessage;
import org.rcisoft.common.util.feignDto.MTNotificationSendReqDTO;
import org.rcisoft.common.util.outClient.MTNotificationApiRequestClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
@Component
@Slf4j
public class messageTask {
@Autowired
BMessageRepository bMessageRepository;
@Autowired
BLessonRepository bLessonRepository;
@Autowired
MTNotificationApiRequestClient mtNotificationApiRequestClient;
// @Scheduled(cron = "0/20 * * * * ?")
@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
public void work() throws Exception {
Date nowDate = new Date();
//判断是否开启
List<BMessage> bMessagePXJJKSList = bMessageRepository.queryByNameAndCorp("PXJJKS");
//判断是否在设定时间内
if (bMessagePXJJKSList != null && bMessagePXJJKSList.size() > 0){
bMessagePXJJKSList.forEach(bMessage -> {
if (bMessage != null && "1".equals(bMessage.getFlag())){
String valueTypeStr = "MINUTE";
if ("2".equals(bMessage.getValueType())){
valueTypeStr = "HOUR";
}
if ("3".equals(bMessage.getValueType())){
valueTypeStr = "DAY";
}
FindLessonAtMessageTaskDTO param = new FindLessonAtMessageTaskDTO(bMessage.getCorpId(),bMessage.getTimeValue(),valueTypeStr,nowDate);
List<BLesson> bLessonList = bLessonRepository.selectLessonAtMessageTask(param);
if (bLessonList != null && bLessonList.size() > 0){
bLessonList.forEach(bLesson -> {
// MTNotificationSendReqDTO mtNotificationSendReqDTO = new MTNotificationSendReqDTO();
});
}
}
});
}
//在时间内发送通知
}
}
...@@ -318,31 +318,31 @@ public class SysRoleServiceImpl implements SysRoleService { ...@@ -318,31 +318,31 @@ public class SysRoleServiceImpl implements SysRoleService {
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT) @Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
public int initBMessage(CurUser curUser) { public int initBMessage(CurUser curUser) {
List<BMessage> bMessageList = new ArrayList<>(); List<BMessage> bMessageList = new ArrayList<>();
BMessage bMessage = new BMessage("","0","1",curUser.getCorpId(),0); BMessage bMessage = new BMessage("PXJJKS","0","1",curUser.getCorpId(),0);
UserUtil.setCurrentPersistOperation(bMessage); UserUtil.setCurrentPersistOperation(bMessage);
bMessage.setRemarks("通知已报名人员线下培训即将开始"); bMessage.setRemarks("通知已报名人员线下培训即将开始");
bMessageList.add(bMessage); bMessageList.add(bMessage);
bMessage = new BMessage("","0","1",curUser.getCorpId(),1); bMessage = new BMessage("KSJJJS","0","1",curUser.getCorpId(),1);
UserUtil.setCurrentPersistOperation(bMessage); UserUtil.setCurrentPersistOperation(bMessage);
bMessage.setRemarks("通知参考人员在线考试即将结束"); bMessage.setRemarks("通知参考人员在线考试即将结束");
bMessageList.add(bMessage); bMessageList.add(bMessage);
bMessage = new BMessage("","","",curUser.getCorpId(),2); bMessage = new BMessage("FBPL","","",curUser.getCorpId(),2);
UserUtil.setCurrentPersistOperation(bMessage); UserUtil.setCurrentPersistOperation(bMessage);
bMessage.setRemarks("通知讲师有人对其主讲的课程或培训发表了评论"); bMessage.setRemarks("通知讲师有人对其主讲的课程或培训发表了评论");
bMessageList.add(bMessage); bMessageList.add(bMessage);
bMessage = new BMessage("","","",curUser.getCorpId(),3); bMessage = new BMessage("HFPL","","",curUser.getCorpId(),3);
UserUtil.setCurrentPersistOperation(bMessage); UserUtil.setCurrentPersistOperation(bMessage);
bMessage.setRemarks("通知评论发表人有人回复了该评论"); bMessage.setRemarks("通知评论发表人有人回复了该评论");
bMessageList.add(bMessage); bMessageList.add(bMessage);
bMessage = new BMessage("","","",curUser.getCorpId(),4); bMessage = new BMessage("ZPKC","","",curUser.getCorpId(),4);
UserUtil.setCurrentPersistOperation(bMessage); UserUtil.setCurrentPersistOperation(bMessage);
bMessage.setRemarks("通知被指派了课程"); bMessage.setRemarks("通知被指派了课程");
bMessageList.add(bMessage); bMessageList.add(bMessage);
bMessage = new BMessage("","","",curUser.getCorpId(),5); bMessage = new BMessage("ZPPX","","",curUser.getCorpId(),5);
UserUtil.setCurrentPersistOperation(bMessage); UserUtil.setCurrentPersistOperation(bMessage);
bMessage.setRemarks("通知被指派了培训"); bMessage.setRemarks("通知被指派了培训");
bMessageList.add(bMessage); bMessageList.add(bMessage);
bMessage = new BMessage("","","",curUser.getCorpId(),6); bMessage = new BMessage("ZPKS","","",curUser.getCorpId(),6);
UserUtil.setCurrentPersistOperation(bMessage); UserUtil.setCurrentPersistOperation(bMessage);
bMessage.setRemarks("通知被指派了考试"); bMessage.setRemarks("通知被指派了考试");
bMessageList.add(bMessage); bMessageList.add(bMessage);
......
...@@ -24,7 +24,11 @@ public class CurUser { ...@@ -24,7 +24,11 @@ public class CurUser {
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id")
private String userId; private String userId;
@ApiModelProperty(value = "外部分享 1外部分享")
private String isExternalShare;
@ApiModelProperty(required = false,value = "请求id,不需要传递") @ApiModelProperty(required = false,value = "请求id,不需要传递")
private String requireId; private String requireId;
} }
...@@ -196,4 +196,13 @@ ...@@ -196,4 +196,13 @@
<!--<resultMap id="SupperChildListResultMap" type="org.rcisoft.business.blesson.entity.BLesson" extends="BaseResultMap">--> <!--<resultMap id="SupperChildListResultMap" type="org.rcisoft.business.blesson.entity.BLesson" extends="BaseResultMap">-->
<!--<association column="business_id" property="labelList" select="org.rcisoft.business.blesson.dao.BLessonRepository.queryLabelByLessonId"></association>--> <!--<association column="business_id" property="labelList" select="org.rcisoft.business.blesson.dao.BLessonRepository.queryLabelByLessonId"></association>-->
<!--</resultMap>--> <!--</resultMap>-->
<resultMap id="MessageResultMap" type="org.rcisoft.business.blesson.entity.BLesson">
<id column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="lesson_name" jdbcType="VARCHAR" property="lessonName"/>
<collection property="personList" ofType="string"
javaType="java.util.ArrayList" select="org.rcisoft.business.blesson.dao.BLessonPersonRepository.queryPersonId"
column="business_id">
</collection>
</resultMap>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment