admin
2020-12-03 55f808742eb4117dbb840955cb11bb9b9ae4f04c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;
    }
 
}