|
@@ -1,11 +1,13 @@
|
|
|
package com.css.simulation.resource.system.service;
|
|
|
|
|
|
+import api.common.pojo.constants.DictConstants;
|
|
|
import api.common.pojo.constants.LogConstants;
|
|
|
import api.common.pojo.param.system.ParameterParam;
|
|
|
import api.common.pojo.po.system.ParameterPO;
|
|
|
import api.common.pojo.vo.system.ParameterVO;
|
|
|
import api.common.util.ObjectUtil;
|
|
|
import api.common.util.StringUtil;
|
|
|
+import com.css.simulation.resource.common.utils.AuthUtil;
|
|
|
import com.css.simulation.resource.common.utils.PageUtil;
|
|
|
import com.css.simulation.resource.common.utils.PoUtil;
|
|
|
import com.css.simulation.resource.log.service.LogService;
|
|
@@ -14,6 +16,7 @@ import com.github.pagehelper.PageInfo;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
@@ -56,4 +59,18 @@ public class ParameterService {
|
|
|
return new PageInfo<>(list);
|
|
|
}
|
|
|
|
|
|
+ public HashMap<String, Integer> getSceneParam(){
|
|
|
+ String roleCode = AuthUtil.getCurrentUserRoleCode();
|
|
|
+ String userId = AuthUtil.getCurrentUserId();
|
|
|
+ if(DictConstants.ROLE_CODE_ADMIN.equals(roleCode) || DictConstants.ROLE_CODE_SYSADMIN.equals(roleCode)){ //管理员账户
|
|
|
+ return null;
|
|
|
+ }else if(DictConstants.ROLE_CODE_SUBUESR.equals(roleCode)){
|
|
|
+ //查询父账户
|
|
|
+ userId = AuthUtil.getCreateUserId();
|
|
|
+ }
|
|
|
+ HashMap<String, Integer> sceneParam = parameterMapper.getSceneParam(userId);
|
|
|
+
|
|
|
+ return sceneParam;
|
|
|
+ }
|
|
|
+
|
|
|
}
|