xiaoyong931011
2022-11-08 667f4983bf7ca6ab1cc40cbc49b5456a86457987
src/main/java/cc/mrbird/febs/dapp/service/impl/DappMemberServiceImpl.java
@@ -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() != 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);