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