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

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

# Conflicts:
#	src/main/java/org/rcisoft/business/bdictionary/service/impl/BDictionaryServiceImpl.java
parents 4931e5aa 96724b96
...@@ -9,35 +9,32 @@ import javax.validation.constraints.NotBlank; ...@@ -9,35 +9,32 @@ import javax.validation.constraints.NotBlank;
@Data @Data
public class AddOrUpdateDTO { public class AddOrUpdateDTO {
@Length(min = 1,max = 64,message = "长度最小为1,最大为64")
@ApiModelProperty(value = "BannerId" ,required = false, dataType = "varchar") @ApiModelProperty(value = "BannerId" ,required = false, dataType = "varchar")
private String businessId; private String businessId;
@Length(min = 1,max = 64,message = "长度最小为1,最大为64")
@NotBlank @NotBlank
@ApiModelProperty(value = "标题" ,required = true, dataType = "varchar") @ApiModelProperty(value = "标题" ,required = true, dataType = "varchar")
private String title; private String title;
@Length(min = 1,max = 128,message = "长度最小为1,最大为256")
@NotBlank @NotBlank
@ApiModelProperty(value = "图片地址",required = true, dataType = "varchar") @ApiModelProperty(value = "图片地址",required = true, dataType = "varchar")
private String imageUrl; private String imageUrl;
@Length(min = 1,max = 1,message = "长度最小为1,最大为1")
@NotBlank @NotBlank
@ApiModelProperty(value = "是否为外部链接(0:否,1:是)",required = true, dataType = "varchar") @ApiModelProperty(value = "是否为外部链接(0:否,1:是)",required = true, dataType = "varchar")
private String isExternalLink; private String isExternalLink;
@Length(min = 1,max = 256,message = "长度最小为1,最大为256")
@ApiModelProperty(value = "外部URL",required = false, dataType = "varchar") @ApiModelProperty(value = "外部URL",required = false, dataType = "varchar")
private String externalUrl; private String externalUrl;
@Length(min = 1,max = 1,message = "长度最小为1,最大为1")
@ApiModelProperty(value = "类型(0:线下,1:线上)",required = false, dataType = "varchar") @ApiModelProperty(value = "类型(0:线下,1:线上)",required = false, dataType = "varchar")
private String lineType; private String lineType;
@Length(min = 1,max = 64,message = "长度最小为1,最大为64")
@ApiModelProperty(value = "课程ID",required = false, dataType = "varchar") @ApiModelProperty(value = "课程ID",required = false, dataType = "varchar")
private String courseId; private String courseId;
private String userId;
private String corpId;
} }
...@@ -83,7 +83,7 @@ public class BCourseController extends PaginationController<BCourse> { ...@@ -83,7 +83,7 @@ public class BCourseController extends PaginationController<BCourse> {
@ApiImplicitParam(name = "businessId", value = "课程分类id", required = true, dataType = "varchar") @ApiImplicitParam(name = "businessId", value = "课程分类id", required = true, dataType = "varchar")
@PostMapping(value = "/remove") @PostMapping(value = "/remove")
public Result remove(CurUser curUser, @Valid String businessId, BindingResult br) { public Result remove(CurUser curUser, @Valid String businessId, BindingResult br) {
PersistModel data = bCourseServiceImpl.removeCourse(businessId); PersistModel data = bCourseServiceImpl.removeCourse(curUser.getCorpId(),businessId);
return Result.builder(data, return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS, MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR, MessageConstant.MESSAGE_ALERT_ERROR,
......
...@@ -36,8 +36,13 @@ public interface BCourseRepository extends BaseMapper<BCourse> { ...@@ -36,8 +36,13 @@ public interface BCourseRepository extends BaseMapper<BCourse> {
"AND c_name=#{cName}") "AND c_name=#{cName}")
List<BCourse> selectOneByName(@Param("cName") String id, @Param("corpId") String corpId); List<BCourse> selectOneByName(@Param("cName") String id, @Param("corpId") String corpId);
@Update("UPDATE b_course SET del_flag='1' WHERE business_id = #{businessId}") // @Update("UPDATE b_course SET del_flag='1' WHERE business_id = #{businessId}")
int removeCourse(@Param("businessId") String id); @Update("<script>" +
"<foreach collection=\"courseIds\" item=\"item\" separator=\";\">" +
"UPDATE b_course SET del_flag='1' WHERE business_id = #{item}" +
"</foreach>" +
"</script>")
int removeCourse(@Param("courseIds") List<String> courseIds);
@Update("UPDATE b_course SET c_name = #{cName} WHERE business_id = #{businessId}") @Update("UPDATE b_course SET c_name = #{cName} WHERE business_id = #{businessId}")
int updateCourse(BCourse bCourse); int updateCourse(BCourse bCourse);
......
...@@ -17,7 +17,7 @@ public interface BCourseService { ...@@ -17,7 +17,7 @@ public interface BCourseService {
PersistModel insertCourse(BCourse bCourse); PersistModel insertCourse(BCourse bCourse);
PersistModel removeCourse(String id); PersistModel removeCourse(String corpId,String id);
PersistModel updateCourse(BCourse bCoursee); PersistModel updateCourse(BCourse bCoursee);
......
...@@ -7,6 +7,7 @@ import org.rcisoft.business.bcourse.dto.AllCourseDTO; ...@@ -7,6 +7,7 @@ import org.rcisoft.business.bcourse.dto.AllCourseDTO;
import org.rcisoft.business.bcourse.dto.QueryCourseResDTO; import org.rcisoft.business.bcourse.dto.QueryCourseResDTO;
import org.rcisoft.business.bcourse.entity.BCourse; import org.rcisoft.business.bcourse.entity.BCourse;
import org.rcisoft.business.bcourse.service.BCourseService; import org.rcisoft.business.bcourse.service.BCourseService;
import org.rcisoft.business.blesson.util.recursion;
import org.rcisoft.core.aop.PageUtil; import org.rcisoft.core.aop.PageUtil;
import org.rcisoft.core.constant.MessageConstant; import org.rcisoft.core.constant.MessageConstant;
import org.rcisoft.core.exception.ServiceException; import org.rcisoft.core.exception.ServiceException;
...@@ -85,9 +86,22 @@ public class BCourseServiceImpl implements BCourseService { ...@@ -85,9 +86,22 @@ public class BCourseServiceImpl implements BCourseService {
} }
@Override @Override
public PersistModel removeCourse(String id) { public PersistModel removeCourse(String corpId,String id) {
List<AllCourseDTO> allCourse = null;
if (org.apache.commons.lang3.StringUtils.isNotEmpty(id)){
allCourse = this.findAllCourse(corpId);
}
List<String> courseIds = null;
if (allCourse != null){
//查询出所有子分类
courseIds = recursion.FindSons(id,allCourse);
//将一级分类放入分类集合中
courseIds.add(id);
}
return new PersistModel( return new PersistModel(
bCourseRepository.removeCourse(id), MessageConstant.MESSAGE_ALERT_SUCCESS); bCourseRepository.removeCourse(courseIds), MessageConstant.MESSAGE_ALERT_SUCCESS);
} }
@Override @Override
......
...@@ -97,8 +97,8 @@ public class BDictionaryServiceImpl implements BDictionaryService { ...@@ -97,8 +97,8 @@ public class BDictionaryServiceImpl implements BDictionaryService {
public List<BDictionary> findAllColumnConfig(CurUser curUser){ public List<BDictionary> findAllColumnConfig(CurUser curUser){
List<String> configList = new ArrayList<>(); List<String> configList = new ArrayList<>();
configList.add("0");//关注人数 configList.add("0");//关注人数
configList.add("2");//总裁读书会
configList.add("1");//在学人数 configList.add("1");//在学人数
configList.add("2");//总裁读书会
List<BDictionary> DictList = bDictionaryRepository.findAllColumnConfig(curUser,configList); List<BDictionary> DictList = bDictionaryRepository.findAllColumnConfig(curUser,configList);
return DictList; return DictList;
} }
......
...@@ -186,11 +186,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -186,11 +186,11 @@ public class BLessonController extends PaginationController<BLesson> {
businessId); businessId);
} }
@ApiOperation(value="612 课程培训条件查询", notes="课程培训条件查询(工作台)", response = BLesson.class) @ApiOperation(value="612 课程培训条件查询", notes="课程培训条件查询(Banner内部资源)", response = BLesson.class)
@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar") @ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")
@PostMapping(value = "/findLessonTrain") @GetMapping(value = "/findLessonAtBannerByPagination")
public Result findLessonTrain(CurUser curUser, @Valid LessonTrainDTO lessonTrainDTO, BindingResult bindingResult) { public Result findLessonAtBannerByPagination(CurUser curUser, @Valid LessonTrainAtBannerDTO lessonTrainDTO, BindingResult bindingResult) {
bLessonService.findLessonTrain(getPaginationUtility(),lessonTrainDTO); bLessonService.findLessonAtBannerByPagination(getPaginationUtility(),lessonTrainDTO);
GridModel gridModel = getGridModelResponse(); GridModel gridModel = getGridModelResponse();
return Result.builder(new PersistModel(1), return Result.builder(new PersistModel(1),
MessageConstant.MESSAGE_ALERT_SUCCESS, MessageConstant.MESSAGE_ALERT_SUCCESS,
...@@ -265,4 +265,25 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -265,4 +265,25 @@ public class BLessonController extends PaginationController<BLesson> {
MessageConstant.MESSAGE_ALERT_ERROR, MessageConstant.MESSAGE_ALERT_ERROR,
gridModel); gridModel);
} }
@ApiOperation(value="618 发布课程", notes="根据ID发布一个课程")
@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")
@PostMapping(value = "/release")
public Result release(CurUser curUser,String businessId,BindingResult bindingResult) {
PersistModel data = bLessonService.releaseBLesson(businessId);
return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
businessId);
}
// @ApiOperation(value="619 推荐课程", notes="根据ID推荐课程")
// @PostMapping(value = "/recommend")
// public Result recommend(CurUser curUser,@Valid RecommendLessonDTO recommendLessonDTO,BindingResult bindingResult) {
// PersistModel data = bLessonService.recommendBLesson(curUser,recommendLessonDTO);
// return Result.builder(data,
// MessageConstant.MESSAGE_ALERT_SUCCESS,
// MessageConstant.MESSAGE_ALERT_ERROR,
// recommendLessonDTO);
// }
} }
...@@ -2,10 +2,7 @@ package org.rcisoft.business.blesson.dao; ...@@ -2,10 +2,7 @@ package org.rcisoft.business.blesson.dao;
import org.apache.ibatis.annotations.*; import org.apache.ibatis.annotations.*;
import org.rcisoft.business.blabel.dto.QueryLabelResDTO; import org.rcisoft.business.blabel.dto.QueryLabelResDTO;
import org.rcisoft.business.blesson.dto.FindAllLessonDTO; import org.rcisoft.business.blesson.dto.*;
import org.rcisoft.business.blesson.dto.FindListLessonDTO;
import org.rcisoft.business.blesson.dto.FirstPageQueryDTO;
import org.rcisoft.business.blesson.dto.ILessonCountDTO;
import org.rcisoft.business.blesson.entity.BLesson; import org.rcisoft.business.blesson.entity.BLesson;
import org.rcisoft.business.blesson.entity.BLessonLabel; import org.rcisoft.business.blesson.entity.BLessonLabel;
import org.rcisoft.core.base.BaseMapper; import org.rcisoft.core.base.BaseMapper;
...@@ -355,6 +352,72 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -355,6 +352,72 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
"</script>"}) "</script>"})
int closeLesson(BLesson model); int closeLesson(BLesson model);
/**
* 查询课程状态
* @param id
* @return
*/
@Select(" <script> select release_state from b_lesson where business_id = #{id} </script>")
int findLessonReleaseState(String id);
/**
* 根据课程id发布课程
*
* @param model
* @return
*/
@Update({"<script>",
"update b_lesson",
" <set>",
" <if test='updateBy != null'>update_by=#{updateBy},</if>",
" <if test='updateDate != null'>update_date=#{updateDate},</if>",
" release_state = '2'",
" </set>",
"where business_id=#{businessId}",
"</script>"})
int releaseLesson(BLesson model);
/**
* 首页分页查询全部课程
* @param param
* @return
*/
@Select(" <script> select bl.* " +
// " ,su.name lecturerName " +
// " ,suc.name createByName " +
" from b_lesson bl " +
// " left join s_user su on su.business_id = bl.lecturer_id " +
// " left join s_user suc on suc.business_id = bl.create_by " +
// " left join b_viewrange bv on bl.business_id = bv.lesson_id " +
// " left join b_viewrange_son bvs on bv.business_id = bvs.viewrange_id " +
// " left join b_course bc on bc.business_id = bl.course_id " +
" where bl.del_flag != 1 and bl.flag = 1 " +
// " and su.del_flag != 1 and su.flag = 1 " +
// " and suc.del_flag != 1 and suc.flag = 1 " +
// " and bv.del_flag != 1 and bv.flag = 1 " +
// " and bl.corp_id = #{param.corpId} "+
// " and su.corp_id = #{param.corpId} "+
// " and suc.corp_id = #{param.corpId} "+
// " and bv.corp_id = #{param.corpId} "+
" and bl.release_state = 2 " +
// " and ((bvs.type = 0 and bvs.target_id = #{param.userId}) " +
// " <if test=\"param.departs != null and param.departs.size() > 0 \"> " +
// " or (bvs.type = 1 and bvs.target_id in " +
// " <foreach item='item' index='index' collection='param.departs' open='(' separator=',' close=')'> #{item} </foreach>)" +
// " </if>) " +
" <if test= \" lessonName !=null and lessonName != ''\">and lesson_name like CONCAT('%',#{lessonName},'%') " +
// " or su.name like CONCAT('%',#{param.viewParam},'%'))" +
" </if> " +
// " <if test= \" courseIds !=null and courseIds.size() > 0 \">and course_id in " +
// " <foreach item='item' index='index' collection='courseIds' open='(' separator=',' close=')'> #{item} </foreach> " +
// " </if> " +
" order by bl.release_date desc " +
"</script>")
@ResultMap(value = "BaseResultMap")
List<BLesson> findLessonAtBannerByPagination(LessonTrainAtBannerDTO param);
/** /**
* 查询我发布和我学习课程数量 * 查询我发布和我学习课程数量
* @param userId * @param userId
...@@ -369,14 +432,30 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -369,14 +432,30 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" and lecturer_id = #{userId} and release_state = '2') publishedCount, " + " and lecturer_id = #{userId} and release_state = '2') publishedCount, " +
"(select COUNT(1) from b_lesson where del_flag != 1 and flag = 1 " + "(select COUNT(1) from b_lesson where del_flag != 1 and flag = 1 " +
" and lecturer_id = #{userId} and release_state = '4') closedCount, "+ " and lecturer_id = #{userId} and release_state = '4') closedCount, "+
"(select COUNT(1) from b_lesson_person where del_flag != 1 and flag = 1 " +
" and person_id = #{userId} ) learnAllCount, " + "(select COUNT(1) from b_lesson_person blp " +
"(select COUNT(1) from b_lesson_person where del_flag != 1 and flag = 1 " + " LEFT join b_lesson bl on blp.lesson_id = bl.business_id " +
" and person_id = #{userId} and is_finish = '2') finishCount, " + " where blp.del_flag != 1 and blp.flag = 1 " +
"(select COUNT(1) from b_lesson_person where del_flag != 1 and flag = 1 " + " and bl.del_flag != 1 and bl.flag = 1 " +
" and person_id = #{userId} and is_finish = '1') notFinishCount, " + " and blp.person_id = #{userId} ) learnAllCount, " +
"(select COUNT(1) from b_lesson_person where del_flag != 1 and flag = 1 " +
" and person_id = #{userId} and is_finish = '0') notStartCount " + "(select COUNT(1) from b_lesson_person blp " +
" LEFT join b_lesson bl on blp.lesson_id = bl.business_id " +
" where blp.del_flag != 1 and blp.flag = 1 " +
" and bl.del_flag != 1 and bl.flag = 1 " +
" and blp.person_id = #{userId} and is_finish = '2') finishCount, " +
"(select COUNT(1) from b_lesson_person blp " +
" LEFT join b_lesson bl on blp.lesson_id = bl.business_id " +
" where blp.del_flag != 1 and blp.flag = 1 " +
" and bl.del_flag != 1 and bl.flag = 1 " +
" and blp.person_id = #{userId} and is_finish = '1') notFinishCount, " +
"(select COUNT(1) from b_lesson_person blp " +
" LEFT join b_lesson bl on blp.lesson_id = bl.business_id " +
" where blp.del_flag != 1 and blp.flag = 1 " +
" and bl.del_flag != 1 and bl.flag = 1 " +
" and blp.person_id = #{userId} and is_finish = '0') notStartCount " +
"</script>"}) "</script>"})
ILessonCountDTO iLessonCount(String userId); ILessonCountDTO iLessonCount(String userId);
...@@ -461,13 +540,18 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -461,13 +540,18 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
"b_lesson les " + "b_lesson les " +
"LEFT JOIN b_course b1 ON b1.business_id = les.course_id " + "LEFT JOIN b_course b1 ON b1.business_id = les.course_id " +
"AND b1.corp_id = #{corpId} " + "AND b1.corp_id = #{corpId} " +
"and b1.del_flag != 1 and b1.flag = 1 "+
"LEFT JOIN b_course b2 ON b2.business_id = b1.pid " + "LEFT JOIN b_course b2 ON b2.business_id = b1.pid " +
"AND b2.corp_id = #{corpId} " + "AND b2.corp_id = #{corpId} " +
"and b2.del_flag != 1 and b2.flag = 1 "+
"LEFT JOIN b_course b3 ON b3.business_id = b2.pid " + "LEFT JOIN b_course b3 ON b3.business_id = b2.pid " +
"AND b3.corp_id = #{corpId} " + "AND b3.corp_id = #{corpId} " +
"and b3.del_flag != 1 and b3.flag = 1 "+
"LEFT JOIN s_user u1 ON u1.business_id = les.lecturer_id " + "LEFT JOIN s_user u1 ON u1.business_id = les.lecturer_id " +
"AND u1.corp_id = #{corpId}" + "AND u1.corp_id = #{corpId}" +
"and u1.del_flag != 1 and u1.flag = 1 "+
"WHERE 1=1 " + "WHERE 1=1 " +
"and les.del_flag != 1 and les.flag = 1 "+
"AND les.corp_id = #{corpId}" + "AND les.corp_id = #{corpId}" +
"<if test='!isAdmin'>" + "<if test='!isAdmin'>" +
"AND les.lecturer_id IN" + "AND les.lecturer_id IN" +
......
...@@ -17,7 +17,6 @@ public class AddLessonDTO { ...@@ -17,7 +17,6 @@ public class AddLessonDTO {
@NotBlank @NotBlank
@ApiModelProperty(value = "课程名称",required = true) @ApiModelProperty(value = "课程名称",required = true)
@Length(min = 1,max = 200,message = "长度最小为1,最大为150")
private String lessonName; private String lessonName;
@ApiModelProperty(value = "默认封面图片url") @ApiModelProperty(value = "默认封面图片url")
...@@ -25,7 +24,6 @@ public class AddLessonDTO { ...@@ -25,7 +24,6 @@ public class AddLessonDTO {
@ApiModelProperty(value = "课程分类",required = true) @ApiModelProperty(value = "课程分类",required = true)
@NotBlank @NotBlank
@Length(min = 1,max = 64,message = "长度最小为1,最大为50")
private String courseId; private String courseId;
...@@ -39,7 +37,6 @@ public class AddLessonDTO { ...@@ -39,7 +37,6 @@ public class AddLessonDTO {
@ApiModelProperty(value = "课程类型(0:课程 1:培训)",required = true) @ApiModelProperty(value = "课程类型(0:课程 1:培训)",required = true)
@NotBlank @NotBlank
@Length(min = 1,max = 64,message = "长度最小为1,最大为50")
private String lessonType; private String lessonType;
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
......
...@@ -7,19 +7,17 @@ import org.hibernate.validator.constraints.Length; ...@@ -7,19 +7,17 @@ import org.hibernate.validator.constraints.Length;
import javax.persistence.Transient; import javax.persistence.Transient;
@Data @Data
public class LessonTrainDTO { public class LessonTrainAtBannerDTO {
@ApiModelProperty(value = "课程名称",required = false) @ApiModelProperty(value = "课程名称",required = false)
@Length(min = 1,max = 200,message = "长度最小为1,最大为150")
private String lessonName; private String lessonName;
@ApiModelProperty(value = "发布状态(0:待发布 1:审核中 2:已发布 3:已驳回 4:已关闭)") // @ApiModelProperty(value = "发布状态(0:待发布 1:审核中 2:已发布 3:已驳回 4:已关闭)")
@Length(min = 1,max = 1,message = "长度最小为1,最大为1") // private String releaseState;
private String releaseState;
@ApiModelProperty(value = "创建人姓名") // @ApiModelProperty(value = "创建人姓名")
@Transient // @Transient
private String createByName; // private String createByName;
@ApiModelProperty(value = "课程类型(0:课程 1:培训)") @ApiModelProperty(value = "课程类型(0:课程 1:培训)")
@Length(min = 1,max = 1,message = "长度最小为1,最大为1") @Length(min = 1,max = 1,message = "长度最小为1,最大为1")
......
package org.rcisoft.business.blesson.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class RecommendLessonDTO {
@ApiModelProperty(value = "课程Id")
private String lessonId;
@ApiModelProperty(value = "推荐范围(人)多人之间用','隔开")
private String recommendPerson;
@ApiModelProperty(value = "推荐范围(部门)多人之间用','隔开")
private String recommendDepart;
}
...@@ -43,7 +43,7 @@ public class BLesson extends IdEntity<BLesson> { ...@@ -43,7 +43,7 @@ public class BLesson extends IdEntity<BLesson> {
@Length(min = 1,max = 200,message = "长度最小为1,最大为150") @Length(min = 1,max = 200,message = "长度最小为1,最大为150")
private String lessonName; private String lessonName;
@ApiModelProperty(value = "*默认封面图片url") @ApiModelProperty(value = "*封面图片url")
private String defaultUrl; private String defaultUrl;
@ApiModelProperty(value = "课时") @ApiModelProperty(value = "课时")
......
...@@ -104,13 +104,27 @@ public interface BLessonService{ ...@@ -104,13 +104,27 @@ public interface BLessonService{
*/ */
PersistModel closeBLesson(String id); PersistModel closeBLesson(String id);
/**
* 发布课程
* @param id
* @return
*/
PersistModel releaseBLesson(String id);
/**
* 推荐课程
* @param recommendLessonDTO
* @return
*/
PersistModel recommendBLesson(CurUser curUser,RecommendLessonDTO recommendLessonDTO);
/** /**
* 课程培训条件查询 * 课程培训条件查询
* @param pageUtil * @param pageUtil
* @param lessonTrainDTO * @param lessonTrainDTO
* @return * @return
*/ */
List<BLesson> findLessonTrain(PageUtil pageUtil, LessonTrainDTO lessonTrainDTO); List<BLesson> findLessonAtBannerByPagination(PageUtil pageUtil, LessonTrainAtBannerDTO lessonTrainDTO);
/** /**
* 我发布的总数 * 我发布的总数
......
...@@ -17,7 +17,9 @@ import org.rcisoft.business.blesson.entity.BViewrange; ...@@ -17,7 +17,9 @@ import org.rcisoft.business.blesson.entity.BViewrange;
import org.rcisoft.business.blesson.entity.BViewrangeSon; import org.rcisoft.business.blesson.entity.BViewrangeSon;
import org.rcisoft.core.aop.PageUtil; import org.rcisoft.core.aop.PageUtil;
import org.rcisoft.core.constant.MessageConstant; import org.rcisoft.core.constant.MessageConstant;
import org.rcisoft.core.exception.ServiceException;
import org.rcisoft.core.model.PersistModel; import org.rcisoft.core.model.PersistModel;
import org.rcisoft.core.result.ResultExceptionEnum;
import org.rcisoft.core.util.IdGen; import org.rcisoft.core.util.IdGen;
import org.rcisoft.core.util.UserUtil; import org.rcisoft.core.util.UserUtil;
import org.rcisoft.sys.user.bean.CurUser; import org.rcisoft.sys.user.bean.CurUser;
...@@ -239,10 +241,50 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -239,10 +241,50 @@ public class BLessonServiceImpl implements BLessonService {
} }
@Override @Override
public List<BLesson> findLessonTrain(PageUtil pageUtil, LessonTrainDTO lessonTrainDTO) { public PersistModel releaseBLesson(String id) {
int state = bLessonRepository.findLessonReleaseState(id);
if (state != 0){
throw new ServiceException(ResultExceptionEnum.STATE_NOT_RELEASE);
}
BLesson bLesson = new BLesson();
bLesson.setBusinessId(id);
UserUtil.setCurrentMergeOperation(bLesson);
int line = bLessonRepository.releaseLesson(bLesson);
//int line = bLessonRepository.deleteByPrimaryKey(id);
return new PersistModel(line, MessageConstant.MESSAGE_ALERT_SUCCESS);
}
@Override
public PersistModel recommendBLesson(CurUser curUser, RecommendLessonDTO recommendLessonDTO) {
////
// if (StringUtils.isNotEmpty(recommendLessonDTO.getRecommendPerson()) || StringUtils.isNotEmpty(recommendLessonDTO.getRecommendDepart())){
// BViewrange bViewrange = setBViewrangeInfo(model);
// //插入可见范围表
// bViewrangeRepository.insertSelective(bViewrange);
// //插入可见范围子表
// List<BViewrangeSon> bViewrangeSons = new ArrayList<>();
// //model.getViewRangePerson()不为空 新建bViewrangeSon对象放入bViewrangeSons中
// if (StringUtils.isNotEmpty(model.getViewRangePerson())){
// String[] viewRangePerson = model.getViewRangePerson().split(",");
// bViewrangeSons = addBViewrangeSon(bViewrangeSons,viewRangePerson,"0",bViewrange.getBusinessId());
// }
// if (StringUtils.isNotEmpty(model.getViewRangeDepart())){
// String[] viewRangeDepart = model.getViewRangeDepart().split(",");
// bViewrangeSons = addBViewrangeSon(bViewrangeSons,viewRangeDepart,"1",bViewrange.getBusinessId());
// }
// //插入子表
// bViewrangeRepository.insertBViewrangeSons(bViewrangeSons);
// }
return null; return null;
} }
@Override
public List<BLesson> findLessonAtBannerByPagination(PageUtil pageUtil, LessonTrainAtBannerDTO lessonTrainDTO) {
return bLessonRepository.findLessonAtBannerByPagination(lessonTrainDTO);
}
@Override @Override
public ILessonCountDTO iLessonCount(String userId) { public ILessonCountDTO iLessonCount(String userId) {
return bLessonRepository.iLessonCount(userId); return bLessonRepository.iLessonCount(userId);
......
...@@ -26,21 +26,13 @@ public class Global { ...@@ -26,21 +26,13 @@ public class Global {
/*服务器地址*/
@Value("${global.other.server_url}")
private String SERVER_URL;
/*服务器保存图片路径*/ /*服务器保存图片路径*/
@Value("${global.path.base_upload_server_location}") @Value("${global.path.base_upload_server_location}")
private String BASE_UPLOAD_SERVER_LOCATION; private String BASE_UPLOAD_SERVER_LOCATION;
/*容器外路径*/
@Value("${global.path.physical_upload_server_location}")
private String PHYSICAL_UPLOAD_SERVER_LOCATION;
/*课程相关文件路径*/ /*课程相关文件路径*/
@Value("${global.path.course_location}") @Value("${global.path.course_location}")
private String COURSE_LOCATION; private String COURSE_LOCATION;
...@@ -53,9 +45,6 @@ public class Global { ...@@ -53,9 +45,6 @@ public class Global {
@Value("${global.path.sl_location}") @Value("${global.path.sl_location}")
private String SL_LOCATION; private String SL_LOCATION;
/*服务器freemarker模板位置*/
@Value("${global.path.freemarker_location}")
private String FREEMARKER_LOCATION;
/*服务器上传路径*/ /*服务器上传路径*/
@Value("${global.path.image_location}") @Value("${global.path.image_location}")
...@@ -93,92 +82,17 @@ public class Global { ...@@ -93,92 +82,17 @@ public class Global {
@Value("${global.other.cut_pdf_num}") @Value("${global.other.cut_pdf_num}")
private Integer CUT_PDF_NUM; private Integer CUT_PDF_NUM;
/*excel模板位置*/
@Value("${global.path.excel_template_location}")
private String EXCEL_TEMPLATE_LOCATION;
/*课程封面路径*/ /*课程封面路径*/
@Value("${global.path.cource_logo_location}") @Value("${global.path.cource_logo_location}")
private String COURSE_LOGO_LOCATION; private String COURSE_LOGO_LOCATION;
/*课程代码路径*/
@Value("${global.path.cource_code_location}")
private String COURSE_CODE_LOCATION;
/*课程工程代码路径*/
@Value("${global.path.cource_project_location}")
private String COURSE_PROJECT_LOCATION;
/*图片路径*/
@Value("${global.path.images_location}")
private String IMAGES_LOCATION;
/*课程默认图片路径*/
@Value("${global.default_location.course}")
private String DEFAULT_COURSE_LOCATION;
/*默认学生头像路径*/
@Value("${global.default_location.student}")
private String DEFAULT_STUDENT_LOCATION;
/*默认教师头像路径*/
@Value("${global.default_location.teacher}")
private String DEFAULT_TEACHER_LOCATION;
/*默认轮播图路径*/
@Value("${global.default_location.carousel}")
private String DEFAULT_CAROUSEL_LOCATION;
/*开课封面路径*/
@Value("${global.path.lanch_logo_location}")
private String LANCH_LOGO_LOCATION;
/*mdtup*/
@Value("${global.path.md_file_location}")
private String MD_FILE_LOCATION;
/*是否是服务器(为1代表是服务器)*/ /*是否是服务器(为1代表是服务器)*/
@Value("${global.other.is_server_linux}") @Value("${global.other.is_server_linux}")
private String IS_SERVER_LINUX; private String IS_SERVER_LINUX;
/*code长度限制*/
@Value("${global.other.max_code_length}")
private String MAX_CODE_LENGTH;
/*用户默认密码*/
@Value("${global.password.default}")
private String DEFAULT_PASSWORD;
/*password最小长度*/
@Value("${global.password.min_password}")
private String PASSWORD_MIN_PASSWORD;
/*password最大长度*/
@Value("${global.password.max_password}")
private String PASSWORD_MAX_PASSWORD;
/*che的配置模板路径*/
@Value("${global.path.che_def_template_location}")
private String CHE_DEF_TEMPLATE_LOCATION;
/*che初始化项目目录*/
@Value("${global.path.che_project_init_location}")
private String CHE_PROJECT_INIT_LOCATION;
/*管理员Code*/
@Value("${global.code.admin}")
private String adminCode;
/*教师Code*/
@Value("${global.code.teacher}")
private String teacherCode;
/*学生Code*/
@Value("${global.code.student}")
private String studentCode;
/*libreoffice ip*/ /*libreoffice ip*/
@Value("${libreoffice.ip}") @Value("${libreoffice.ip}")
...@@ -188,19 +102,4 @@ public class Global { ...@@ -188,19 +102,4 @@ public class Global {
@Value("${libreoffice.port}") @Value("${libreoffice.port}")
private Integer libreofficePort; private Integer libreofficePort;
/*导出的学生作业暂存路径*/
@Value("${global.path.student_code_location}")
private String STUDENT_CODE_LOCATION;
/*openOffice安装路径*/
@Value("${global.other.open_office_home}")
private String OPEN_OFFICE_HOME;
@Value("${global.path.xml_location}")
private String XML_LOCATION;
} }
...@@ -33,7 +33,7 @@ public class FileUploadController extends FileController { ...@@ -33,7 +33,7 @@ public class FileUploadController extends FileController {
@Autowired @Autowired
private Global global; private Global global;
@ApiOperation(value="上传图片", notes="上传图片到服务器") @ApiOperation(value="901 上传图片", notes="上传图片到服务器")
@ApiImplicitParams({@ApiImplicitParam(name = "importFile", value = "图片文件", required = true, dataType = "MultipartFile"), @ApiImplicitParams({@ApiImplicitParam(name = "importFile", value = "图片文件", required = true, dataType = "MultipartFile"),
// @ApiImplicitParam(name = "businessId", value = "课程id", required = true, dataType = "varchar") // @ApiImplicitParam(name = "businessId", value = "课程id", required = true, dataType = "varchar")
}) })
......
...@@ -27,7 +27,8 @@ public enum ResultExceptionEnum { ...@@ -27,7 +27,8 @@ public enum ResultExceptionEnum {
NO_DATA(4011,"该数据不存在"), NO_DATA(4011,"该数据不存在"),
MUST_NOT_FILLED(4012,"必填未填写"), MUST_NOT_FILLED(4012,"必填未填写"),
NOT_MORE_COUNT(4013,"添加超过规定个数"), NOT_MORE_COUNT(4013,"添加超过规定个数"),
APPOINT_NOT_CLOSE(4014,"必修不能退出") APPOINT_NOT_CLOSE(4014,"必修不能退出"),
STATE_NOT_RELEASE(4015,"该课程状态不能发布")
; ;
private Integer code; private Integer code;
......
...@@ -12,6 +12,7 @@ import org.rcisoft.core.model.PersistModel; ...@@ -12,6 +12,7 @@ import org.rcisoft.core.model.PersistModel;
import org.rcisoft.core.result.Result; import org.rcisoft.core.result.Result;
import org.rcisoft.sys.menu.entity.SysMenu; import org.rcisoft.sys.menu.entity.SysMenu;
import org.rcisoft.sys.menu.service.SysMenuService; import org.rcisoft.sys.menu.service.SysMenuService;
import org.rcisoft.sys.user.bean.CurUser;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -44,10 +45,13 @@ public class SysMenuController extends ResponseController { ...@@ -44,10 +45,13 @@ public class SysMenuController extends ResponseController {
// return sysMenuServiceImpl.queryMenuTreeForSelectedByRP(id); // return sysMenuServiceImpl.queryMenuTreeForSelectedByRP(id);
// } // }
@ApiOperation(value="根据id 查询 menu", notes="根据id 查询 menu")
@ApiOperation(value = "根据id 查询 menu", notes = "根据id 查询 menu")
@ApiImplicitParam(name = "id", value = "businessId", required = true, dataType = "Integer", paramType = "path") @ApiImplicitParam(name = "id", value = "businessId", required = true, dataType = "Integer", paramType = "path")
@GetMapping("queryMenuById/{id}") @GetMapping("queryMenuById/{id}")
public Result queryMenuById(@PathVariable("id") String id){ public Result queryMenuById(@PathVariable("id") String id) {
SysMenu menu = sysMenuServiceImpl.queryMenuById(id); SysMenu menu = sysMenuServiceImpl.queryMenuById(id);
return Result.builder(new PersistModel(1), return Result.builder(new PersistModel(1),
...@@ -57,16 +61,16 @@ public class SysMenuController extends ResponseController { ...@@ -57,16 +61,16 @@ public class SysMenuController extends ResponseController {
} }
@ApiOperation(value="增加菜单code", notes="true:合法;false:不合法;不能有其它的输出") @ApiOperation(value = "增加菜单code", notes = "true:合法;false:不合法;不能有其它的输出")
@ApiImplicitParam(name = "menuCode", value = "菜单编号", required = false, dataType = "varchar") @ApiImplicitParam(name = "menuCode", value = "菜单编号", required = false, dataType = "varchar")
@PostMapping("queryMenuCodeValidate") @PostMapping("queryMenuCodeValidate")
public String queryDeptCodeValidate(@RequestParam("menuCode") String menuCode){ public String queryDeptCodeValidate(@RequestParam("menuCode") String menuCode) {
return "true"; return "true";
} }
@ApiOperation(value="修改菜单", notes="修改菜单") @ApiOperation(value = "修改菜单", notes = "修改菜单")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "Integer", paramType = "path"), @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "Integer", paramType = "path"),
@ApiImplicitParam(name = "parentIds", value = "所有父级编号", required = false, dataType = "varchar"), @ApiImplicitParam(name = "parentIds", value = "所有父级编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "name", value = "名称", required = false, dataType = "varchar"), @ApiImplicitParam(name = "name", value = "名称", required = false, dataType = "varchar"),
...@@ -82,7 +86,7 @@ public class SysMenuController extends ResponseController { ...@@ -82,7 +86,7 @@ public class SysMenuController extends ResponseController {
@ApiImplicitParam(name = "modelId", value = "model ID in sys_model", required = false, dataType = "varchar"), @ApiImplicitParam(name = "modelId", value = "model ID in sys_model", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "remarks", value = "备注", required = false, dataType = "varchar")}) @ApiImplicitParam(name = "remarks", value = "备注", required = false, dataType = "varchar")})
@PostMapping("adminLog/menuUpdate") @PostMapping("adminLog/menuUpdate")
public Result menuUpdate(@Valid SysMenu menu, BindingResult br){ public Result menuUpdate(@Valid SysMenu menu, BindingResult br) {
PersistModel persistModel = sysMenuServiceImpl.mergeMenu(menu); PersistModel persistModel = sysMenuServiceImpl.mergeMenu(menu);
return Result.builder(persistModel, return Result.builder(persistModel,
MessageConstant.MESSAGE_ALERT_SUCCESS, MessageConstant.MESSAGE_ALERT_SUCCESS,
...@@ -90,10 +94,10 @@ public class SysMenuController extends ResponseController { ...@@ -90,10 +94,10 @@ public class SysMenuController extends ResponseController {
menu); menu);
} }
@ApiOperation(value="删除菜单", notes="根据id删除菜单") @ApiOperation(value = "删除菜单", notes = "根据id删除菜单")
@ApiImplicitParam(name = "id", value = "businessId", required = true, dataType = "varchar", paramType = "path") @ApiImplicitParam(name = "id", value = "businessId", required = true, dataType = "varchar", paramType = "path")
@PostMapping("adminLog/menuDelete/{id}") @PostMapping("adminLog/menuDelete/{id}")
public Result menuDelete(@PathVariable("id") String id){ public Result menuDelete(@PathVariable("id") String id) {
PersistModel persistModel = sysMenuServiceImpl.removeMenu(id); PersistModel persistModel = sysMenuServiceImpl.removeMenu(id);
return Result.builder(persistModel, return Result.builder(persistModel,
...@@ -103,9 +107,9 @@ public class SysMenuController extends ResponseController { ...@@ -103,9 +107,9 @@ public class SysMenuController extends ResponseController {
} }
@ApiOperation(value="列出菜单", notes="列出菜单") @ApiOperation(value = "列出菜单", notes = "列出菜单")
@GetMapping("/queryMenus") @GetMapping("/queryMenus")
public Result queryMenus(){ public Result queryMenus() {
List<SysMenu> menus = sysMenuServiceImpl.queryMenus(); List<SysMenu> menus = sysMenuServiceImpl.queryMenus();
return Result.builder(new PersistModel(1), return Result.builder(new PersistModel(1),
MessageConstant.MESSAGE_ALERT_SUCCESS, MessageConstant.MESSAGE_ALERT_SUCCESS,
......
...@@ -2,7 +2,6 @@ package org.rcisoft.sys.menu.service; ...@@ -2,7 +2,6 @@ package org.rcisoft.sys.menu.service;
import org.rcisoft.common.model.CommonMenuModel;
import org.rcisoft.common.model.TreeViewModel; import org.rcisoft.common.model.TreeViewModel;
import org.rcisoft.core.model.PersistModel; import org.rcisoft.core.model.PersistModel;
import org.rcisoft.sys.menu.entity.SysMenu; import org.rcisoft.sys.menu.entity.SysMenu;
...@@ -59,4 +58,5 @@ public interface SysMenuService { ...@@ -59,4 +58,5 @@ public interface SysMenuService {
* @return * @return
*/ */
List<SysMenu> queryMenus(); List<SysMenu> queryMenus();
} }
...@@ -9,7 +9,6 @@ import org.rcisoft.common.model.HomeMenuModel; ...@@ -9,7 +9,6 @@ import org.rcisoft.common.model.HomeMenuModel;
import org.rcisoft.common.model.SysMenuModel; import org.rcisoft.common.model.SysMenuModel;
import org.rcisoft.common.model.TreeViewModel; import org.rcisoft.common.model.TreeViewModel;
import org.rcisoft.core.model.PersistModel; import org.rcisoft.core.model.PersistModel;
import org.rcisoft.core.util.UserUtil;
import org.rcisoft.sys.menu.dao.SysMenuRepository; import org.rcisoft.sys.menu.dao.SysMenuRepository;
import org.rcisoft.sys.menu.entity.SysMenu; import org.rcisoft.sys.menu.entity.SysMenu;
import org.rcisoft.sys.menu.service.SysMenuService; import org.rcisoft.sys.menu.service.SysMenuService;
......
...@@ -102,9 +102,18 @@ public class SysUserController extends PaginationController<SysUser> { ...@@ -102,9 +102,18 @@ public class SysUserController extends PaginationController<SysUser> {
businessId); businessId);
} }
@ApiOperation(value = "706 根据id 查询菜单", notes = "userId 和 modelId查询 menu")
@ApiImplicitParam(name = "modelId", value = "前台菜单10 后台菜单20", required = true, dataType = "varchar", paramType = "path")
@GetMapping("/queryMenuById")
public Result queryMenu(CurUser curUser,String modelId) {
return Result.builder(new PersistModel(1),
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
userServiceImpl.queryMenusById(curUser.getCorpId(),curUser.getUserId(),modelId));
}
/** /**
* 查询菜单 * 查询菜单
*
* @param user * @param user
* @return * @return
*/ */
......
...@@ -3,6 +3,7 @@ package org.rcisoft.sys.user.dao; ...@@ -3,6 +3,7 @@ package org.rcisoft.sys.user.dao;
import org.apache.ibatis.annotations.*; import org.apache.ibatis.annotations.*;
import org.rcisoft.core.base.BaseMapper; import org.rcisoft.core.base.BaseMapper;
import org.rcisoft.sys.user.dto.QueryMenuResDTO;
import org.rcisoft.sys.user.dto.QuerySysUserDTO; import org.rcisoft.sys.user.dto.QuerySysUserDTO;
import org.rcisoft.sys.user.entity.SysUser; import org.rcisoft.sys.user.entity.SysUser;
import org.rcisoft.sys.user.entity.UserRole; import org.rcisoft.sys.user.entity.UserRole;
...@@ -22,10 +23,10 @@ public interface SysUserMapper extends BaseMapper<SysUser> { ...@@ -22,10 +23,10 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
"WHERE su.del_flag = 0 " + "WHERE su.del_flag = 0 " +
"and sr.r_status != 0 " + "and sr.r_status != 0 " +
"and corp_id = #{corpId} " + "and su.corp_id = #{corpId} " +
"<if test=\"name!=null and name != ''\"> and su.name like CONCAT('%',#{name},'%') </if>" + "<if test=\"name!=null and name != ''\"> and su.name like CONCAT('%',#{name},'%') </if>" +
"<if test=\"roleName!=null and roleName != ''\"> and sr.role_name = #{roleName}</if>" + "<if test=\"roleName!=null and roleName != ''\"> and sr.r_name = #{roleName}</if>" +
"<if test=\"flag!=null and flag != ''\"> and su.flag = #{flag}</if></script>") "<if test=\"flag!=null and flag != ''\"> and su.flag = #{flag}</if></script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "BaseResultMap")
List<SysUser> queryUsers(QuerySysUserDTO dto); List<SysUser> queryUsers(QuerySysUserDTO dto);
...@@ -49,7 +50,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> { ...@@ -49,7 +50,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
"</script>") "</script>")
int stopFlag(@Param("businessId") List<String> businessId); int stopFlag(@Param("businessId") List<String> businessId);
@Select("<script>select ur.user_id from s_r_user_role ur left JOIN s_role sr on ur.role_id = sr.business_id where sr.role_name in" + @Select("<script>select ur.user_id from s_r_user_role ur left JOIN tm_admin_role sr on ur.role_id = sr.r_id where sr.r_name in" +
"<foreach item='item' index='index' collection='roleName' open='(' separator=',' close=')'> #{item} </foreach> " + "<foreach item='item' index='index' collection='roleName' open='(' separator=',' close=')'> #{item} </foreach> " +
"</script>") "</script>")
List<String> adminId(@Param("roleName") List<String> roleName); List<String> adminId(@Param("roleName") List<String> roleName);
...@@ -135,9 +136,9 @@ public interface SysUserMapper extends BaseMapper<SysUser> { ...@@ -135,9 +136,9 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
@Delete("<script>delete from s_r_user_role where user_id = #{businessId}</script>") @Delete("<script>delete from s_r_user_role where user_id = #{businessId}</script>")
int deleteUserRole(String businessId); int deleteUserRole(String businessId);
@Select("<script>select su.*,ba.`name` as agencyName,sr.role_name as roleName,sr.business_id as roleId from s_user su " + @Select("<script>select su.*,ba.`name` as agencyName,sr.r_name as roleName,sr.business_id as roleId from s_user su " +
"LEFT JOIN s_r_user_role sru on su.business_id = sru.user_id " + "LEFT JOIN s_r_user_role sru on su.business_id = sru.user_id " +
"LEFT JOIN s_role sr on sru.role_id = sr.business_id " + "LEFT JOIN tm_admin_role sr on sru.role_id = sr.r_id " +
"where su.is_created = '1' and su.del_flag = 0 and su.flag = 1 " + "where su.is_created = '1' and su.del_flag = 0 and su.flag = 1 " +
"</script>") "</script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "BaseResultMap")
...@@ -169,8 +170,30 @@ public interface SysUserMapper extends BaseMapper<SysUser> { ...@@ -169,8 +170,30 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
@Select("<script>SELECT sr.type AS roleList " + @Select("<script>SELECT sr.type AS roleList " +
"FROM s_user AS su " + "FROM s_user AS su " +
"LEFT JOIN s_r_user_role AS ru ON su.business_id = ru.user_id " + "LEFT JOIN s_r_user_role AS ru ON su.business_id = ru.user_id " +
"LEFT JOIN s_role AS sr ON ru.role_id = sr.business_id " + "LEFT JOIN tm_admin_role AS sr ON ru.role_id = sr.r_id " +
"WHERE su.del_flag = 0 " + "WHERE su.del_flag = 0 " +
"AND su.business_id = #{userId}</script>") "AND su.business_id = #{userId}</script>")
List<String> queryRoleTypeByUserId(@Param("userId")String userId); List<String> queryRoleTypeByUserId(@Param("userId")String userId);
/**
* 查询用户 menu 19-09-30
* @param corpId
* @param businessId
* @param modelId
* @return
*/
@Select("SELECT DISTINCT ur.user_id, rm.MENU_ID menu_id, sm.`NAME` menu_name, sm.PARENT_ID, sm.HREF href " +
"FROM s_user su " +
"LEFT JOIN s_r_user_role ur ON ur.user_id = su.business_id " +
"LEFT JOIN s_role_menu rm ON ur.role_id = rm.role_id " +
"LEFT JOIN s_menu sm ON sm.business_id = rm.MENU_ID " +
"WHERE " +
"su.del_flag != 1 " +
"AND su.flag = 1 " +
"AND su.corp_id = #{corpId} " +
"AND su.business_id = #{businessId} " +
"AND sm.MODEL_ID = #{modelId} " +
"ORDER BY sm.SORT ")
@ResultMap(value = "DtoResultMap")
List<QueryMenuResDTO> queryMenus(@Param("corpId") String corpId, @Param("businessId") String businessId, @Param("modelId") String modelId );
} }
package org.rcisoft.sys.user.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class QueryMenuResDTO {
@ApiModelProperty(value = "菜单id")
private String menuId;
@ApiModelProperty(value = "菜单名")
private String menuName;
@ApiModelProperty(value = "跳转链接")
private String href;
//
// @ApiModelProperty(value = "子集菜单")
// private List<QueryMenuResDTO> child;
}
package org.rcisoft.sys.user.service; package org.rcisoft.sys.user.service;
import org.rcisoft.common.model.GridModel;
import org.rcisoft.core.aop.PageUtil; import org.rcisoft.core.aop.PageUtil;
import org.rcisoft.core.model.PersistModel; import org.rcisoft.sys.user.dto.QueryMenuResDTO;
import org.rcisoft.sys.menu.entity.SysMenu; import org.rcisoft.sys.menu.entity.SysMenu;
import org.rcisoft.sys.user.bean.CurUser; import org.rcisoft.sys.user.bean.CurUser;
import org.rcisoft.sys.user.dto.QuerySysUserDTO; import org.rcisoft.sys.user.dto.QuerySysUserDTO;
...@@ -32,4 +31,6 @@ public interface SysUserService { ...@@ -32,4 +31,6 @@ public interface SysUserService {
int startUserByUserBusinessId(String businessId); int startUserByUserBusinessId(String businessId);
List<SysMenu> queryUserMenus(CurUser user); List<SysMenu> queryUserMenus(CurUser user);
List<QueryMenuResDTO> queryMenusById(String corpId, String id, String modelId);
} }
...@@ -7,6 +7,7 @@ import org.rcisoft.core.exception.ServiceException; ...@@ -7,6 +7,7 @@ import org.rcisoft.core.exception.ServiceException;
import org.rcisoft.core.result.ResultServiceEnums; import org.rcisoft.core.result.ResultServiceEnums;
import org.rcisoft.core.util.UserUtil; import org.rcisoft.core.util.UserUtil;
import org.rcisoft.sys.menu.dao.SysMenuRepository; import org.rcisoft.sys.menu.dao.SysMenuRepository;
import org.rcisoft.sys.user.dto.QueryMenuResDTO;
import org.rcisoft.sys.menu.entity.SysMenu; import org.rcisoft.sys.menu.entity.SysMenu;
import org.rcisoft.sys.user.bean.CurUser; import org.rcisoft.sys.user.bean.CurUser;
import org.rcisoft.sys.user.dao.SysUserMapper; import org.rcisoft.sys.user.dao.SysUserMapper;
...@@ -16,12 +17,10 @@ import org.rcisoft.sys.user.entity.UserRole; ...@@ -16,12 +17,10 @@ import org.rcisoft.sys.user.entity.UserRole;
import org.rcisoft.sys.user.service.SysUserService; import org.rcisoft.sys.user.service.SysUserService;
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.Isolation;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
import static java.util.Arrays.asList; import static java.util.Arrays.asList;
...@@ -127,5 +126,8 @@ public class SysUserServiceImpl implements SysUserService { ...@@ -127,5 +126,8 @@ public class SysUserServiceImpl implements SysUserService {
return sysMenuRepository.queryMyMenu(sysMenu); return sysMenuRepository.queryMyMenu(sysMenu);
} }
@Override
public List<QueryMenuResDTO> queryMenusById(String corpId, String id, String modelId) {
return sysUserMapper.queryMenus(corpId,id,modelId);
}
} }
...@@ -13,7 +13,7 @@ server: ...@@ -13,7 +13,7 @@ server:
# org.springframework.web: DEBUG # org.springframework.web: DEBUG
druid: druid:
# url: jdbc:mysql://127.0.0.1:3306/new_edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false # url: jdbc:mysql://127.0.0.1:3306/edu_db2?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
url: jdbc:mysql://10.96.131.16:55558/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false url: jdbc:mysql://10.96.131.16:55558/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
#url: jdbc:mysql://120.52.179.75:13318/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false #url: jdbc:mysql://120.52.179.75:13318/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
username: root username: root
...@@ -61,28 +61,17 @@ spring: ...@@ -61,28 +61,17 @@ spring:
max-request-size: 100MB max-request-size: 100MB
global: global:
default_location:
course: /default/course.jpg
student: /default/student.png
teacher: /default/teacher.png
carousel: /default/carousel.jpg
lk: lk:
publicalias: publiccert publicalias: publiccert
storePwd: rcrtcyedu2 storePwd: rcrtcyedu2
subject: edu2 subject: edu2
licPath: /lk/license.lic licPath: /lk/license.lic
pubPath: /lk/publicCerts.store pubPath: /lk/publicCerts.store
password:
default: 123456
min_password: 6
max_password: 16
path: path:
base_upload_server_location: E:/eduServer base_upload_server_location: E:/eduServer
physical_upload_server_location: E:/eduServer
course_location: course course_location: course
lesson_location: lesson lesson_location: lesson
sl_location: sl sl_location: sl
freemarker_location: /freemarker
image_location: /upload image_location: /upload
video_location: video video_location: video
audio_location: audio audio_location: audio
...@@ -91,27 +80,11 @@ global: ...@@ -91,27 +80,11 @@ global:
ppt_location: ppt ppt_location: ppt
pdf_location: pdf pdf_location: pdf
cut_pdf_location: cutPdf cut_pdf_location: cutPdf
excel_template_location: excel-template/
cource_logo_location: /course/logo cource_logo_location: /course/logo
images_location: /images
lanch_logo_location: /lanch/logo
md_file_location: mdFiles
che_def_template_location: /WEB-INF/classes/che-def-jsonfile/java-mysql.json
che_project_init_location: /working/dockervolume/chedir/project
cource_code_location: code
cource_project_location: project
student_code_location: studentCode
xml_location: /xmlTemp
other: other:
server_url: http://106.2.3.134:10180/eduServer
is_server_linux: 5 is_server_linux: 5
max_code_length: 15
open_office_home: D:/oppenOffice/openOffice
cut_pdf_num: 30 cut_pdf_num: 30
code:
admin: ROLE_1001
teacher: ROLE_1002
student: ROLE_1003
libreoffice: libreoffice:
ip: 192.168.1.125 ip: 192.168.1.125
......
server: server:
port: 8081 port: 8081
context-path: /edu #ContextPath must start with '/' and not end with '/'
tomcat: tomcat:
max-threads: 300 max-threads: 300
servlet:
context-path: /
#uri-encoding: UTF-8 #uri-encoding: UTF-8
type: dev1
#logging: #logging:
# path:/working/resource/eduServer/SpringBootLog
# level: # level:
# root: INFO # root: INFO
# org.springframework.web: info # org.springframework.web: DEBUG
druid: druid:
url: jdbc:mysql://edu2_mysql:3306/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false url: jdbc:mysql://mt_mysql:3306/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
username: root username: root
password: 123456 password: 91isoft
initial-size: 1 initial-size: 1
min-idle: 1 min-idle: 1
max-active: 20 max-active: 20
...@@ -41,129 +42,56 @@ pagehelper: ...@@ -41,129 +42,56 @@ pagehelper:
spring: spring:
jackson: jackson:
default-property-inclusion: non_null default-property-inclusion: non_null
http: date-format: yyyy-MM-dd
# encoding: time-zone: GMT+8
# force: true
# charset: UTF-8
# enabled: true
multipart:
enabled: true
max-file-size: 500Mb
max-request-size: 1000Mb
mvc: mvc:
throw-exception-if-no-handler-found: true throw-exception-if-no-handler-found: true
resources: resources:
add-mappings: false add-mappings: false
redis:
host: edu2_redis
port: 6379
pool:
max-idle: 50
max-active: 1000
min-idle: 5
max-wait: -1
database: 0
password: ''
timeout: 3600
freemarker: freemarker:
charset: UTF-8 charset: UTF-8
suffix: .ftl suffix: .ftl
template-loader-path: classpath:/templates/ template-loader-path: classpath:/templates/
servlet:
lxc: multipart:
lxc_prefix: lessonLxc max-file-size: 100MB
lxc_ports: lxcPorts max-request-size: 100MB
lxc_dockerfilePath: /eduLxc
lxc_initPort: 20001
lxc_maxPort: 30000
lxc_minu: 30
lxc_isRemote: 1
lxc_endlineTime: 10
lxc_delayTime: 30
springfox:
documentation:
swagger:
v2:
path: /api-docs
jwt:
header: Authorization
secret: mySecret
expiration: 604800
tokenHead: "Bearer "
login_secert_key: "base64EncodedSecretKey"
route:
authentication:
path: "/login"
refresh: "/refresh"
register: "/register"
global: global:
default_location:
course: /default/course.jpg
student: /default/student.png
teacher: /default/teacher.png
carousel: /default/carousel.jpg
lk: lk:
publicalias: publiccert publicalias: publiccert
storePwd: rcrtcyedu2 storePwd: rcrtcyedu2
subject: edu2 subject: edu2
licPath: /lk/license.lic licPath: /lk/license.lic
pubPath: /lk/publicCerts.store pubPath: /lk/publicCerts.store
password:
default: 123456
min_password: 6
max_password: 16
path: path:
base_upload_server_location: /working/resource/eduServer/ base_upload_server_location: /working/resource/eduServer/
physical_upload_server_location: /working/dockervolume/edu2_data_ubuntu/eduServer
course_location: course course_location: course
lesson_location: lesson lesson_location: lesson
sl_location: sl sl_location: sl
freemarker_location: /freemarker
image_location: /upload image_location: /upload
video_location: video video_location: video
audio_location: audio
temp_location: temp temp_location: temp
file_location: file file_location: file
ppt_location: ppt ppt_location: ppt
pdf_location: pdf pdf_location: pdf
cut_pdf_location: cutPdf cut_pdf_location: cutPdf
excel_template_location: excel-template/
cource_logo_location: /course/logo cource_logo_location: /course/logo
images_location: /images
lanch_logo_location: /lanch/logo
md_file_location: mdFiles
che_def_template_location: /WEB-INF/classes/che-def-jsonfile/java-mysql.json
che_project_init_location: /working/dockervolume/chedir/project
cource_code_location: code
cource_project_location: project
student_code_location: studentCode
xml_location: /xmlTemp
other: other:
server_url: http://106.2.3.134:10180/eduServer is_server_linux: 5
is_server_linux: 1
max_code_length: 15
open_office_home: D:/oppenOffice/openOffice
cut_pdf_num: 30 cut_pdf_num: 30
code:
admin: ROLE_1001
teacher: ROLE_1002
student: ROLE_1003
java: '001'
html: '002'
java_simple: '0001'
java_project: '0002'
html_simple: '1001'
html_project: '1002'
serverLxc: libreoffice:
ip: 120.52.179.75 ip: 192.168.1.125
username: root port: 10188
password: 91isoft_xunda mt:
api: http://221.239.114.20:6789/api/
libreoffice: eureka:
ip: edu2_libre instance:
port: 8997 hostname: localhost
#ip:edu2_libre client:
#port:8997 register-with-eureka: false
\ No newline at end of file fetch-registry: false
\ No newline at end of file
server:
port: 8081
context-path: /edu #ContextPath must start with '/' and not end with '/'
tomcat:
max-threads: 300
#uri-encoding: UTF-8
#logging:
# level:
# root: INFO
# org.springframework.web: DEBUG
druid:
url: jdbc:mysql://edu2_mysql:3306/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
username: root
password: 123456
initial-size: 1
min-idle: 1
max-active: 20
test-on-borrow: true
mybatis:
mapper-locations: classpath:mapper/**/**/*.xml
mapper:
mappers:
- org.rcisoft.core.base.BaseMapper
not-empty: false
identity: MYSQL
pagehelper:
helperDialect: mysql
reasonable: true
supportMethodsArguments: true
params: count=countSql
spring:
jackson:
default-property-inclusion: non_null
date-format: yyyy-MM-dd
time-zone: GMT+8
http:
# encoding:
# force: true
# charset: UTF-8
# enabled: true
multipart:
enabled: true
max-file-size: 500Mb
max-request-size: 1000Mb
mvc:
throw-exception-if-no-handler-found: true
resources:
add-mappings: false
redis:
host: edu2_redis
port: 6379
pool:
max-idle: 50
max-active: 1000
min-idle: 5
max-wait: -1
database: 0
password: ''
timeout: 3600
freemarker:
charset: UTF-8
suffix: .ftl
template-loader-path: classpath:/templates/
lxc:
lxc_prefix: lessonLxc
lxc_ports: lxcPorts
lxc_dockerfilePath: /eduLxc
lxc_initPort: 20001
lxc_maxPort: 30000
lxc_minu: 30
lxc_isRemote: 1
lxc_endlineTime: 10
lxc_delayTime: 30
springfox:
documentation:
swagger:
v2:
path: /api-docs
jwt:
header: Authorization
secret: mySecret
expiration: 604800
tokenHead: "Bearer "
login_secert_key: "base64EncodedSecretKey"
route:
authentication:
path: "/login"
refresh: "/refresh"
register: "/register"
global:
default_location:
course: /default/course.jpg
student: /default/student.png
teacher: /default/teacher.png
carousel: /default/carousel.jpg
lk:
publicalias: publiccert
storePwd: rcrtcyedu2
subject: edu2
licPath: /lk/license.lic
pubPath: /lk/publicCerts.store
password:
default: 123456
min_password: 6
max_password: 16
path:
base_upload_server_location: /working/resource/eduServer/
physical_upload_server_location: /working/dockervolume/edu2_data_ubuntu/eduServer
course_location: course
lesson_location: lesson
sl_location: sl
freemarker_location: /freemarker
image_location: /upload
video_location: video
temp_location: temp
file_location: file
ppt_location: ppt
pdf_location: pdf
cut_pdf_location: cutPdf
excel_template_location: excel-template/
cource_logo_location: /course/logo
images_location: /images
lanch_logo_location: /lanch/logo
md_file_location: mdFiles
che_def_template_location: /WEB-INF/classes/che-def-jsonfile/java-mysql.json
che_project_init_location: /working/dockervolume/chedir/project
cource_code_location: code
cource_project_location: project
student_code_location: studentCode
xml_location: /xmlTemp
other:
server_url: http://106.2.3.134:10180/eduServer
is_server_linux: 1
max_code_length: 15
open_office_home: D:/oppenOffice/openOffice
cut_pdf_num: 30
code:
admin: ROLE_1001
teacher: ROLE_1002
student: ROLE_1003
java: '001'
html: '002'
java_simple: '0001'
java_project: '0002'
html_simple: '1001'
html_project: '1002'
serverLxc:
ip: 103.249.252.109
username: root
password: isoftxunda109
libreoffice:
ip: edu2_libre
port: 8997
\ No newline at end of file
server:
port: 8081
context-path: /edu #ContextPath must start with '/' and not end with '/'
tomcat:
max-threads: 300
#uri-encoding: UTF-8
#logging:
# level:
# root: INFO
# org.springframework.web: DEBUG
druid:
url: jdbc:mysql://edu2_mysql:3306/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
username: root
password: 123456
initial-size: 1
min-idle: 1
max-active: 20
test-on-borrow: true
mybatis:
mapper-locations: classpath:mapper/**/**/*.xml
mapper:
mappers:
- org.rcisoft.core.base.BaseMapper
not-empty: false
identity: MYSQL
pagehelper:
helperDialect: mysql
reasonable: true
supportMethodsArguments: true
params: count=countSql
spring:
jackson:
default-property-inclusion: non_null
date-format: yyyy-MM-dd
time-zone: GMT+8
http:
# encoding:
# force: true
# charset: UTF-8
# enabled: true
multipart:
enabled: true
max-file-size: 500Mb
max-request-size: 1000Mb
mvc:
throw-exception-if-no-handler-found: true
resources:
add-mappings: false
redis:
host: edu2_redis
port: 6379
pool:
max-idle: 50
max-active: 1000
min-idle: 5
max-wait: -1
database: 0
password: ''
timeout: 3600
freemarker:
charset: UTF-8
suffix: .ftl
template-loader-path: classpath:/templates/
lxc:
lxc_prefix: lessonLxc
lxc_ports: lxcPorts
lxc_dockerfilePath: /eduLxc
lxc_initPort: 20001
lxc_maxPort: 30000
lxc_minu: 30
lxc_isRemote: 1
lxc_endlineTime: 10
lxc_delayTime: 30
springfox:
documentation:
swagger:
v2:
path: /api-docs
jwt:
header: Authorization
secret: mySecret
expiration: 604800
tokenHead: "Bearer "
login_secert_key: "base64EncodedSecretKey"
route:
authentication:
path: "/login"
refresh: "/refresh"
register: "/register"
global:
default_location:
course: /default/course.jpg
student: /default/student.png
teacher: /default/teacher.png
carousel: /default/carousel.jpg
lk:
publicalias: publiccert
storePwd: rcrtcyedu2
subject: edu2
licPath: /lk/license.lic
pubPath: /lk/publicCerts.store
password:
default: 123456
min_password: 6
max_password: 16
path:
base_upload_server_location: /working/resource/eduServer/
physical_upload_server_location: /working/dockervolume/edu2_data_ubuntu/eduServer
course_location: course
lesson_location: lesson
sl_location: sl
freemarker_location: /freemarker
image_location: /upload
video_location: video
temp_location: temp
file_location: file
ppt_location: ppt
pdf_location: pdf
cut_pdf_location: cutPdf
excel_template_location: excel-template/
cource_logo_location: /course/logo
images_location: /images
lanch_logo_location: /lanch/logo
md_file_location: mdFiles
che_def_template_location: /WEB-INF/classes/che-def-jsonfile/java-mysql.json
che_project_init_location: /working/dockervolume/chedir/project
cource_code_location: code
cource_project_location: project
student_code_location: studentCode
xml_location: /xmlTemp
other:
server_url: http://106.2.3.134:10180/eduServer
is_server_linux: 1
max_code_length: 15
open_office_home: D:/oppenOffice/openOffice
cut_pdf_num: 30
code:
admin: ROLE_1001
teacher: ROLE_1002
student: ROLE_1003
java: '001'
html: '002'
java_simple: '0001'
java_project: '0002'
html_simple: '1001'
html_project: '1002'
serverLxc:
ip: 106.2.13.29
username: root
password: isoftxunda29
libreoffice:
ip: edu2_libre
port: 8997
\ No newline at end of file
server:
port: 8081
context-path: /edu #ContextPath must start with '/' and not end with '/'
tomcat:
max-threads: 300
#uri-encoding: UTF-8
#logging:
# path:/working/resource/eduServer/SpringBootLog
# level:
# root: INFO
# org.springframework.web: info
druid:
url: jdbc:mysql://edu2_mysql:3306/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
username: root
password: 123456
initial-size: 1
min-idle: 1
max-active: 20
test-on-borrow: true
mybatis:
mapper-locations: classpath:mapper/**/**/*.xml
mapper:
mappers:
- org.rcisoft.core.base.BaseMapper
not-empty: false
identity: MYSQL
pagehelper:
helperDialect: mysql
reasonable: true
supportMethodsArguments: true
params: count=countSql
spring:
jackson:
default-property-inclusion: non_null
http:
# encoding:
# force: true
# charset: UTF-8
# enabled: true
multipart:
enabled: true
max-file-size: 500Mb
max-request-size: 1000Mb
mvc:
throw-exception-if-no-handler-found: true
resources:
add-mappings: false
redis:
host: edu2_redis
port: 6379
pool:
max-idle: 50
max-active: 1000
min-idle: 5
max-wait: -1
database: 0
password: ''
timeout: 3600
freemarker:
charset: UTF-8
suffix: .ftl
template-loader-path: classpath:/templates/
lxc:
lxc_prefix: lessonLxc
lxc_ports: lxcPorts
lxc_dockerfilePath: /eduLxc
lxc_initPort: 20001
lxc_maxPort: 30000
lxc_minu: 30
lxc_isRemote: 1
lxc_endlineTime: 10
lxc_delayTime: 30
springfox:
documentation:
swagger:
v2:
path: /api-docs
jwt:
header: Authorization
secret: mySecret
expiration: 604800
tokenHead: "Bearer "
login_secert_key: "base64EncodedSecretKey"
route:
authentication:
path: "/login"
refresh: "/refresh"
register: "/register"
global:
default_location:
course: /default/course.jpg
student: /default/student.png
teacher: /default/teacher.png
carousel: /default/carousel.jpg
lk:
publicalias: publiccert
storePwd: rcrtcyedu2
subject: edu2
licPath: /lk/license.lic
pubPath: /lk/publicCerts.store
password:
default: 123456
min_password: 6
max_password: 16
path:
base_upload_server_location: /working/resource/eduServer/
physical_upload_server_location: /working/dockervolume/edu2_data_ubuntu/eduServer
course_location: course
lesson_location: lesson
sl_location: sl
freemarker_location: /freemarker
image_location: /upload
video_location: video
temp_location: temp
file_location: file
ppt_location: ppt
pdf_location: pdf
cut_pdf_location: cutPdf
excel_template_location: excel-template/
cource_logo_location: /course/logo
images_location: /images
lanch_logo_location: /lanch/logo
md_file_location: mdFiles
che_def_template_location: /WEB-INF/classes/che-def-jsonfile/java-mysql.json
che_project_init_location: /working/dockervolume/chedir/project
cource_code_location: code
cource_project_location: project
student_code_location: studentCode
xml_location: /xmlTemp
other:
server_url: http://192.168.1.125:10180/eduServer
is_server_linux: 1
max_code_length: 15
open_office_home: D:/oppenOffice/openOffice
cut_pdf_num: 30
code:
admin: ROLE_1001
teacher: ROLE_1002
student: ROLE_1003
java: '001'
html: '002'
java_simple: '0001'
java_project: '0002'
html_simple: '1001'
html_project: '1002'
serverLxc:
ip: 192.168.1.125
username: root
password: 123456
libreoffice:
ip: edu2_libre
port: 8997
\ No newline at end of file
server:
port: 8081
context-path: /edu #ContextPath must start with '/' and not end with '/'
tomcat:
max-threads: 300
#uri-encoding: UTF-8
#logging:
# level:
# root: INFO
# org.springframework.web: DEBUG
druid:
url: jdbc:mysql://edu2_mysql:3306/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
username: root
password: 123456
initial-size: 1
min-idle: 1
max-active: 20
test-on-borrow: true
mybatis:
mapper-locations: classpath:mapper/**/**/*.xml
mapper:
mappers:
- org.rcisoft.core.base.BaseMapper
not-empty: false
identity: MYSQL
pagehelper:
helperDialect: mysql
reasonable: true
supportMethodsArguments: true
params: count=countSql
spring:
jackson:
default-property-inclusion: non_null
http:
# encoding:
# force: true
# charset: UTF-8
# enabled: true
multipart:
enabled: true
max-file-size: 500Mb
max-request-size: 1000Mb
mvc:
throw-exception-if-no-handler-found: true
resources:
add-mappings: false
redis:
host: edu2_redis
port: 7482
pool:
max-idle: 50
max-active: 1000
min-idle: 5
max-wait: -1
database: 0
password: ''
timeout: 3600
freemarker:
charset: UTF-8
suffix: .ftl
template-loader-path: classpath:/templates/
lxc:
lxc_prefix: lessonLxc
lxc_ports: lxcPorts
lxc_dockerfilePath: /eduLxc
lxc_initPort: 20001
lxc_maxPort: 30000
lxc_minu: 30
lxc_isRemote: 1
lxc_endlineTime: 10
lxc_delayTime: 30
springfox:
documentation:
swagger:
v2:
path: /api-docs
jwt:
header: Authorization
secret: mySecret
expiration: 604800
tokenHead: "Bearer "
login_secert_key: "base64EncodedSecretKey"
route:
authentication:
path: "/login"
refresh: "/refresh"
register: "/register"
global:
default_location:
course: /default/course.jpg
student: /default/student.png
teacher: /default/teacher.png
carousel: /default/carousel.jpg
password:
min_password: 6
max_password: 16
path:
base_upload_server_location: /working/resource/eduServer/
physical_upload_server_location: /working/dockervolume/edu2_data_ubuntu/eduServer
course_location: course
lesson_location: lesson
sl_location: sl
freemarker_location: /freemarker
image_location: /upload
video_location: video
temp_location: temp
file_location: file
ppt_location: ppt
pdf_location: pdf
cut_pdf_location: cutPdf
excel_template_location: excel-template/
cource_logo_location: /course/logo
images_location: /images
lanch_logo_location: /lanch/logo
md_file_location: mdFiles
che_def_template_location: /WEB-INF/classes/che-def-jsonfile/java-mysql.json
che_project_init_location: /working/dockervolume/chedir/project
cource_code_location: code
cource_project_location: project
student_code_location: studentCode
other:
server_url: http://106.2.3.134:10180/eduServer
is_server_linux: 1
max_code_length: 15
open_office_home: D:/oppenOffice/openOffice
cut_pdf_num: 30
code:
admin: ROLE_1001
teacher: ROLE_1002
student: ROLE_1003
java: '001'
html: '002'
java_simple: '0001'
java_project: '0002'
html_simple: '1001'
html_project: '1002'
serverLxc:
ip: 172.16.98.108
username: root
password: shangwuibm
libreoffice:
ip: edu2_libre
port: 8997
\ No newline at end of file
spring: spring:
profiles: profiles:
active: dev active: dev
# active: prod
...@@ -72,20 +72,4 @@ ...@@ -72,20 +72,4 @@
</root> </root>
</springProfile> </springProfile>
<springProfile name="prod125">
<root level="info">
<appender-ref ref="consoleLog" />
<appender-ref ref="fileInfoLog" />
<appender-ref ref="fileErrorLog" />
</root>
</springProfile>
<springProfile name="prod103">
<root level="info">
<appender-ref ref="consoleLog" />
<appender-ref ref="fileInfoLog" />
<appender-ref ref="fileErrorLog" />
</root>
</springProfile>
</configuration> </configuration>
\ No newline at end of file
...@@ -25,6 +25,10 @@ ...@@ -25,6 +25,10 @@
<result column="create_date" property="createDate" jdbcType="TIMESTAMP" /> <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
<result column="FLAG" property="flag" jdbcType="VARCHAR" /> <result column="FLAG" property="flag" jdbcType="VARCHAR" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
BUSINESS_ID,parentId,parentIds,name,href,target,icon,sort,isActiviti,isShow,permission,FLAG BUSINESS_ID,parentId,parentIds,name,href,target,icon,sort,isActiviti,isShow,permission,FLAG
</sql> </sql>
......
...@@ -24,6 +24,18 @@ ...@@ -24,6 +24,18 @@
</collection> </collection>
</resultMap> </resultMap>
<resultMap id="DtoResultMap" type="org.rcisoft.sys.user.dto.QueryMenuResDTO">
<result column="menu_id" jdbcType="VARCHAR" property="menuId" />
<result column="menu_name" jdbcType="VARCHAR" property="menuName" />
<result column="href" jdbcType="VARCHAR" property="href" />
</resultMap>
<resultMap id="ChildResultMap" type="org.rcisoft.sys.user.dto.QueryMenuResDTO" extends="DtoResultMap">
<association column="business_id" property="childList" select="org.rcisoft.sys.menu.dao.SysMenuRepository"></association>
</resultMap>
<select id="selectByTeacherCode" parameterType="java.util.List" resultMap="BaseResultMap"> <select id="selectByTeacherCode" parameterType="java.util.List" resultMap="BaseResultMap">
SELECT business_id FROM s_user where del_flag = 0 and flag = 1 and login_name IN SELECT business_id FROM s_user where del_flag = 0 and flag = 1 and login_name IN
<foreach collection="list" item="item" <foreach collection="list" item="item"
......
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