|
|
@ -26,6 +26,7 @@ import com.epmet.commons.rocketmq.messages.OrgOrStaffMQMsg; |
|
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.constant.ServiceConstant; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.ExceptionUtils; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
@ -81,7 +82,7 @@ import java.util.stream.Collectors; |
|
|
|
@Slf4j |
|
|
|
@Service |
|
|
|
public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, CustomerStaffEntity> implements CustomerStaffService { |
|
|
|
private Logger logger = LogManager.getLogger(getClass()); |
|
|
|
private final Logger logger = LogManager.getLogger(getClass()); |
|
|
|
@Autowired |
|
|
|
private GovStaffRoleService govStaffRoleService; |
|
|
|
@Autowired |
|
|
@ -415,7 +416,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, |
|
|
|
logger.info("修改用户信息:修改用户已缓存的角色列表成功"); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
logger.error("修改用户信息:修改用户已缓存的角色列表异常:{}", ExceptionUtils.getErrorStackTrace(e));; |
|
|
|
logger.error("修改用户信息:修改用户已缓存的角色列表异常:{}", ExceptionUtils.getErrorStackTrace(e)); |
|
|
|
} |
|
|
|
|
|
|
|
// 角色放缓存
|
|
|
@ -726,10 +727,15 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<StaffBasicInfoResultDTO> selectStaffBasicInfo(String userId) { |
|
|
|
public Result<StaffBasicInfoResultDTO> selectStaffBasicInfo(String userId,String customerId) { |
|
|
|
StaffBasicInfoResultDTO resultDTO = baseDao.selectStaffBasicInfo(userId); |
|
|
|
if(null!=resultDTO){ |
|
|
|
resultDTO.setRoleList(baseDao.selectStaffRoles(userId,resultDTO.getCustomerId())); |
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, userId); |
|
|
|
if (null != staffInfo){ |
|
|
|
resultDTO.setAgencyId(staffInfo.getAgencyId()); |
|
|
|
resultDTO.setAgencyName(staffInfo.getAgencyName()); |
|
|
|
} |
|
|
|
} |
|
|
|
return new Result<StaffBasicInfoResultDTO>().ok(resultDTO); |
|
|
|
} |
|
|
|