Commit 279e7531 authored by chenzhao's avatar chenzhao

权限修改

parent f564cc3c
package com.yeejoin.amos.boot.module.hygf.api.config;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface DealerRestrict {
String[] field();
/**
* @param 每个字段运算符( in,like,likeLeft,likeRight,eq)
*/
String[] fieldConditions() ;
/**
* @param 多个字段之间关系(or,and)
*/
String relationship() default "";
}
......@@ -40,8 +40,8 @@ public class UserLimitsAdvice {
@Autowired
private UserEmpowerMapper userEmpowerMapper;
// @Autowired
//// PersonnelBusinessMapper personnelBusinessMapper;
@Autowired
PersonnelBusinessMapper personnelBusinessMapper;
@Autowired
private RedisUtils redisUtils;
......@@ -63,8 +63,7 @@ public class UserLimitsAdvice {
//判断是否经销商,经销商跟管理端互斥
String org= reginParams.getUserModel().getOrgNames();
if(org.contains(ROLEFLAG)){
// UserUnitInformationDto userUnitInformationDto=personnelBusinessMapper.getUserUnitInformationDto(userid);
UserUnitInformationDto userUnitInformationDto=null;
UserUnitInformationDto userUnitInformationDto=personnelBusinessMapper.getUserUnitInformationDto(userid);
stdUserEmpower.setFlag(false);
stdUserEmpower.setDeveloperId(userUnitInformationDto!=null?userUnitInformationDto.getAmosUnitInfoId():null);
stdUserEmpower.setRegionalCompaniesCode(userUnitInformationDto!=null?userUnitInformationDto.getRegionalCompaniesCode():null);
......
......@@ -2,9 +2,11 @@ package com.yeejoin.amos.boot.module.hygf.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.hygf.api.config.UserLimits;
import com.yeejoin.amos.boot.module.hygf.api.dto.CompanyDtoUserDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.UserUnitInformationDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.PersonnelBusiness;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
......@@ -21,7 +23,7 @@ public interface PersonnelBusinessMapper extends BaseMapper<PersonnelBusiness> {
Map<String,String> getorgcode(@Param("id")Long id);
//根据平台userid 获取人员所属经销商
@UserLimits
UserUnitInformationDto getUserUnitInformationDto(@Param("userId")String userId);
......
[
{
"key": "guanli",
"roleIds": ""
},
{
"key": "kaifa",
"roleIds": ""},
{
"key": "qita",
"roleIds": ""
}
]
\ No newline at end of file
......@@ -258,7 +258,7 @@ public class TdHygfJpInverterWarnController extends BaseController {
return ResponseHelper.buildResponse(result);
}
nameMaps = jpStation.stream().collect(Collectors.toMap(JpStation::getThirdStationId, JpStation::getName));
nameMaps = jpStation.stream().collect(Collectors.toMap(JpStation::getThirdStationId, JpStation::getName, (existing, replacement) -> existing));
if (null == stationId) {
stationId = jpStation.stream().map(JpStation::getThirdStationId).collect(Collectors.toList());
......
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