Commit 8d2fd6b2 authored by zhangqingle's avatar zhangqingle

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

# Conflicts:
#	src/main/resources/application.yml
parents 6541d95a 4f28300d
...@@ -10,10 +10,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -10,10 +10,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.map.HashedMap; import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.rcisoft.business.bchapter.dto.QueryChapterListDTO; import org.rcisoft.business.bchapter.dto.*;
import org.rcisoft.business.bchapter.dto.QueryChapterListResDTO;
import org.rcisoft.business.bchapter.dto.QueryScoreListDTO;
import org.rcisoft.business.bchapter.dto.ScoreInfoDTO;
import org.rcisoft.business.bchapter.entity.BChapter; import org.rcisoft.business.bchapter.entity.BChapter;
import org.rcisoft.business.bchapter.enums.IsCompleteEnum; import org.rcisoft.business.bchapter.enums.IsCompleteEnum;
import org.rcisoft.business.bchapter.service.BChapterService; import org.rcisoft.business.bchapter.service.BChapterService;
...@@ -66,19 +63,13 @@ public class BChapterController extends PaginationController<BChapter> { ...@@ -66,19 +63,13 @@ public class BChapterController extends PaginationController<BChapter> {
private Global global; private Global global;
@ApiOperation(value = "201 添加/编辑章节", notes = "businessId为空时是添加方法,不为空时是修改方法") @ApiOperation(value = "201 添加/编辑章节", notes = "businessId为空时是添加方法,不为空时是修改方法")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "课程id 修改章节时传入", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "lessonId", value = "课程ID", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "chapterName", value = "章节名", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "pid", value = "上一级(添加节需要)", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "chapterLevel", value = "等级,1:章 2:节", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "type", value = "课件类型(单选) 0视频 1音频 2PPT 3pdf 4资料", required = true, dataType = "varchar")})
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result add(CurUser curUser, @Valid BChapter bChapter, BindingResult bindingResult, uploadDTO dto) { public Result add(CurUser curUser, @Valid ChapterDTO chapterDTO, BindingResult bindingResult, uploadDTO dto) {
PersistModel data = bChapterService.persist(bChapter,curUser.getCorpId(),dto); PersistModel data = bChapterService.persist(chapterDTO,curUser.getCorpId(),dto);
return Result.builder(data, return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS, MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR, MessageConstant.MESSAGE_ALERT_ERROR,
bChapter); chapterDTO);
} }
...@@ -124,8 +115,9 @@ public class BChapterController extends PaginationController<BChapter> { ...@@ -124,8 +115,9 @@ public class BChapterController extends PaginationController<BChapter> {
bChapterService.queryBChaptersWithProgress(lessonId,curUser)); bChapterService.queryBChaptersWithProgress(lessonId,curUser));
} }
@RequestMapping("/getFile")
@ApiOperation(value = "206 流 输出ppt转为pdf", notes = "流 输出ppt转为pdf", response = QueryChapterListResDTO.class) @ApiOperation(value = "206 流 输出ppt转为pdf", notes = "流 输出ppt转为pdf", response = QueryChapterListResDTO.class)
@GetMapping("/getFile")
public Result getFile(CurUser curUser, @RequestParam String chapterId, BindingResult br,HttpServletRequest request , HttpServletResponse response) throws IOException { public Result getFile(CurUser curUser, @RequestParam String chapterId, BindingResult br,HttpServletRequest request , HttpServletResponse response) throws IOException {
String newFileUrl = bChapterService.changeFileToPdf(chapterId); String newFileUrl = bChapterService.changeFileToPdf(chapterId);
//读取路径下面的文件 //读取路径下面的文件
...@@ -168,17 +160,6 @@ public class BChapterController extends PaginationController<BChapter> { ...@@ -168,17 +160,6 @@ public class BChapterController extends PaginationController<BChapter> {
newFileUrl); newFileUrl);
} }
// @ApiOperation(value = "206 获取uuid", notes = "获取uuid用于添加章节时使用")
// @PostMapping(value = "/getid")
// public Result getUuid() {
// String data = IdGen.uuid();
// return Result.builder(new PersistModel(1),
// MessageConstant.MESSAGE_ALERT_SUCCESS,
// MessageConstant.MESSAGE_ALERT_ERROR,
// data);
// }
// //
// @ApiOperation(value = "更改章节状态", notes = "根据章节ID更改章节状态") // @ApiOperation(value = "更改章节状态", notes = "根据章节ID更改章节状态")
// @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"), // @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
......
...@@ -375,39 +375,6 @@ public interface BChapterRepository extends BaseMapper<BChapter> { ...@@ -375,39 +375,6 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
int updateClassHourInLesson(@Param("lessonId") String lessonId); int updateClassHourInLesson(@Param("lessonId") String lessonId);
// @Insert("<script>insert into b_chapter " +
// "<trim prefix=\"(\" suffix=\")\" suffixOverrides=\",\"> " +
// "<if test=\"businessId !=null and businessId != ''\"> business_id, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> create_by, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> create_date, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> update_by, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> update_date, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> del_flag, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> flag, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> remarks, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> chapter_name, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> chapter_level, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> pid, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> chapter_url, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> md_file, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> is_test, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> lesson_id, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> class_hour, </if> " +
// "<if test=\"state !=null and state != ''\"> state, </if> " +
// "<if test=\"sort !=null and sort != ''\"> sort, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> is_test, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> is_test, </if> " +
//
// "</trim>"+
// "<trim prefix=\"values (\" suffix=\")\" suffixOverrides=\",\">"+
// "<if test=\"businessId !=null and businessId != ''\"> #{businessId}, </if> " +
//
// "</trim>"+
// "</script>")
//
//
// int insertBChapter(BChapter model);
@Select("<script>" + @Select("<script>" +
"SELECT bc.*, brc.current_location as currentLocation, bf.video_url as videoUrl " + "SELECT bc.*, brc.current_location as currentLocation, bf.video_url as videoUrl " +
"FROM " + "FROM " +
...@@ -423,5 +390,26 @@ public interface BChapterRepository extends BaseMapper<BChapter> { ...@@ -423,5 +390,26 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
"</script>") "</script>")
@ResultMap(value = "SupperChildListResultMap") @ResultMap(value = "SupperChildListResultMap")
QueryChapterListResDTO getWithCurrentChapterBylessonId(@Param("lessonId")String lessonId); QueryChapterListResDTO getWithCurrentChapterBylessonId(@Param("lessonId")String lessonId);
/**
* 根据business_id将第一章第一节的课程时长加到course_time
* @param time
* @param id
* @return
*/
@Update("UPDATE b_lesson set course_time = #{time} where business_id =#{id}")
int updateVideoTimeInLesson(@Param("time") String time,@Param("id") String id);
/**
* 根据lessonid获取它第一章第一节的章节id
* @param lessonId
* @return
*/
@Select("SELECT business_id FROM b_chapter " +
"WHERE pid = " +
"( SELECT business_id FROM b_chapter " +
"WHERE lesson_id = #{lessonId} AND chapter_level = 1 AND del_flag != 1 AND flag = 1 ORDER BY sort LIMIT 1 ) " +
"ORDER BY sort LIMIT 1")
String getFirstChapter(@Param("lessonId") String lessonId);
} }
package org.rcisoft.business.bchapter.dto;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class ChapterDTO {
@ApiModelProperty(value = "课程id 修改章节时传入")
private String businessId;
@ApiModelProperty(value = "课程ID")
private String lessonId;
@ApiModelProperty(value = "章节名")
private String chapterName;
@ApiModelProperty(value = "上一级(添加节需要)")
private String pid;
@ApiModelProperty(value = "等级,1:章 2:节")
private Byte chapterLevel;
}
package org.rcisoft.business.bchapter.entity; package org.rcisoft.business.bchapter.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -71,7 +72,7 @@ public class BChapter extends IdEntity<BChapter> { ...@@ -71,7 +72,7 @@ public class BChapter extends IdEntity<BChapter> {
/*章节排序*/ /*章节排序*/
private Integer sort; private Integer sort;
/*课程时长 节填 章不填*/ // @ApiModelProperty(value = "课程时长 节填 章不填")
private String courseTime; private String courseTime;
@Transient @Transient
...@@ -132,7 +133,6 @@ public class BChapter extends IdEntity<BChapter> { ...@@ -132,7 +133,6 @@ public class BChapter extends IdEntity<BChapter> {
@Transient @Transient
private String fileName; private String fileName;
public BChapter(String businessId) { public BChapter(String businessId) {
this.businessId = businessId; this.businessId = businessId;
} }
......
...@@ -57,10 +57,10 @@ public interface BChapterService{ ...@@ -57,10 +57,10 @@ public interface BChapterService{
/** /**
* 插入 * 插入
* @param model * @param chapterDTO
* @return * @return
*/ */
PersistModel persist(BChapter model, String corpId, uploadDTO dto); PersistModel persist(ChapterDTO chapterDTO, String corpId, uploadDTO dto);
/** /**
* 修改 * 修改
......
...@@ -170,9 +170,19 @@ public class BChapterServiceImpl implements BChapterService { ...@@ -170,9 +170,19 @@ public class BChapterServiceImpl implements BChapterService {
@Transactional(propagation = Propagation.REQUIRED, readOnly = false) @Transactional(propagation = Propagation.REQUIRED, readOnly = false)
@Override @Override
public PersistModel persist(BChapter model, String corpId, uploadDTO dto) { public PersistModel persist(ChapterDTO chapterDTO, String corpId, uploadDTO dto) {
int line = 0; int line = 0;
BFile bFile = new BFile(); BFile bFile = new BFile();
BChapter model = new BChapter();
//将dto中的数据放入bchapter实体类中
model.setBusinessId(chapterDTO.getBusinessId());
model.setLessonId(chapterDTO.getLessonId());
model.setChapterName(chapterDTO.getChapterName());
model.setPid(chapterDTO.getPid());
model.setChapterLevel(chapterDTO.getChapterLevel());
// if ("2".equals(dto.getType())||"4".equals(dto.getType())){ // if ("2".equals(dto.getType())||"4".equals(dto.getType())){
// mtCotactApiRequestClient.fileChange(dto); // mtCotactApiRequestClient.fileChange(dto);
// } // }
...@@ -198,16 +208,37 @@ public class BChapterServiceImpl implements BChapterService { ...@@ -198,16 +208,37 @@ public class BChapterServiceImpl implements BChapterService {
} }
int sort = bChapterRepository.selectMaxSort(model.getPid(), model.getLessonId()); int sort = bChapterRepository.selectMaxSort(model.getPid(), model.getLessonId());
model.setSort(sort); model.setSort(sort);
model.setCourseTime(dto.getFileTime());
// model.setCorpId(corpId); // model.setCorpId(corpId);
bFile.setChapterId(model.getBusinessId()); bFile.setChapterId(model.getBusinessId());
bFile.setLessonId(model.getLessonId()); bFile.setLessonId(model.getLessonId());
UserUtil.setCurrentPersistOperation(bFile); UserUtil.setCurrentPersistOperation(bFile);
//新建章节数据插入到chapter表
line = bChapterRepository.insertSelective(model); line = bChapterRepository.insertSelective(model);
//先判断该课程的第一章的第一节是否是本节 更新blesson表中course_time字段
String cid = bChapterRepository.getFirstChapter(model.getLessonId());
if(cid.equals(model.getBusinessId()) ){
bChapterRepository.updateVideoTimeInLesson(model.getCourseTime(),model.getLessonId());
}
//上传文件数据插入到bfile表中
int x = bFileRepository.insertUploadFile(bFile); int x = bFileRepository.insertUploadFile(bFile);
bChapterRepository.updateClassHourInLesson(model.getLessonId());//更新b_lesson表中 class_hour bChapterRepository.updateClassHourInLesson(model.getLessonId());//更新b_lesson表中 class_hour
} else { } else {
UserUtil.setCurrentMergeOperation(model); UserUtil.setCurrentMergeOperation(model);
bFile.setChapterId(model.getBusinessId());
UserUtil.setCurrentMergeOperation(bFile);
model.setCourseTime(dto.getFileTime());
//先判断该课程的第一章的第一节是否是本节 更新blesson表中course_time字段
String cid = bChapterRepository.getFirstChapter(model.getLessonId());
if(cid.equals(model.getBusinessId()) ){
bChapterRepository.updateVideoTimeInLesson(model.getCourseTime(),model.getLessonId());
}
line = bChapterRepository.updateByPrimaryKeySelective(model); line = bChapterRepository.updateByPrimaryKeySelective(model);
int x = bFileRepository.updateUploadFile(bFile);
} }
//不是为添加章时插入资料表 //不是为添加章时插入资料表
......
...@@ -18,15 +18,6 @@ public interface BFileRepository extends BaseMapper<BFile> { ...@@ -18,15 +18,6 @@ public interface BFileRepository extends BaseMapper<BFile> {
@Update("UPDATE b_chapter set course_time = #{time} where business_id =#{id}") @Update("UPDATE b_chapter set course_time = #{time} where business_id =#{id}")
int updateVideoTimeInChapter(@Param("time") String time,@Param("id") String id); int updateVideoTimeInChapter(@Param("time") String time,@Param("id") String id);
@Update("UPDATE b_lesson set course_time = #{time} where business_id =#{id}")
int updateVideoTimeInLesson(@Param("time") String time,@Param("id") String id);
@Select("SELECT business_id FROM b_chapter " +
"WHERE pid = " +
"( SELECT business_id FROM b_chapter " +
"WHERE lesson_id = #{lessonId} AND chapter_level = 1 AND del_flag != 1 AND flag = 1 ORDER BY sort LIMIT 1 ) " +
"ORDER BY sort LIMIT 1")
String getFirstChapter(@Param("lessonId") String lessonId);
/** /**
* 根据条件查找 * 根据条件查找
...@@ -60,6 +51,10 @@ public interface BFileRepository extends BaseMapper<BFile> { ...@@ -60,6 +51,10 @@ public interface BFileRepository extends BaseMapper<BFile> {
"VALUES (#{businessId}, #{lessonId}, #{chapterId}, #{fileName}, #{videoUrl}, #{fileUrl}, #{type}, #{flag}, #{delFlag}, #{remarks}, #{createBy}, #{updateBy}, #{updateDate}, #{createDate},#{fileSize})") "VALUES (#{businessId}, #{lessonId}, #{chapterId}, #{fileName}, #{videoUrl}, #{fileUrl}, #{type}, #{flag}, #{delFlag}, #{remarks}, #{createBy}, #{updateBy}, #{updateDate}, #{createDate},#{fileSize})")
int insertUploadFile(BFile bFile); int insertUploadFile(BFile bFile);
@Update("update b_file set file_name = #{fileName} , video_url = #{videoUrl} , type = #{type} " +
"where chapter_id =#{chapterId}")
int updateUploadFile(BFile bFile);
} }
...@@ -15,9 +15,12 @@ public class uploadDTO { ...@@ -15,9 +15,12 @@ public class uploadDTO {
@Length(min = 1,max = 256,message = "长度最小为1,最大为200") @Length(min = 1,max = 256,message = "长度最小为1,最大为200")
private String videoUrl; private String videoUrl;
@ApiModelProperty(value = "0视频 1音频 2ppt 3pdf 4word") @ApiModelProperty(value = "课件类型(单选) 0视频 1音频 2PPT 3pdf 4word")
private String type; private String type;
@ApiModelProperty(value = "文件大小") @ApiModelProperty(value = "文件大小")
private String fileSize; private String fileSize;
@ApiModelProperty(value = "视频/音频时间")
private String fileTime;
} }
...@@ -23,4 +23,16 @@ public class FindDepartByNameDTO { ...@@ -23,4 +23,16 @@ public class FindDepartByNameDTO {
@ApiModelProperty(value = "是否有子部门", position = 36) @ApiModelProperty(value = "是否有子部门", position = 36)
@Order(37) @Order(37)
private String flag; private String flag;
private String corpId;
private String outerId;
private String pid;
private String pids;
private String isCreateImgroup;
private int sort;
private String isBiz;
private String managers;
private String creator;
private String createAt;
private String updator;
private String updateAt;
} }
...@@ -78,7 +78,7 @@ public class CurUserAspect { ...@@ -78,7 +78,7 @@ public class CurUserAspect {
initAddAdminDTO.setRName("超级管理员"); initAddAdminDTO.setRName("超级管理员");
initAddAdminDTO.setRStatus("1"); initAddAdminDTO.setRStatus("1");
initAddAdminDTO.setRCreatedate(new Date()); initAddAdminDTO.setRCreatedate(new Date());
initAddAdminDTO.setRPrivilege("M-QDB,F-QDB,P-QDB-ADD,P-QDB-DELETE,P-QDB-UPDATE,P-QDB-VIEW,F-QES,P-QES-ADD,P-QES-DELETE,P-QES-UPDATE,P-QES-VIEW,P-QES-IMPORT,M-PAPER,F-PAPER,P-PAPER-ADD,P-PAPER-DELETE,P-PAPER-CLONE,P-PAPER-EXPORTWORD,P-PAPER-UPDATE,P-PAPER-VIEW,P-PAPER-HISTORY-VIEW,P-PAPER-HISTORY-CHECK,P-PAPER-HISTORY-REMOVE,M-ANALYSIS,F-ANALYSIS,P-ANA-EXAM,P-ANA-PAPER,P-ANA-SCORE,M-USERS,F-USERS,P-USER-ADD,P-USER-IMPORT,P-USER-DELETE,P-USER-UPDATE,P-USER-VIEW,P-USER-EXAMVIEW,F-BRANCH,P-BRANCH-ADD,P-BRANCH-DELETE,P-BRANCH-UPDATE,P-BRANCH-VIEW,F-UPOSITION,P-UPOSITION-ADD,P-UPOSITION-DELETE,P-UPOSITION-UPDATE,P-UPOSITION-VIEW,M-LEARNING,F-COURSE,P-COURSE-ADD,P-COURSE-DELETE,P-COURSE-UPDATE,P-COURSE-DATAVIEW,F-COURSE-CATEGORY,P-COURSE-CATEGORY-ADD,P-COURSE-CATEGORY-DELETE,P-COURSE-CATEGORY-UPDATE,F-COURSE-TEACHER,P-COURSE-TEACHER-ADD,P-COURSE-TEACHER-DELETE,P-COURSE-TEACHER-UPDATE,M-SYSTEM,F-SYS,P-SYS-CONFIG,P-SYS-LOG,F-ADMIN,P-ADMIN-ADD,P-ADMIN-DELETE,P-ADMIN-UPDATE,P-ADMIN-VIEW,F-ROLE,P-ROLE-ADD,P-ROLE-DELETE,P-ROLE-UPDATE,P-ROLE-VIEW,M-OTHER,F-SUPER,P-OTH-SUPER"); initAddAdminDTO.setRPrivilege("M-CTS-F,F-HOME,F-QUERY,M-EOL,F-UNJOIN,F-FINISH,F-INVALID,M-MTS,F-COURSE,P-STUDY-COURSE,P-RELEASE-COURSE,F-TRAIN,P-TRAIN-STUDY,P-TRAIN-RELEASE,F-DATA,P-PD-VIEW,P-PD-DOWN,P-PD-DEL,P-UD-VIEW,P-UD-DOWN,P-UD-DEL,F-FOLLOW,P-FOLLOW-COURSE,P-FOLLOW-TRAIN,F-INTEGRAL,P-NULL-1,M-CTS-B,F-ONLINE,P-ONLINE-VIEW,P-ONLINE-ADD,P-ONLINE-UPDATE,P-ONLINE-APPOINT,P-ONLINE-TRACK,P-ONLINE-RECOMMEND,P-ONLINE-CLOSE,P-ONLINE-DEL,F-COURSE-RECOMMEND,P-CR-VIEW,P-CR-UNRECOMMEND,P-CR-MAINTAIN,F-UNDERLINE,P-UNDER-VIEW,P-UNDER-ADD,P-UNDER-UPDATE,P-UNDER-NULL,F-CATEGORY,F-LABEL,F-INTEGRAL-M,P-NULL-2,M-QDB,F-QDB,P-QDB-VIEW,P-QDB-ADD,P-QDB-UPDATE,P-QDB-DELETE,P-QDB-ANALYSIS,F-QES,P-QES-VIEW,P-QES-ADD,P-QES-UPDATE,P-QES-DELETE,P-QES-IMPORT,M-PAPER,F-PAPER-CATE,P-PAPER-CATE-VIEW,P-PAPER-CATE-ADD,P-PAPER-CATE-UPDATE,P-PAPER-CATE-DELETE,F-PAPER,P-PAPER-VIEW,P-PAPER-ADD,P-PAPER-UPDATE,P-PAPER-DELETE,,P-PAPER-HISTORY-VIEW,P-PAPER-HISTORY-CHECK,M-ANALYSIS,P-ANA-PAPER,P-ANA-EXAM,P-ANA-SCORE,M-SYSTEM,F-MAIN-MANAGE,P-COLUMN,P-BANNER,F-USER-MANAGE,P-USER-VIEW,P-STOP-START,P-ROLE-EDIT,P-STATISTICS-VIEW,F-ROLE-MANAGE,P-ROLE-MANAGE,P-OPERATION,P-DATALIMIT");
initAddAdminDTO.setType("1"); initAddAdminDTO.setType("1");
initAddAdminDTO.setCorpId(curUser.getCorpId()); initAddAdminDTO.setCorpId(curUser.getCorpId());
initAddAdminDTO.setRType("0"); initAddAdminDTO.setRType("0");
......
...@@ -173,4 +173,15 @@ public class SysUserController extends PaginationController<SysUser> { ...@@ -173,4 +173,15 @@ public class SysUserController extends PaginationController<SysUser> {
userServiceImpl.queryMyInfo(curUser)); userServiceImpl.queryMyInfo(curUser));
} }
@ApiOperation(value = "709 查询当前登录人信息",notes = "查询当前登录人名字")
@GetMapping("/getName")
public Result getNameByUserId(CurUser curUser) {
return Result.builder(new PersistModel(1),
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
userServiceImpl.queryMyInfo(curUser));
}
} }
package org.rcisoft.sys.user.service; package org.rcisoft.sys.user.service;
import org.rcisoft.common.util.feignDto.MTUserInfoRspDTO;
import org.rcisoft.core.aop.PageUtil; import org.rcisoft.core.aop.PageUtil;
import org.rcisoft.sys.user.dto.QueryMenuResDTO; import org.rcisoft.sys.user.dto.QueryMenuResDTO;
import org.rcisoft.sys.menu.entity.SysMenu; import org.rcisoft.sys.menu.entity.SysMenu;
...@@ -49,4 +50,6 @@ public interface SysUserService { ...@@ -49,4 +50,6 @@ public interface SysUserService {
* @return * @return
*/ */
MyInfoDTO queryMyInfo(CurUser curUser); MyInfoDTO queryMyInfo(CurUser curUser);
List<MTUserInfoRspDTO> getName(CurUser curUser);
} }
...@@ -123,6 +123,8 @@ public class SysUserServiceImpl implements SysUserService { ...@@ -123,6 +123,8 @@ public class SysUserServiceImpl implements SysUserService {
} }
} }
result = sysUserMapper.insertUserRoleById(userRoles); result = sysUserMapper.insertUserRoleById(userRoles);
return result;
} }
return 0; return 0;
} }
...@@ -322,4 +324,14 @@ public class SysUserServiceImpl implements SysUserService { ...@@ -322,4 +324,14 @@ public class SysUserServiceImpl implements SysUserService {
myInfoDTO.setNotFinishedExam(myInfoDTOCount.getNotFinishedExam()); myInfoDTO.setNotFinishedExam(myInfoDTOCount.getNotFinishedExam());
return myInfoDTO; return myInfoDTO;
} }
@Override
public List<MTUserInfoRspDTO> getName(CurUser curUser) {
MTUserGetsReqDTO mtUserGetsReqDTO = new MTUserGetsReqDTO();
mtUserGetsReqDTO.setCorpId(curUser.getCorpId());
List<String> list = new ArrayList<>();
list.add(curUser.getUserId());
mtUserGetsReqDTO.setIds(list);
return mtCotactApiRequestClient.userGets(mtUserGetsReqDTO);
}
} }
...@@ -85,6 +85,8 @@ global: ...@@ -85,6 +85,8 @@ global:
pdf_location: pdf pdf_location: pdf
cut_pdf_location: cutPdf cut_pdf_location: cutPdf
cource_logo_location: /course/logo cource_logo_location: /course/logo
return_upload_server_location: http://192.168.5.201:18080/eduServer/
other: other:
is_server_linux: 5 is_server_linux: 5
cut_pdf_num: 30 cut_pdf_num: 30
......
...@@ -90,8 +90,6 @@ libreoffice: ...@@ -90,8 +90,6 @@ libreoffice:
port: 8997 port: 8997
mt: mt:
api: http://192.168.5.47/api/ api: http://192.168.5.47/api/
eureka: eureka:
instance: instance:
hostname: localhost hostname: localhost
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<appender name="fileInfoLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> <appender name="fileInfoLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.LevelFilter"> <filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level> <level>info</level>
<onMatch>DENY</onMatch> <onMatch>DENY</onMatch>
<onMismatch>ACCEPT</onMismatch> <onMismatch>ACCEPT</onMismatch>
</filter> </filter>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<!--滚动策略--> <!--滚动策略-->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--路径--> <!--路径-->
<fileNamePattern>/working/test/info.%d.log</fileNamePattern> <fileNamePattern>/working/test/info_edu.%d.log</fileNamePattern>
</rollingPolicy> </rollingPolicy>
</appender> </appender>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<!--滚动策略--> <!--滚动策略-->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--路径--> <!--路径-->
<fileNamePattern>/working/test/error.%d.log</fileNamePattern> <fileNamePattern>/working/test/error_edu.%d.log</fileNamePattern>
</rollingPolicy> </rollingPolicy>
</appender> </appender>
<!-- <!--
...@@ -65,14 +65,12 @@ ...@@ -65,14 +65,12 @@
</springProfile> </springProfile>
<springProfile name="prod"> <springProfile name="prod">
<root level="info"> <root level="debug">
<appender-ref ref="consoleLog" /> <appender-ref ref="consoleLog" />
<appender-ref ref="fileInfoLog" /> <appender-ref ref="fileInfoLog" />
<appender-ref ref="fileErrorLog" /> <appender-ref ref="fileErrorLog" />
</root> </root>
</springProfile> </springProfile>
<springProfile name="mt"> <springProfile name="mt">
<root level="info"> <root level="info">
<appender-ref ref="consoleLog" /> <appender-ref ref="consoleLog" />
......
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