Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
0bbf13bb
Commit
0bbf13bb
authored
Sep 14, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
c0522cc3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
37 deletions
+37
-37
UserReidsCache.cs
Mall.CacheManager/User/UserReidsCache.cs
+36
-32
AppletUserController.cs
Mall.WebApi/Controllers/User/AppletUserController.cs
+1
-5
No files found.
Mall.CacheManager/User/UserReidsCache.cs
View file @
0bbf13bb
...
...
@@ -166,45 +166,49 @@ namespace Mall.CacheManager.User
/// <returns></returns>
public
static
AppletUserInfo
GetAppletUserLoginInfo
(
object
UserId
)
{
string
cacheKey
=
UserModuleCacheKeyConfig
.
Applet_Login_Info
+
UserId
.
ToString
();
AppletUserInfo
userInfo
=
null
;
try
if
(
UserId
!=
null
)
{
userInfo
=
redis
.
StringGet
<
AppletUserInfo
>(
cacheKey
);
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"GetAppletUserLoginInfo"
);
}
if
(
userInfo
==
null
)
{
Int32
.
TryParse
(
UserId
.
ToString
(),
out
int
NewUserId
);
if
(
NewUserId
>
0
)
string
cacheKey
=
UserModuleCacheKeyConfig
.
Applet_Login_Info
+
UserId
.
ToString
();
AppletUserInfo
userInfo
=
null
;
try
{
userInfo
=
redis
.
StringGet
<
AppletUserInfo
>(
cacheKey
);
}
catch
(
Exception
ex
)
{
string
token
=
""
;
var
umodel
=
member_UserRepository
.
GetEntity
<
RB_Member_User_Extend
>(
NewUserId
);
if
(
umodel
!=
null
)
LogHelper
.
Write
(
ex
,
"GetAppletUserLoginInfo"
);
}
if
(
userInfo
==
null
)
{
Int32
.
TryParse
(
UserId
.
ToString
(),
out
int
NewUserId
);
if
(
NewUserId
>
0
)
{
userInfo
=
new
AppletUserInfo
string
token
=
""
;
var
umodel
=
member_UserRepository
.
GetEntity
<
RB_Member_User_Extend
>(
NewUserId
);
if
(
umodel
!=
null
)
{
MallBaseId
=
umodel
.
MallBaseId
,
MallName
=
""
,
Mobile
=
umodel
.
Moblie
,
UserId
=
NewUserId
,
TenantId
=
umodel
.
TenantId
,
Name
=
umodel
.
Name
,
OpenId
=
umodel
.
OpenId
,
Photo
=
umodel
.
Photo
,
Source
=
umodel
.
Source
,
SecretKey
=
umodel
.
SecretKey
,
SuperiorId
=
umodel
.
SuperiorId
??
0
,
Token
=
token
};
AppletUserInfoSet
(
UserModuleCacheKeyConfig
.
Applet_Login_Info
+
UserId
,
userInfo
,
Config
.
JwtExpirTime
);
userInfo
=
new
AppletUserInfo
{
MallBaseId
=
umodel
.
MallBaseId
,
MallName
=
""
,
Mobile
=
umodel
.
Moblie
,
UserId
=
NewUserId
,
TenantId
=
umodel
.
TenantId
,
Name
=
umodel
.
Name
,
OpenId
=
umodel
.
OpenId
,
Photo
=
umodel
.
Photo
,
Source
=
umodel
.
Source
,
SecretKey
=
umodel
.
SecretKey
,
SuperiorId
=
umodel
.
SuperiorId
??
0
,
Token
=
token
};
AppletUserInfoSet
(
UserModuleCacheKeyConfig
.
Applet_Login_Info
+
UserId
,
userInfo
,
Config
.
JwtExpirTime
);
}
}
}
return
userInfo
;
}
return
userInfo
;
return
null
;
}
}
}
Mall.WebApi/Controllers/User/AppletUserController.cs
View file @
0bbf13bb
...
...
@@ -151,17 +151,13 @@ namespace Mall.WebApi.Controllers.User
public
ApiResult
SetUserShippingAddress
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
JObject
prams
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
NewUserId
=
prams
.
GetInt
(
"NewUserId"
);
AppletUserInfo
userInfo
=
null
;
if
(
NewUserId
>
0
)
{
userInfo
=
UserReidsCache
.
GetAppletUserLoginInfo
(
NewUserId
);
}
else
{
userInfo
=
AppletUserInfo
;
}
RB_Member_ShippingAddress_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Member_ShippingAddress_Extend
>(
req
.
msg
.
ToString
());
if
(
string
.
IsNullOrEmpty
(
demodel
.
Name
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment