案例效果

添加用户自定义属性

实现思路

  1. 方式一

添加系统变量:

  1. 方式二

实现自定义接口,继承EndUserCustomAttributesService,实现addCustomAttributesService方法

操作步骤

  1. 方式一

添加系统变量:

名称:用户自定义属性变量
编码:CUSTOM_ATTRIBUTES
值:key1,key2~value1,value2:key就是在前端用于获取值的key,value对应user表中的字段值

  1. 方式二

实现自定义接口,继承EndUserCustomAttributesService,实现addCustomAttributesService方法

相关代码

@Service("endUserCustomAttributesService")
public class EndUserCustomAttributesServiceImpl implements EndUserCustomAttributesService,实现{

    @Override
    public Map<String, Object> addCustomAttributesService(DynaBean user, Map<String, Object> customAttributes) {
        customAttributes.put("aaaa","2222");
        return customAttributes;
    }
}

关键字,相关问题

  • 用户自定义属性
最后编辑: 肖海杰  文档更新时间: 2024-07-05 09:35   作者:肖海杰