admin
2020-12-02 a2fe11f549f52e887937dbdb63d967a09d3a3f21
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;
    }
 
}