xiaoyong931011
2022-11-10 526c6c73ffba70b271ff20732d5f84cd0f410834
src/main/java/cc/mrbird/febs/dapp/service/impl/DappMemberServiceImpl.java
@@ -499,8 +499,8 @@
        }
        String token = IdUtil.simpleUUID();
        redisUtils.set(token, JSONObject.toJSONString(dappMemberEntity), 3600);
        redisUtils.set(redisKey, token, 3600);
        redisUtils.set(token, JSONObject.toJSONString(dappMemberEntity));
        redisUtils.set(redisKey, token);
        Map<String, Object> authInfo = new HashMap<>();
        authInfo.put("token", token);
        authInfo.put("rasToken", generateAsaToken(token));
@@ -1004,6 +1004,34 @@
        return new FebsResponse().success().message("操作成功");
    }
    @Override
    public List<AdminMemberIdentityVo> identitySetList() {
        ArrayList<AdminMemberIdentityVo> objects = new ArrayList<>();
        List<DataDictionaryCustom> dataDictionaryCustoms = dataDictionaryCustomMapper.selectDicByType(DataDictionaryEnum.LEVEL_AIB.getType());
        if(CollUtil.isNotEmpty(dataDictionaryCustoms)){
            for(DataDictionaryCustom dic :dataDictionaryCustoms){
                if(!DataDictionaryEnum.LEVEL_TM.getCode().equals(dic.getCode())){
                    AdminMemberIdentityVo adminMemberIdentityVo = new AdminMemberIdentityVo();
                    adminMemberIdentityVo.setIdentityCode(dic.getCode());
                    adminMemberIdentityVo.setIdentityValue(dic.getDescription());
                    objects.add(adminMemberIdentityVo);
                }
            }
        }
        return objects;
    }
    @Override
    public FebsResponse identitySet(DappMemberEntity memberEntity) {
        DappMemberEntity dappMemberEntity = dappMemberDao.selectById(memberEntity.getId());
        if(ObjectUtil.isEmpty(dappMemberEntity)){
            return new FebsResponse().fail().message("会员信息不存在");
        }
        dappMemberEntity.setIdentity(memberEntity.getIdentity());
        dappMemberDao.updateById(dappMemberEntity);
        return new FebsResponse().success();
    }
    public String generateAsaToken(String token) {
        RSA rsa = new RSA(null, AppContants.PUBLIC_KEY);
        return rsa.encryptBase64(token + "_" + System.currentTimeMillis(), KeyType.PublicKey);