package com.ks.daylucky.util;
|
|
import com.ks.daylucky.pojo.DO.UserInfo;
|
import org.yeshi.utils.StringUtil;
|
|
public class UserInfoUtil {
|
|
/**
|
* 获取用户唯一标识
|
*
|
* @param userInfo
|
* @return
|
*/
|
public static String getIdentifyCode(UserInfo userInfo) {
|
if (!StringUtil.isNullOrEmpty(userInfo.getAlipayUid())) {
|
return userInfo.getAlipayUid();
|
} else if (!StringUtil.isNullOrEmpty(userInfo.getWxOpenId())) {
|
return userInfo.getWxOpenId();
|
}
|
return null;
|
}
|
|
}
|