日志模块
This commit is contained in:
parent
d44a67ebbe
commit
d0a086ec00
@ -19,7 +19,7 @@ import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 日志动态表单")
|
||||
@Tag(name = "管理后台 - 日志动态模板")
|
||||
@RestController
|
||||
@RequestMapping("/system/worklog/form")
|
||||
@Validated
|
||||
@ -29,14 +29,14 @@ public class LogFormController {
|
||||
private LogFormService formService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建动态表单")
|
||||
@Operation(summary = "创建动态模板")
|
||||
@PreAuthorize("@ss.hasPermission('worklog:form:create')")
|
||||
public CommonResult<Long> createForm(@Valid @RequestBody LogFormCreateReqVO createReqVO) {
|
||||
return success(formService.createForm(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新动态表单")
|
||||
@Operation(summary = "更新动态模板")
|
||||
@PreAuthorize("@ss.hasPermission('worklog:form:update')")
|
||||
public CommonResult<Boolean> updateForm(@Valid @RequestBody LogFormUpdateReqVO updateReqVO) {
|
||||
formService.updateForm(updateReqVO);
|
||||
@ -44,7 +44,7 @@ public class LogFormController {
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除动态表单")
|
||||
@Operation(summary = "删除动态模板")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('worklog:form:delete')")
|
||||
public CommonResult<Boolean> deleteForm(@RequestParam("id") Long id) {
|
||||
@ -53,7 +53,7 @@ public class LogFormController {
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得动态表单")
|
||||
@Operation(summary = "获得动态模板")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('worklog:form:query')")
|
||||
public CommonResult<LogFormRespVO> getForm(@RequestParam("id") Long id) {
|
||||
@ -62,17 +62,26 @@ public class LogFormController {
|
||||
}
|
||||
|
||||
@GetMapping("/list-all-simple")
|
||||
@Operation(summary = "获得动态表单的精简列表", description = "用于表单下拉框")
|
||||
@Operation(summary = "获得动态模板的精简列表", description = "用于表单下拉框")
|
||||
public CommonResult<List<LogFormSimpleRespVO>> getSimpleForms() {
|
||||
List<LogFormDO> list = formService.getFormList();
|
||||
return success(LogFormConvert.INSTANCE.convertList2(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得动态表单分页")
|
||||
@Operation(summary = "获得动态模板分页")
|
||||
@PreAuthorize("@ss.hasPermission('worklog:form:query')")
|
||||
public CommonResult<PageResult<LogFormRespVO>> getFormPage(@Valid LogFormPageReqVO pageVO) {
|
||||
PageResult<LogFormDO> pageResult = formService.getFormPage(pageVO);
|
||||
return success(LogFormConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/page-by-rule")
|
||||
@Operation(summary = "获得配置规则后的模板分页")
|
||||
@PreAuthorize("@ss.hasPermission('worklog:form:query')")
|
||||
public CommonResult<PageResult<LogFormRespVO>> getFormPageByRule(@Valid LogFormPageReqVO pageVO) {
|
||||
|
||||
PageResult<LogFormDO> pageResult = formService.getFormPageByRule(pageVO);
|
||||
return success(LogFormConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,13 @@ public class LogInstancePageReqVO extends PageParam {
|
||||
@Schema(description = "日志发起人的部门编号", example = "24292")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "日志实例的名字", example = "张三")
|
||||
@Schema(description = "日志发起人的用户名称", example = "张三")
|
||||
private String startUserName;
|
||||
|
||||
@Schema(description = "日志发起人的用户头像", example = "https://www.iocoder.cn/xxx.png")
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "日志实例的名字", example = "张三的XX日报")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "日志类型 字典值 详情参考work_log_type", example = "2")
|
||||
|
@ -23,7 +23,13 @@ public class LogInstanceRespVO {
|
||||
@Schema(description = "日志发起人的部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24292")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "日志实例的名字", example = "张三")
|
||||
@Schema(description = "日志发起人的用户名称", example = "张三")
|
||||
private String startUserName;
|
||||
|
||||
@Schema(description = "日志发起人的用户头像", example = "https://www.iocoder.cn/xxx.png")
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "日志实例的名字", example = "张三的XX日报")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "日志类型 字典值 详情参考work_log_type", example = "2")
|
||||
|
@ -21,7 +21,7 @@ public class LogInstanceSaveReqVO {
|
||||
@Schema(description = "日志发起人的部门编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "24292")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "日志实例的名字", example = "张三")
|
||||
@Schema(description = "日志实例的名字", example = "张三的XX日报")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "日志类型 字典值 详情参考work_log_type", example = "2")
|
||||
|
@ -4,6 +4,8 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Schema(description = "管理后台 - 日志规则新增/修改 Request VO")
|
||||
@Data
|
||||
@ -30,4 +32,14 @@ public class LogRuleSaveReqVO {
|
||||
@Schema(description = "统计时间段")
|
||||
private String statisticalTime;
|
||||
|
||||
@Schema(description = "使用者用户信息")
|
||||
private List<UserInfo> userInfo;
|
||||
|
||||
@Data
|
||||
private static class UserInfo {
|
||||
|
||||
private Long userId;
|
||||
|
||||
private Long deptId;
|
||||
}
|
||||
}
|
@ -40,6 +40,15 @@ public class LogInstanceDO extends BaseDO {
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 日志发起人的用户名称
|
||||
*/
|
||||
private String startUserName;
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
private String avatar;
|
||||
/**
|
||||
* 日志名称
|
||||
*/
|
||||
|
@ -55,7 +55,5 @@ public interface AdminUserMapper extends BaseMapperX<AdminUserDO> {
|
||||
|
||||
void emptyOpenId(@Param("openId") String openId);
|
||||
|
||||
List<AdminUserDO> selectListByRoleId(@Param("roleId") Long roleId);
|
||||
|
||||
List<UserRespVO> selectByDeptIds(@Param("deptIds") Collection<Long> deptIds);
|
||||
List<UserRespVO> selectByDeptIds(Collection<Long> deptIds);
|
||||
}
|
||||
|
@ -15,4 +15,11 @@ public interface LogFormMapper extends BaseMapperX<LogFormDO> {
|
||||
.likeIfPresent("name", reqVO.getName())
|
||||
.orderByDesc("id"));
|
||||
}
|
||||
|
||||
default PageResult<LogFormDO> selectPageByRule(LogFormPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new QueryWrapperX<LogFormDO>()
|
||||
.likeIfPresent("name", reqVO.getName())
|
||||
.isNotNull("rule_id")
|
||||
.orderByDesc("id"));
|
||||
}
|
||||
}
|
||||
|
@ -6,9 +6,12 @@ import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.loginstance.LogInstancePageReqVO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogInstanceDO;
|
||||
import cn.iocoder.yudao.module.system.service.worklog.dto.LogReadUserRespDTO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 日志实例的拓展 Mapper
|
||||
*
|
||||
@ -17,28 +20,23 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface LogInstanceMapper extends BaseMapperX<LogInstanceDO> {
|
||||
|
||||
default PageResult<LogInstanceDO> selectPage(LogInstancePageReqVO reqVO) {
|
||||
default PageResult<LogInstanceDO> selectPage(LogInstancePageReqVO reqVO, Long userId) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<LogInstanceDO>()
|
||||
.eqIfPresent(LogInstanceDO::getStartUserId, reqVO.getStartUserId())
|
||||
.likeIfPresent(LogInstanceDO::getName, reqVO.getName())
|
||||
.eqIfPresent(LogInstanceDO::getFormId, reqVO.getFormId())
|
||||
.eqIfPresent(LogInstanceDO::getFormVariables, reqVO.getFormVariables())
|
||||
.eqIfPresent(LogInstanceDO::getFileItems, reqVO.getFileItems())
|
||||
.eqIfPresent(LogInstanceDO::getType, reqVO.getType())
|
||||
.eqIfPresent(LogInstanceDO::getDeptId, reqVO.getDeptId())
|
||||
.eqIfPresent(LogInstanceDO::getStartUserName, reqVO.getStartUserName())
|
||||
.betweenIfPresent(LogInstanceDO::getCreateTime, reqVO.getCreateTime())
|
||||
.ne(LogInstanceDO::getStartUserId, userId)
|
||||
.orderByDesc(LogInstanceDO::getId));
|
||||
}
|
||||
|
||||
default PageResult<LogInstanceDO> selectMyPage(Long userId, LogInstancePageReqVO reqVO) {
|
||||
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<LogInstanceDO>()
|
||||
.eqIfPresent(LogInstanceDO::getStartUserId, userId)
|
||||
.likeIfPresent(LogInstanceDO::getName, reqVO.getName())
|
||||
.eqIfPresent(LogInstanceDO::getFormId, reqVO.getFormId())
|
||||
.eqIfPresent(LogInstanceDO::getFormVariables, reqVO.getFormVariables())
|
||||
.eqIfPresent(LogInstanceDO::getFileItems, reqVO.getFileItems())
|
||||
.eqIfPresent(LogInstanceDO::getType, reqVO.getType())
|
||||
.betweenIfPresent(LogInstanceDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(LogInstanceDO::getId));
|
||||
}
|
||||
|
||||
|
||||
List<LogReadUserRespDTO> selectRaedUser(Long deptId);
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package cn.iocoder.yudao.module.system.dal.mysql.worklog;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogReadDo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 日志查看 Mapper
|
||||
*
|
||||
* @author 符溶馨
|
||||
*/
|
||||
@Mapper
|
||||
public interface LogReadMapper extends BaseMapperX<LogReadDo> {
|
||||
}
|
@ -75,11 +75,18 @@ public interface LogFormService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得动态表单分页
|
||||
* 获得动态模板分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 动态表单分页
|
||||
*/
|
||||
PageResult<LogFormDO> getFormPage(LogFormPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得配置规则后的模板分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 动态表单分页
|
||||
*/
|
||||
PageResult<LogFormDO> getFormPageByRule(LogFormPageReqVO pageReqVO);
|
||||
}
|
||||
|
@ -85,6 +85,11 @@ public class LogFormServiceImpl implements LogFormService{
|
||||
return formMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<LogFormDO> getFormPageByRule(LogFormPageReqVO pageReqVO) {
|
||||
return formMapper.selectPageByRule(pageReqVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验 Field,避免 field 重复
|
||||
*
|
||||
|
@ -14,11 +14,14 @@ import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogRuleDO;
|
||||
import cn.iocoder.yudao.module.system.dal.mysql.worklog.LogInstanceMapper;
|
||||
import cn.iocoder.yudao.module.system.service.dict.DictDataService;
|
||||
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
||||
import cn.iocoder.yudao.module.system.service.worklog.dto.LogReadUserRespDTO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.LOG_INSTANCE_NOT_EXISTS;
|
||||
@ -48,6 +51,9 @@ public class LogInstanceServiceImpl implements LogInstanceService {
|
||||
@Resource
|
||||
private AdminUserService adminUserService;
|
||||
|
||||
@Resource
|
||||
private LogReadService logReadService;
|
||||
|
||||
@Override
|
||||
public Long createLogInstance(LogInstanceSaveReqVO createReqVO) {
|
||||
|
||||
@ -63,82 +69,28 @@ public class LogInstanceServiceImpl implements LogInstanceService {
|
||||
//获取部门信息
|
||||
AdminUserDO adminUserDO = adminUserService.getUser(getLoginUserId());
|
||||
|
||||
//获取字典值
|
||||
DictDataDO dictDataDO = dictDataService.getDictData("work_log_type", String.valueOf(logRuleDO.getType()));
|
||||
|
||||
//设置发起人用户编号
|
||||
logInstance.setStartUserId(getLoginUserId());
|
||||
//设置发起人部门编号
|
||||
logInstance.setDeptId(adminUserDO.getDeptId());
|
||||
//设置发起人用户名称
|
||||
logInstance.setStartUserName(adminUserDO.getNickname());
|
||||
//设置发起人用户头像
|
||||
logInstance.setAvatar(adminUserDO.getAvatar());
|
||||
//设置日志类型
|
||||
logInstance.setType(logRuleDO.getType());
|
||||
//设置日志名称
|
||||
logInstance.setName(adminUserDO.getNickname() + "的" + dictDataDO.getLabel());
|
||||
logInstance.setName(adminUserDO.getNickname() + "的" + logFormDo.getName());
|
||||
|
||||
// 插入
|
||||
logInstanceMapper.insert(logInstance);
|
||||
|
||||
// //根据查询权限获取menuID
|
||||
// List<Long> menuIds = menuService.getMenuIdListByPermissionFromCache("system:view-log:query");
|
||||
// if (menuIds != null && !menuIds.isEmpty()) {
|
||||
//
|
||||
// Map<String, String> readStatus = new HashMap<>();
|
||||
// List<Long> roles = new ArrayList<>();
|
||||
//
|
||||
// //根据menuID 获取 roleIds
|
||||
// Set<Long> roleIds = permissionService.getMenuRoleIdListByMenuIdFromCache(menuIds.get(0));
|
||||
//
|
||||
// List<RoleDO> roleDOS = roleService.getRoleList(roleIds);
|
||||
// for (RoleDO roleDo : roleDOS) {
|
||||
//
|
||||
// if (Objects.equals(roleDo.getDataScope(), DataScopeEnum.ALL.getScope())) { //数据权限是全部时
|
||||
//
|
||||
// roles.add(roleDo.getId());
|
||||
// }else if (Objects.equals(roleDo.getDataScope(), DataScopeEnum.DEPT_CUSTOM.getScope())) { //数据权限是指定部门
|
||||
//
|
||||
// //指定部门组里存在 发起人的部门
|
||||
// if (roleDo.getDataScopeDeptIds().contains(createReqVO.getDeptId())) {
|
||||
//
|
||||
// roles.add(roleDo.getId());
|
||||
// }
|
||||
// }else if (Objects.equals(roleDo.getDataScope(), DataScopeEnum.DEPT_ONLY.getScope())) { //数据权限是本部门
|
||||
//
|
||||
// List<AdminUserDO> userDos = adminUserMapper.selectListByRoleId(roleDo.getId());
|
||||
// for (AdminUserDO userDO : userDos) {
|
||||
//
|
||||
// //权限部门与发起人部门一致时
|
||||
// if (Objects.equals(userDO.getDeptId(), createReqVO.getDeptId())) {
|
||||
//
|
||||
// readStatus.put(String.valueOf(userDO.getId()), "0");
|
||||
// }
|
||||
// }
|
||||
// }else if (Objects.equals(roleDo.getDataScope(), DataScopeEnum.DEPT_AND_CHILD.getScope())) { //数据权限是本部门及一下
|
||||
//
|
||||
// //根据规则ID 查询用户信息
|
||||
// List<AdminUserDO> userDos = adminUserMapper.selectListByRoleId(roleDo.getId());
|
||||
// for (AdminUserDO userDO : userDos) {
|
||||
//
|
||||
// Set<Long> deptIds = deptService.getChildDeptIdListFromCache(userDO.getDeptId());
|
||||
// //权限部门与发起人部门一致时
|
||||
// if (deptIds.contains(createReqVO.getDeptId())) {
|
||||
//
|
||||
// readStatus.put(String.valueOf(userDO.getId()), "0");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //通过满足条件的roleId 查询所有用户信息
|
||||
// List<UserRoleDO> userRoleDOS = userRoleMapper.selectListByRoleIds(roles);
|
||||
// for (UserRoleDO userRoleDO : userRoleDOS) {
|
||||
//
|
||||
// readStatus.put(String.valueOf(userRoleDO.getUserId()), "0");
|
||||
// }
|
||||
//
|
||||
// LogInstanceDO updateObj = new LogInstanceDO();
|
||||
// updateObj.setReadStatus();
|
||||
//// logInstanceMapper.updateById();
|
||||
// }
|
||||
//创建日志时,查询可以查看发起人日志的用户组 用线程控制
|
||||
new Thread(() -> {
|
||||
|
||||
List<LogReadUserRespDTO> respDTOS = logInstanceMapper.selectRaedUser(adminUserDO.getDeptId());
|
||||
logReadService.createLogRule(respDTOS, logInstance.getId(), logInstance.getStartUserId());
|
||||
}).start();
|
||||
|
||||
// 返回
|
||||
return logInstance.getId();
|
||||
@ -174,7 +126,7 @@ public class LogInstanceServiceImpl implements LogInstanceService {
|
||||
|
||||
@Override
|
||||
public PageResult<LogInstanceDO> getLogInstancePage(LogInstancePageReqVO pageReqVO) {
|
||||
return logInstanceMapper.selectPage(pageReqVO);
|
||||
return logInstanceMapper.selectPage(pageReqVO, getLoginUserId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.system.service.worklog;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.system.service.worklog.dto.LogReadUserRespDTO;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 日志查看 Service 接口
|
||||
*
|
||||
* @author 符溶馨
|
||||
*/
|
||||
public interface LogReadService {
|
||||
|
||||
/**
|
||||
* 创建日志规则
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
*/
|
||||
void createLogRule(@Valid List<LogReadUserRespDTO> createReqVO, Long logInstanceId, Long startUserId);
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package cn.iocoder.yudao.module.system.service.worklog;
|
||||
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.worklog.LogReadDo;
|
||||
import cn.iocoder.yudao.module.system.dal.mysql.worklog.LogReadMapper;
|
||||
import cn.iocoder.yudao.module.system.service.worklog.dto.LogReadUserRespDTO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 日志查看 Service 实现类
|
||||
*
|
||||
* @author 符溶馨
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class LogReadServiceImpl implements LogReadService{
|
||||
|
||||
@Resource
|
||||
private LogReadMapper logReadMapper;
|
||||
|
||||
@Override
|
||||
public void createLogRule(List<LogReadUserRespDTO> createReqVO, Long logInstanceId, Long startUserId) {
|
||||
|
||||
List<LogReadDo> userInfoList = createReqVO.stream()
|
||||
.map(user -> {
|
||||
LogReadDo logReadDo = new LogReadDo();
|
||||
logReadDo.setLogInstanceId(logInstanceId);
|
||||
logReadDo.setStartUserId(startUserId);
|
||||
logReadDo.setReadUserId(user.getUserId());
|
||||
logReadDo.setReadStatus(0);
|
||||
return logReadDo;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
||||
logReadMapper.insertBatch(userInfoList);
|
||||
}
|
||||
}
|
@ -67,5 +67,4 @@ public class LogRuleServiceImpl implements LogRuleService {
|
||||
public PageResult<LogRuleDO> getLogRulePage(LogRulePageReqVO pageReqVO) {
|
||||
return logRuleMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -14,18 +14,11 @@
|
||||
set open_id = null
|
||||
where open_id = #{openId}
|
||||
</update>
|
||||
|
||||
<select id="selectListByRoleId">
|
||||
select A.* FROM system_users A, system_user_role B, system_role C
|
||||
where A.id = C.user_id
|
||||
and C.role_id = B.id
|
||||
and C.role_id = #{roleId}
|
||||
</select>
|
||||
|
||||
<select id="selectByDeptIds">
|
||||
select A.*, B.name deptName FROM system_users A, system_dept B
|
||||
where A.dept_id = B.id
|
||||
and A.dept_id in
|
||||
select a.*, b.name deptName FROM system_users a, system_dept b
|
||||
where a.dept_id = b.id
|
||||
and a.dept_id in
|
||||
<foreach collection="list" item="deptIds" open="(" close=")" separator=",">
|
||||
#{deptIds}
|
||||
</foreach>
|
||||
|
@ -82,4 +82,8 @@
|
||||
or ( result.dept_id = #{deptId} and result.data_scope = 3 )
|
||||
or result.data_scope = 1
|
||||
</select>
|
||||
|
||||
<insert id="insertRead">
|
||||
|
||||
</insert>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user