测试userId的获取

This commit is contained in:
zjh 2025-12-08 18:33:10 +08:00
parent abf878bad1
commit e97c2df9d0
3 changed files with 20 additions and 10 deletions

View File

@ -1,6 +1,7 @@
package com.xdap.self_development.controller;
import com.definesys.mpaas.common.http.Response;
import com.xdap.api.moudle.user.vo.LoginUserVo;
import com.xdap.runtime.service.RuntimeAppContextService;
import com.xdap.runtime.service.RuntimeDatasourceService;
import com.xdap.runtime.service.RuntimeUserService;
@ -42,11 +43,13 @@ public class DataEntryController {
String currentTenantId = runtimeAppContextService.getCurrentTenantId();
String currentToken = runtimeAppContextService.getCurrentToken();
String currentUserId = runtimeAppContextService.getCurrentUserId();
LoginUserVo loginUserVo = runtimeUserService.queryLoginUserVo(currentUserId, currentTenantId, currentAppId);
map.put("currentAppId", currentAppId);
map.put("currentTenantId", currentTenantId);
map.put("currentToken", currentToken);
map.put("currentUserId", currentUserId);
map.put("loginUserVo", loginUserVo.toString());
return Response.ok().data(map);
}

View File

@ -10,8 +10,10 @@ import com.xdap.self_development.pojo.Parameter;
import com.xdap.self_development.pojo.RevisionRecord;
import com.xdap.self_development.pojo.Template;
import com.xdap.self_development.pojo.TemplateAndParameter;
import com.xdap.self_development.pojo.view.MenuParamView;
import com.xdap.self_development.pojo.view.ParametersView;
import com.xdap.self_development.pojo.view.TemplateInfoView;
import com.xdap.self_development.service.ModelRoleService;
import com.xdap.self_development.service.ParameterService;
import com.xdap.self_development.utils.FormulaValidator;
import com.xdap.self_development.utils.ParameterOperation;
@ -31,6 +33,8 @@ import java.util.stream.Collectors;
public class ParameterServiceImpl implements ParameterService {
@Resource
private BusinessDatabase bd;
@Resource
private ModelRoleService modelRoleService;
@Override
public PageQueryResult<Parameter> getParameterByCondition(ParameterPageForm form) {
@ -42,6 +46,9 @@ public class ParameterServiceImpl implements ParameterService {
throw new CommonException("模板未找到");
}
//todo 获取指定子系统下的用户的权限权限应该为:参数的 parameterNumber
List<MenuParamView> menuParamViews = modelRoleService.selectPersByUser("zjh");
return bd.getBusinessDatabase()
.viewQueryMode(true)
.view("selectParametersByTemplateId")

View File

@ -99,7 +99,7 @@ CREATE TABLE yfsjglpt_model_dep_user_role(
) COMMENT '部门或用户关联角色表';
--
-- 角色权限关联
DROP TABLE IF EXISTS yc_datasource_0.yfsjglpt_model_role_permission;
CREATE TABLE yc_datasource_0.yfsjglpt_model_role_permission(
`id` VARCHAR(64) NOT NULL COMMENT 'ID',