com.github.javaclub.base.utils.UserUtils Maven / Gradle / Ivy
package com.github.javaclub.base.utils;
import java.util.Map;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.github.javaclub.base.domain.AppUserDO;
import com.github.javaclub.base.domain.UserProfile;
public class UserUtils {
public static AppUserDO asUser(Map param) {
return JSONObject.parseObject(JSON.toJSONString(param), AppUserDO.class);
}
public static UserProfile mockAppUser() {
return new UserProfile(1L, "openid_xyzabc_demo", "18888888888", "测试用户");
}
}