|
|
@@ -704,7 +704,14 @@ func GetUserInfo(userID int) (*Userinfo, error) {
|
|
|
if len(userInfo.Mobile) > 0 {
|
|
|
if s1, err := hex.DecodeString(userInfo.Mobile); err == nil { // hex -> []byte
|
|
|
if s2, err := utils.AESDecrypt(s1, key); err == nil {
|
|
|
- userInfo.Mobile2 = string(s2)
|
|
|
+ // 临时操作 - 解决导入数据手机号码被加密两次的问题
|
|
|
+ if len(userInfo.Mobile) >= 40 {
|
|
|
+ if s3, err := utils.AESDecrypt(s2, key); err == nil {
|
|
|
+ userInfo.Mobile2 = string(s3)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ userInfo.Mobile2 = string(s2)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|