运维-物资管理接口

This commit is contained in:
2025-09-28 20:06:03 +08:00
parent 5f51572b68
commit da9cc7cc76
79 changed files with 6094 additions and 23 deletions

View File

@ -494,4 +494,9 @@ public class RemoteUserServiceImpl implements RemoteUserService {
return BeanUtil.copyProperties(sysUserVo, RemoteUserVo.class);
}
@Override
public String getPostNameByUserId(Long userId) {
return postService.selectPostNameByUserId(userId);
}
}

View File

@ -2,6 +2,7 @@ package org.dromara.system.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.dromara.common.mybatis.annotation.DataColumn;
import org.dromara.common.mybatis.annotation.DataPermission;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
@ -33,4 +34,10 @@ public interface SysPostMapper extends BaseMapperPlus<SysPost, SysPostVo> {
*/
List<SysPostVo> selectPostsByUserId(Long userId);
/**
* 根据用户id获取岗位名称
* @param userId
* @return
*/
String selectPostNameByUserId(@Param("userId") Long userId);
}

View File

@ -127,4 +127,11 @@ public interface ISysPostService {
* @return 结果
*/
int updatePost(SysPostBo bo);
/**
* 根据用户id获取岗位名
* @param userId
* @return
*/
String selectPostNameByUserId(Long userId);
}

View File

@ -249,4 +249,14 @@ public class SysPostServiceImpl implements ISysPostService {
SysPost post = MapstructUtils.convert(bo, SysPost.class);
return baseMapper.updateById(post);
}
/**
* 根据用户id获取岗位名
* @param userId
* @return
*/
@Override
public String selectPostNameByUserId(Long userId) {
return baseMapper.selectPostNameByUserId(userId);
}
}

View File

@ -14,5 +14,12 @@
left join sys_user u on u.user_id = up.user_id
where u.user_id = #{userId}
</select>
<select id="selectPostNameByUserId" resultType="java.lang.String">
select p.post_name
from sys_post p
left join sys_user_post up on up.post_id = p.post_id
left join sys_user u on u.user_id = up.user_id
where u.user_id = #{userId}
</select>
</mapper>