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

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

parents 44ffe959 14fbc593
...@@ -164,7 +164,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -164,7 +164,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>)" + " <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>)" +
" </if> " + " </if> " +
" or (bl.business_id not in (select lesson_id from b_viewrange where del_flag != 1 and flag = 1 AND lesson_id IS NOT NULL ))) " + " or (bl.business_id not in (select lesson_id from b_viewrange where del_flag != 1 and flag = 1 AND lesson_id IS NOT NULL ))) " +
" and bl.person_number > (select `value` from b_dictionary where type = 'ZXRS') " + //ZXRS 在学人数 " and bl.person_number > (select `value` from b_dictionary where type = 'ZXRS') + 0 " + //ZXRS 在学人数
" order by bl.person_number,bl.release_date desc " + " order by bl.person_number,bl.release_date desc " +
"</script>") "</script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "BaseResultMap")
...@@ -252,7 +252,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -252,7 +252,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>)" + " <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>)" +
" </if> " + " </if> " +
" or (bl.business_id not in (select lesson_id from b_viewrange where del_flag != 1 and flag = 1 AND lesson_id IS NOT NULL ))) " + " or (bl.business_id not in (select lesson_id from b_viewrange where del_flag != 1 and flag = 1 AND lesson_id IS NOT NULL ))) " +
" and bl.person_number > (select `value` from b_dictionary where type = 'GZRS') " + //ZXRS 关注人数 " and bl.person_number > (select `value` from b_dictionary where type = 'GZRS') + 0 " + //ZXRS 关注人数
" order by bl.collect_number,bl.release_date desc " + " order by bl.collect_number,bl.release_date desc " +
"</script>") "</script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "BaseResultMap")
...@@ -365,7 +365,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -365,7 +365,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" and bl.release_state = 2 " + " and bl.release_state = 2 " +
" and ((bvs.type = 0 and bvs.target_id = #{param.userId}) " + " and ((bvs.type = 0 and bvs.target_id = #{param.userId}) " +
" or (bl.lecturer_id = #{curUser.userId}) " + " or (bl.lecturer_id = #{param.userId}) " +
" <if test=\"param.departs != null and param.departs.size() > 0 \"> " + " <if test=\"param.departs != null and param.departs.size() > 0 \"> " +
" or (bvs.type = 1 and bvs.target_id in " + " or (bvs.type = 1 and bvs.target_id in " +
" <foreach item='item' index='index' collection='param.departs' open='(' separator=',' close=')'> #{item} </foreach>)" + " <foreach item='item' index='index' collection='param.departs' open='(' separator=',' close=')'> #{item} </foreach>)" +
...@@ -618,9 +618,6 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -618,9 +618,6 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" <if test= \" model.courseIds !=null and model.courseIds.size() > 0 \">and course_id in " + " <if test= \" model.courseIds !=null and model.courseIds.size() > 0 \">and course_id in " +
" <foreach item='item' index='index' collection='model.courseIds' open='(' separator=',' close=')'> #{item} </foreach> " + " <foreach item='item' index='index' collection='model.courseIds' open='(' separator=',' close=')'> #{item} </foreach> " +
" </if> " + " </if> " +
// " <if test=\"model.releaseDateSort !=null and model.releaseDateSort !='' and model.releaseDateSort =='0'.toString()\"> ORDER BY bl.release_date DESC </if> "+
// " <if test=\"model.releaseDateSort !=null and model.releaseDateSort !='' and model.releaseDateSort =='1'.toString()\"> ORDER BY bl.release_date ASC "+
// " </if> "+
" order by br.update_date " + " order by br.update_date " +
"</script>") "</script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "BaseResultMap")
...@@ -667,15 +664,12 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -667,15 +664,12 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" <foreach item='item' index='index' collection='model.departs' open='(' separator=',' close=')'> #{item} </foreach>)" + " <foreach item='item' index='index' collection='model.departs' open='(' separator=',' close=')'> #{item} </foreach>)" +
" </if> " + " </if> " +
" or (bl.business_id not in (select lesson_id from b_viewrange where del_flag != 1 and flag = 1 AND lesson_id IS NOT NULL ))) " + " or (bl.business_id not in (select lesson_id from b_viewrange where del_flag != 1 and flag = 1 AND lesson_id IS NOT NULL ))) " +
" and bl.person_number > (select `value` from b_dictionary where type = 'ZXRS') " + //ZXRS 在学人数 " and bl.person_number > (select `value` from b_dictionary where type = 'ZXRS') + 0 " + //ZXRS 在学人数
" <if test= \" model.viewParam !=null and model.viewParam != ''\">and (bl.lesson_name like CONCAT('%',#{model.viewParam},'%') " + " <if test= \" model.viewParam !=null and model.viewParam != ''\">and (bl.lesson_name like CONCAT('%',#{model.viewParam},'%') " +
" or su.name like CONCAT('%',#{model.viewParam},'%'))</if> " + " or su.name like CONCAT('%',#{model.viewParam},'%'))</if> " +
" <if test= \" model.courseIds !=null and model.courseIds.size() > 0 \">and course_id in " + " <if test= \" model.courseIds !=null and model.courseIds.size() > 0 \">and course_id in " +
" <foreach item='item' index='index' collection='model.courseIds' open='(' separator=',' close=')'> #{item} </foreach> " + " <foreach item='item' index='index' collection='model.courseIds' open='(' separator=',' close=')'> #{item} </foreach> " +
" </if> " + " </if> " +
// " <if test=\"model.releaseDateSort !=null and model.releaseDateSort !='' and model.releaseDateSort =='0'.toString()\"> ORDER BY bl.release_date DESC </if> "+
// " <if test=\"model.releaseDateSort !=null and model.releaseDateSort !='' and model.releaseDateSort =='1'.toString()\"> ORDER BY bl.release_date ASC "+
// " </if> "+
" order by bl.person_number,bl.release_date desc " + " order by bl.person_number,bl.release_date desc " +
"</script>") "</script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "BaseResultMap")
...@@ -721,15 +715,12 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -721,15 +715,12 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" <foreach item='item' index='index' collection='model.departs' open='(' separator=',' close=')'> #{item} </foreach>)" + " <foreach item='item' index='index' collection='model.departs' open='(' separator=',' close=')'> #{item} </foreach>)" +
" </if> " + " </if> " +
" or (bl.business_id not in (select lesson_id from b_viewrange where del_flag != 1 and flag = 1 AND lesson_id IS NOT NULL ))) " + " or (bl.business_id not in (select lesson_id from b_viewrange where del_flag != 1 and flag = 1 AND lesson_id IS NOT NULL ))) " +
" and bl.person_number > (select `value` from b_dictionary where type = 'GZRS') " + //ZXRS 关注人数 " and bl.person_number > (select `value` from b_dictionary where type = 'GZRS') + 0 " + //ZXRS 关注人数
" <if test= \" model.viewParam !=null and model.viewParam != ''\">and (bl.lesson_name like CONCAT('%',#{model.viewParam},'%') " + " <if test= \" model.viewParam !=null and model.viewParam != ''\">and (bl.lesson_name like CONCAT('%',#{model.viewParam},'%') " +
" or su.name like CONCAT('%',#{model.viewParam},'%'))</if> " + " or su.name like CONCAT('%',#{model.viewParam},'%'))</if> " +
" <if test= \" model.courseIds !=null and model.courseIds.size() > 0 \">and course_id in " + " <if test= \" model.courseIds !=null and model.courseIds.size() > 0 \">and course_id in " +
" <foreach item='item' index='index' collection='model.courseIds' open='(' separator=',' close=')'> #{item} </foreach> " + " <foreach item='item' index='index' collection='model.courseIds' open='(' separator=',' close=')'> #{item} </foreach> " +
" </if> " + " </if> " +
// " <if test=\"model.releaseDateSort !=null and model.releaseDateSort !='' and model.releaseDateSort =='0'.toString()\"> ORDER BY bl.release_date DESC </if> "+
// " <if test=\"model.releaseDateSort !=null and model.releaseDateSort !='' and model.releaseDateSort =='1'.toString()\"> ORDER BY bl.release_date ASC "+
// " </if> "+
" order by bl.collect_number,bl.release_date desc " + " order by bl.collect_number,bl.release_date desc " +
"</script>") "</script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "BaseResultMap")
...@@ -799,9 +790,6 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -799,9 +790,6 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" <if test= \" model.courseIds !=null and model.courseIds.size() > 0 \">and course_id in " + " <if test= \" model.courseIds !=null and model.courseIds.size() > 0 \">and course_id in " +
" <foreach item='item' index='index' collection='model.courseIds' open='(' separator=',' close=')'> #{item} </foreach> " + " <foreach item='item' index='index' collection='model.courseIds' open='(' separator=',' close=')'> #{item} </foreach> " +
" </if> " + " </if> " +
// " <if test=\"model.releaseDateSort !=null and model.releaseDateSort !='' and model.releaseDateSort =='0'.toString()\"> ORDER BY bl.release_date DESC </if> "+
// " <if test=\"model.releaseDateSort !=null and model.releaseDateSort !='' and model.releaseDateSort =='1'.toString()\"> ORDER BY bl.release_date ASC "+
// " </if> "+
" order by T.bsum , b.collect_number desc" + " order by T.bsum , b.collect_number desc" +
"</script>") "</script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "BaseResultMap")
......
...@@ -112,7 +112,9 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -112,7 +112,9 @@ public class BLessonServiceImpl implements BLessonService {
@Override @Override
@Transactional(propagation = Propagation.REQUIRED,readOnly = false) @Transactional(propagation = Propagation.REQUIRED,readOnly = false)
public List<BLesson> queryPersonMoreByPagination(PageUtil pageUtil, CurUser curUser) { public List<BLesson> queryPersonMoreByPagination(PageUtil pageUtil, CurUser curUser) {
//---------获取部门id------------
List<String> departs = getDeparts(); List<String> departs = getDeparts();
//------------------------------
return bLessonRepository.queryPersonMore(curUser,departs); return bLessonRepository.queryPersonMore(curUser,departs);
} }
...@@ -138,14 +140,18 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -138,14 +140,18 @@ public class BLessonServiceImpl implements BLessonService {
@Override @Override
@Transactional(propagation = Propagation.REQUIRED,readOnly = false) @Transactional(propagation = Propagation.REQUIRED,readOnly = false)
public List<BLesson> queryConcernByPagination(PageUtil pageUtil,CurUser curUser) { public List<BLesson> queryConcernByPagination(PageUtil pageUtil,CurUser curUser) {
//---------获取部门id------------
List<String> departs = getDeparts(); List<String> departs = getDeparts();
//------------------------------
return bLessonRepository.queryConcern(curUser,departs); return bLessonRepository.queryConcern(curUser,departs);
} }
@Override @Override
@Transactional(propagation = Propagation.REQUIRED,readOnly = false) @Transactional(propagation = Propagation.REQUIRED,readOnly = false)
public List<BLesson> queryInterestedByPagination(PageUtil pageUtil,CurUser curUser) { public List<BLesson> queryInterestedByPagination(PageUtil pageUtil,CurUser curUser) {
//---------获取部门id------------
List<String> departs = getDeparts(); List<String> departs = getDeparts();
//------------------------------
return bLessonRepository.queryInterested(curUser,departs); return bLessonRepository.queryInterested(curUser,departs);
} }
...@@ -350,7 +356,7 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -350,7 +356,7 @@ public class BLessonServiceImpl implements BLessonService {
@Override @Override
@Transactional(propagation = Propagation.REQUIRED,readOnly = false) @Transactional(propagation = Propagation.REQUIRED,readOnly = false)
public List<FindLessonRecommendRspDTO> queryRecommendByLessonId(FindLessonRecommendDTO param) { public List<FindLessonRecommendRspDTO> queryRecommendByLessonId(FindLessonRecommendDTO param) {
//按部门名查询部门id(list)------ //按部门名模糊查询部门id(list)------
List<LessonRecommendDepartDTO> departs = new ArrayList<>(); List<LessonRecommendDepartDTO> departs = new ArrayList<>();
departs.add(new LessonRecommendDepartDTO("1","111")); departs.add(new LessonRecommendDepartDTO("1","111"));
...@@ -385,8 +391,10 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -385,8 +391,10 @@ public class BLessonServiceImpl implements BLessonService {
} }
//按课程查询指派表是否为空 //按课程查询指派表是否为空
List<BAppoint> bAppoints = bAppointRepository.selectByLessonId(appointLessonDTO); List<BAppoint> bAppoints = bAppointRepository.selectByLessonId(appointLessonDTO);
//将指派人截取翻入List中 //将指派人截取放入List中
List<String> userIds = asList(StringUtils.split(appointLessonDTO.getAppointPerson(), ",")); List<String> userIds = new ArrayList<>();
List<String> userIdList = asList(StringUtils.split(appointLessonDTO.getAppointPerson(), ","));
userIds.addAll(userIdList);
BAppoint bAppoint; BAppoint bAppoint;
if (bAppoints == null || bAppoints.size() == 0){ if (bAppoints == null || bAppoints.size() == 0){
//插入指派表 //插入指派表
...@@ -464,7 +472,9 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -464,7 +472,9 @@ public class BLessonServiceImpl implements BLessonService {
@Override @Override
@Transactional(propagation = Propagation.REQUIRED,readOnly = false) @Transactional(propagation = Propagation.REQUIRED,readOnly = false)
public List<BLesson> queryListAllLessonByPagination(PageUtil pageUtil, FindListLessonDTO model, List<AllCourseDTO> allCourse) { public List<BLesson> queryListAllLessonByPagination(PageUtil pageUtil, FindListLessonDTO model, List<AllCourseDTO> allCourse) {
//---------获取部门------------
List<String> departs = getDeparts(); List<String> departs = getDeparts();
//----------------------------
model.setDeparts(departs); model.setDeparts(departs);
List<String> courseIds; List<String> courseIds;
if (allCourse != null){ if (allCourse != null){
......
...@@ -3,8 +3,6 @@ package org.rcisoft.common.util.feignClient; ...@@ -3,8 +3,6 @@ package org.rcisoft.common.util.feignClient;
import org.rcisoft.core.result.Ret; import org.rcisoft.core.result.Ret;
import org.rcisoft.common.util.feignDto.*; import org.rcisoft.common.util.feignDto.*;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -13,7 +11,7 @@ import java.util.List; ...@@ -13,7 +11,7 @@ import java.util.List;
/** /**
* 通讯录客户端接口 * 通讯录客户端接口
*/ */
@Component @Service
@FeignClient(value = "ZX-CONTACT") @FeignClient(value = "ZX-CONTACT")
public interface ContactFeignClient { public interface ContactFeignClient {
......
...@@ -41,7 +41,7 @@ public class MTCotactApiRequestClient { ...@@ -41,7 +41,7 @@ public class MTCotactApiRequestClient {
@Autowired @Autowired
private ContactFeignClient contactFeignClient; private ContactFeignClient contactFeignClient;
//@Autowired @Autowired
private GateWayFeignClient gateWayFeignClient; private GateWayFeignClient gateWayFeignClient;
/** /**
......
...@@ -36,8 +36,8 @@ public class SysRoleController extends PaginationController<SysRole> { ...@@ -36,8 +36,8 @@ public class SysRoleController extends PaginationController<SysRole> {
@ApiOperation(value="1001 分页查询角色", notes="分页查询角色") @ApiOperation(value="1001 分页查询角色", notes="分页查询角色")
@GetMapping(value = "/queryRoles") @GetMapping(value = "/queryRoles")
public GridModel queryRolesByPagination(CurUser curUser, @Valid FindRolePaginDTO findRolePaginDTO, BindingResult bindingResult){ public GridModel queryRolesByPagination(CurUser curUser){
sysRoleServiceImpl.queryRolesByPagination(getPaginationUtility(), findRolePaginDTO); sysRoleServiceImpl.queryRolesByPagination(getPaginationUtility(), curUser.getCorpId());
GridModel gridModel = getGridModelResponse(); GridModel gridModel = getGridModelResponse();
return gridModel; return gridModel;
} }
...@@ -48,7 +48,7 @@ public class SysRoleController extends PaginationController<SysRole> { ...@@ -48,7 +48,7 @@ public class SysRoleController extends PaginationController<SysRole> {
return Result.builder(new PersistModel(1), return Result.builder(new PersistModel(1),
MessageConstant.MESSAGE_ALERT_SUCCESS, MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR, MessageConstant.MESSAGE_ALERT_ERROR,
sysRoleServiceImpl.queryRolesAll()); sysRoleServiceImpl.queryRolesAll(curUser.getCorpId()));
} }
......
...@@ -29,10 +29,11 @@ public interface SysRoleRepository extends BaseMapper<SysRole> { ...@@ -29,10 +29,11 @@ public interface SysRoleRepository extends BaseMapper<SysRole> {
*/ */
@Select("<script>select * from tm_admin_role " + @Select("<script>select * from tm_admin_role " +
"where r_status = 1 " + "where r_status = 1 " +
"and r_id not in ('主管理员','子管理员') " + "and r_name not in ('主管理员','子管理员') " +
"and corp_id = #{corpId} " +
" order by r_name desc </script>") " order by r_name desc </script>")
@ResultMap(value = "SelectAllAndUserNum") @ResultMap(value = "SelectAllAndUserNum")
List<SysRole> queryRoles(); List<SysRole> queryRoles(@Param("corpId") String corpId);
//获得此角色的用户数 //获得此角色的用户数
int countUserNum(String roleId); int countUserNum(String roleId);
......
...@@ -7,6 +7,7 @@ import org.rcisoft.core.model.PersistModel; ...@@ -7,6 +7,7 @@ import org.rcisoft.core.model.PersistModel;
import org.rcisoft.sys.dept.entity.DeptRole; import org.rcisoft.sys.dept.entity.DeptRole;
import org.rcisoft.sys.role.dto.*; import org.rcisoft.sys.role.dto.*;
import org.rcisoft.sys.role.entity.SysRole; import org.rcisoft.sys.role.entity.SysRole;
import org.rcisoft.sys.user.bean.CurUser;
import java.util.List; import java.util.List;
...@@ -39,13 +40,13 @@ public interface SysRoleService { ...@@ -39,13 +40,13 @@ public interface SysRoleService {
/** /**
* 分页查询角色 * 分页查询角色
* @param pageUtil * @param pageUtil
* @param findRolePaginDTO * @param corpId
* @return * @return
*/ */
List<SysRole> queryRolesByPagination(PageUtil pageUtil, FindRolePaginDTO findRolePaginDTO); List<SysRole> queryRolesByPagination(PageUtil pageUtil, String corpId);
List<SysRole> queryRolesAll(); List<SysRole> queryRolesAll(String corpId);
//select //select
List<SysRole> queryRolesSelect(SysRole sysRole); List<SysRole> queryRolesSelect(SysRole sysRole);
......
...@@ -13,6 +13,7 @@ import org.rcisoft.sys.role.dao.SysRoleRepository; ...@@ -13,6 +13,7 @@ import org.rcisoft.sys.role.dao.SysRoleRepository;
import org.rcisoft.sys.role.dto.*; import org.rcisoft.sys.role.dto.*;
import org.rcisoft.sys.role.entity.SysRole; import org.rcisoft.sys.role.entity.SysRole;
import org.rcisoft.sys.role.service.SysRoleService; import org.rcisoft.sys.role.service.SysRoleService;
import org.rcisoft.sys.user.bean.CurUser;
import org.rcisoft.sys.user.dao.SysUserMapper; import org.rcisoft.sys.user.dao.SysUserMapper;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -89,21 +90,21 @@ public class SysRoleServiceImpl implements SysRoleService { ...@@ -89,21 +90,21 @@ public class SysRoleServiceImpl implements SysRoleService {
} }
@Override @Override
public List<SysRole> queryRolesByPagination(PageUtil pageUtil, FindRolePaginDTO findRolePaginDTO) { public List<SysRole> queryRolesByPagination(PageUtil pageUtil, String corpId) {
// SysRole sysRole = new SysRole(); // SysRole sysRole = new SysRole();
// BeanUtils.copyProperties(findRolePaginDTO,sysRole); // BeanUtils.copyProperties(findRolePaginDTO,sysRole);
// sysRole.setNotDeleted(); // sysRole.setNotDeleted();
// sysRole.setStart(); // sysRole.setStart();
return sysRoleRepository.queryRoles(); return sysRoleRepository.queryRoles(corpId);
} }
@Override @Override
public List<SysRole> queryRolesAll() { public List<SysRole> queryRolesAll(String corpId) {
// SysRole sysRole = new SysRole(); // SysRole sysRole = new SysRole();
// BeanUtils.copyProperties(findRolePaginDTO,sysRole); // BeanUtils.copyProperties(findRolePaginDTO,sysRole);
// sysRole.setNotDeleted(); // sysRole.setNotDeleted();
// sysRole.setStart(); // sysRole.setStart();
return sysRoleRepository.queryRoles(); return sysRoleRepository.queryRoles(corpId);
} }
@Override @Override
......
...@@ -49,7 +49,6 @@ public class SysUser extends IdEntity<SysUser> { ...@@ -49,7 +49,6 @@ public class SysUser extends IdEntity<SysUser> {
private String gitLabId; //gitLab账号id private String gitLabId; //gitLab账号id
private String gitLabUsername; //gitLab账号 private String gitLabUsername; //gitLab账号
private String gitLabImpressionToken; //gitLab账号模拟令牌 private String gitLabImpressionToken; //gitLab账号模拟令牌
@Transient @Transient
private String depart; private String depart;
@Transient @Transient
......
...@@ -120,10 +120,7 @@ public class SysUserServiceImpl implements SysUserService { ...@@ -120,10 +120,7 @@ public class SysUserServiceImpl implements SysUserService {
userRoles.add(userRole); userRoles.add(userRole);
} }
} }
result += sysUserMapper.insertUserRoleById(userRoles); result = sysUserMapper.insertUserRoleById(userRoles);
if (result > 0) {
return 1;
}
} }
return 0; return 0;
} }
...@@ -174,7 +171,28 @@ public class SysUserServiceImpl implements SysUserService { ...@@ -174,7 +171,28 @@ public class SysUserServiceImpl implements SysUserService {
@Override @Override
public List<QueryMenuResDTO> queryMenusById(String corpId, String id, String modelId) { public List<QueryMenuResDTO> queryMenusById(String corpId, String id, String modelId) {
return sysUserMapper.queryMenus(corpId, id, modelId);
List<QueryMenuResDTO> menus = sysUserMapper.queryMenus(corpId, id, modelId);
String[] strings = new String[]{"题库管理", "试卷管理", "统计分析"};
QueryMenuResDTO newMenu = new QueryMenuResDTO();
newMenu.setMenuName("在线考试");
newMenu.setHref("newTest");
newMenu.setMenuId("000");
int size = menus.size();
for (String str : strings) {
for (QueryMenuResDTO menu : menus) {
if (menu.getMenuName().equals(str)) {
menus.add(newMenu);
break;
}
}
if(size < menus.size()){
break;
}
}
return menus;
} }
@Override @Override
...@@ -263,7 +281,7 @@ public class SysUserServiceImpl implements SysUserService { ...@@ -263,7 +281,7 @@ public class SysUserServiceImpl implements SysUserService {
} }
String updateTime = df.format(synchronizationTime.getSynchronizationTime()); String updateTime = df.format(synchronizationTime.getSynchronizationTime());
List<GetAllRspDTO> userGetRspDTOList = mtCotactApiRequestClient.accountGetMyInfoList(corpId, updateTime); List<GetAllRspDTO> userGetRspDTOList = mtCotactApiRequestClient.accountGetMyInfoList(corpId, updateTime);
if (null == userGetRspDTOList){ if (null == userGetRspDTOList) {
throw new ServiceException(ResultServiceEnums.ZX_FAILED); throw new ServiceException(ResultServiceEnums.ZX_FAILED);
} }
List<SysUser> personnelsList = new ArrayList<>(); List<SysUser> personnelsList = new ArrayList<>();
...@@ -295,7 +313,7 @@ public class SysUserServiceImpl implements SysUserService { ...@@ -295,7 +313,7 @@ public class SysUserServiceImpl implements SysUserService {
@Override @Override
public MyInfoDTO queryMyInfo(CurUser curUser) { public MyInfoDTO queryMyInfo(CurUser curUser) {
MyInfoDTO myInfoDTOCount = sysUserMapper.queryMyLessonCount(curUser); MyInfoDTO myInfoDTOCount = sysUserMapper.queryMyLessonCount(curUser);
MyInfoDTO myInfoDTO = sysUserMapper.queryMyInfo(curUser); MyInfoDTO myInfoDTO = sysUserMapper.queryMyInfo(curUser);
myInfoDTO.setLessonCount(myInfoDTOCount.getLessonCount()); myInfoDTO.setLessonCount(myInfoDTOCount.getLessonCount());
myInfoDTO.setTrainCount(myInfoDTOCount.getTrainCount()); myInfoDTO.setTrainCount(myInfoDTOCount.getTrainCount());
myInfoDTO.setNotFinishedExam(myInfoDTOCount.getNotFinishedExam()); myInfoDTO.setNotFinishedExam(myInfoDTOCount.getNotFinishedExam());
......
...@@ -5,7 +5,7 @@ server: ...@@ -5,7 +5,7 @@ server:
servlet: servlet:
context-path: / context-path: /
#uri-encoding: UTF-8 #uri-encoding: UTF-8
type: dev1 type: dev
maxHttpHeaderSize: 102400 maxHttpHeaderSize: 102400
#logging: #logging:
...@@ -14,22 +14,20 @@ server: ...@@ -14,22 +14,20 @@ server:
# org.springframework.web: DEBUG # org.springframework.web: DEBUG
druid: druid:
url: jdbc:mysql://127.0.0.1:3307/edu_db2?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false url: jdbc:mysql://127.0.0.1:3306/mt?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
# password: 91isoft # password: 91isoft
password: 123456 password: root
initial-size: 1 initial-size: 1
min-idle: 1 min-idle: 1
max-active: 20 max-active: 20
test-on-borrow: true test-on-borrow: true
mybatis: mybatis:
mapper-locations: classpath:mapper/**/**/*.xml mapper-locations: classpath:mapper/**/**/*.xml
mapper: mapper:
mappers: mappers:
- org.rcisoft.core.base.BaseMapper - org.rcisoft.core.base.BaseMapper
...@@ -60,6 +58,8 @@ spring: ...@@ -60,6 +58,8 @@ spring:
multipart: multipart:
max-file-size: 100MB max-file-size: 100MB
max-request-size: 100MB max-request-size: 100MB
application:
name: zx-education
global: global:
lk: lk:
...@@ -91,6 +91,7 @@ libreoffice: ...@@ -91,6 +91,7 @@ libreoffice:
ip: 192.168.1.125 ip: 192.168.1.125
port: 10188 port: 10188
mt: mt:
# api: http://192.168.5.41/api/
api: http://221.239.114.20:6789/api/ api: http://221.239.114.20:6789/api/
......
...@@ -99,4 +99,4 @@ eureka: ...@@ -99,4 +99,4 @@ eureka:
register-with-eureka: true register-with-eureka: true
fetch-registry: true fetch-registry: true
service-url: service-url:
defaultZone: http://zx:zgiot@192.168.5.48:7001/eureka/ defaultZone: http://zx:zgiot@192.168.5.48:7001/eureka
\ No newline at end of file
spring: spring:
profiles: profiles:
# active: dev
active: prod active: prod
# active: prod
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