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
0f2248d3
Commit
0f2248d3
authored
Sep 22, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
4b1b0734
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
52 deletions
+93
-52
UserReidsCache.cs
Mall.CacheManager/User/UserReidsCache.cs
+1
-1
AppletTradeController.cs
...WebApi/Controllers/TradePavilion/AppletTradeController.cs
+6
-6
AppletLoginController.cs
Mall.WebApi/Controllers/User/AppletLoginController.cs
+4
-4
SupplierController.cs
Mall.WebApi/Controllers/User/SupplierController.cs
+5
-1
ApiFilterAttribute.cs
Mall.WebApi/Filter/ApiFilterAttribute.cs
+77
-40
No files found.
Mall.CacheManager/User/UserReidsCache.cs
View file @
0f2248d3
...
@@ -205,7 +205,7 @@ namespace Mall.CacheManager.User
...
@@ -205,7 +205,7 @@ namespace Mall.CacheManager.User
{
{
string
token
=
""
;
string
token
=
""
;
var
umodel
=
member_UserRepository
.
GetEntity
<
RB_Member_User_Extend
>(
NewUserId
);
var
umodel
=
member_UserRepository
.
GetEntity
<
RB_Member_User_Extend
>(
NewUserId
);
if
(
umodel
!=
null
)
if
(
umodel
!=
null
&&
(
umodel
.
Blacklist
??
0
)
==
0
)
{
{
userInfo
=
new
AppletUserInfo
userInfo
=
new
AppletUserInfo
{
{
...
...
Mall.WebApi/Controllers/TradePavilion/AppletTradeController.cs
View file @
0f2248d3
...
@@ -1632,7 +1632,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -1632,7 +1632,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetCarrierPageList
()
public
ApiResult
GetCarrierPageList
()
{
{
var
userInfo
=
AppletUserInfo
;
var
userInfo
=
AppletUserInfo
;
...
@@ -1718,7 +1718,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -1718,7 +1718,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetCarrierDetails
()
public
ApiResult
GetCarrierDetails
()
{
{
var
userInfo
=
AppletUserInfo
;
var
userInfo
=
AppletUserInfo
;
...
@@ -1904,10 +1904,10 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -1904,10 +1904,10 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
/// <returns></returns>
[
HttpGet
]
[
HttpGet
]
[
HttpPost
]
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetBrandPageList
()
public
ApiResult
GetBrandPageList
()
{
{
var
userInfo
=
AppletUserInfo
;
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Brand_Extend
()
var
query
=
new
RB_Brand_Extend
()
...
@@ -1925,8 +1925,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -1925,8 +1925,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
DianLiang
=
parms
.
GetStringValue
(
"DianLiang"
),
DianLiang
=
parms
.
GetStringValue
(
"DianLiang"
),
PrizeId
=
parms
.
GetInt
(
"PrizeId"
,
0
),
PrizeId
=
parms
.
GetInt
(
"PrizeId"
,
0
),
};
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
query
.
TenantId
=
userInfo
.
TenantId
;
var
list
=
carrierModule
.
GetBrandPageList
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
var
list
=
carrierModule
.
GetBrandPageList
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
List
<
RB_FirstShop_ListEnroll_Extend
>
listEnroll
=
new
List
<
RB_FirstShop_ListEnroll_Extend
>();
List
<
RB_FirstShop_ListEnroll_Extend
>
listEnroll
=
new
List
<
RB_FirstShop_ListEnroll_Extend
>();
if
(
list
!=
null
&&
list
.
Any
())
if
(
list
!=
null
&&
list
.
Any
())
...
@@ -1965,7 +1965,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -1965,7 +1965,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
/// <returns></returns>
[
HttpGet
]
[
HttpGet
]
[
HttpPost
]
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetBrandDetails
()
public
ApiResult
GetBrandDetails
()
{
{
var
req
=
RequestParm
;
var
req
=
RequestParm
;
...
...
Mall.WebApi/Controllers/User/AppletLoginController.cs
View file @
0f2248d3
...
@@ -93,10 +93,10 @@ namespace Mall.WebApi.Controllers.User
...
@@ -93,10 +93,10 @@ namespace Mall.WebApi.Controllers.User
{
{
return
ApiResult
.
ParamIsNull
(
"请传递来源平台"
);
return
ApiResult
.
ParamIsNull
(
"请传递来源平台"
);
}
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
OpenId
))
//
if (string.IsNullOrEmpty(demodel.OpenId))
{
//
{
return
ApiResult
.
ParamIsNull
(
"请传递唯一码"
);
//
return ApiResult.ParamIsNull("请传递唯一码");
}
//
}
Model
.
Extend
.
MarketingCenter
.
RB_DiscountCoupon_Extend
couponResult
=
new
Model
.
Extend
.
MarketingCenter
.
RB_DiscountCoupon_Extend
();
Model
.
Extend
.
MarketingCenter
.
RB_DiscountCoupon_Extend
couponResult
=
new
Model
.
Extend
.
MarketingCenter
.
RB_DiscountCoupon_Extend
();
...
...
Mall.WebApi/Controllers/User/SupplierController.cs
View file @
0f2248d3
...
@@ -189,7 +189,11 @@ namespace Mall.WebApi.Controllers.User
...
@@ -189,7 +189,11 @@ namespace Mall.WebApi.Controllers.User
{
{
var
parms
=
RequestParm
;
var
parms
=
RequestParm
;
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Supplier_Extend
>(
RequestParm
.
msg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Supplier_Extend
>(
RequestParm
.
msg
.
ToString
());
if
(
UserInfo
!=
null
)
{
query
.
TenantId
=
UserInfo
.
TenantId
;
query
.
TenantId
=
UserInfo
.
TenantId
;
}
query
.
MallBaseId
=
parms
.
MallBaseId
;
query
.
MallBaseId
=
parms
.
MallBaseId
;
var
oldLogisticsList
=
supplierModule
.
GetList
(
query
);
var
oldLogisticsList
=
supplierModule
.
GetList
(
query
);
return
ApiResult
.
Success
(
""
,
oldLogisticsList
);
return
ApiResult
.
Success
(
""
,
oldLogisticsList
);
...
...
Mall.WebApi/Filter/ApiFilterAttribute.cs
View file @
0f2248d3
...
@@ -50,7 +50,6 @@ namespace Mall.WebApi.Filter
...
@@ -50,7 +50,6 @@ namespace Mall.WebApi.Filter
isCheckToken
=
false
;
isCheckToken
=
false
;
}
}
#
region
Token
校验
#
region
Token
校验
if
(
isCheckToken
)
if
(
isCheckToken
)
{
{
JWTValidat
(
actionContext
,
token
);
JWTValidat
(
actionContext
,
token
);
...
@@ -58,6 +57,44 @@ namespace Mall.WebApi.Filter
...
@@ -58,6 +57,44 @@ namespace Mall.WebApi.Filter
#
endregion
#
endregion
//token
var
userToken
=
actionContext
.
HttpContext
.
Items
[
GlobalKey
.
TokenUserInfo
];
if
(
userToken
!=
null
&&
!
string
.
IsNullOrEmpty
(
userToken
.
ToString
()))
{
JObject
parms
=
JObject
.
Parse
(
userToken
.
ToString
());
var
requestFrom
=
parms
.
GetInt
(
"requestFrom"
);
var
uid
=
parms
.
GetStringValue
(
"uid"
);
//后台用户
if
(
requestFrom
==
1
)
{
var
cacheUser
=
UserReidsCache
.
GetUserLoginInfo
(
uid
);
if
(
cacheUser
==
null
||
(
cacheUser
!=
null
&&
(
cacheUser
.
TenantId
<=
0
)))
{
actionContext
.
Result
=
new
Microsoft
.
AspNetCore
.
Mvc
.
JsonResult
(
new
ApiResult
{
resultCode
=
(
int
)
ResultCode
.
FormRepeatSubmit
,
message
=
"Token验证失败!"
,
data
=
null
});
}
}
else
{
var
cacheMiniAppUser
=
UserReidsCache
.
GetAppletUserLoginInfo
(
uid
);
if
(
cacheMiniAppUser
==
null
||
(
cacheMiniAppUser
!=
null
&&
(
cacheMiniAppUser
.
UserId
<=
0
)))
{
actionContext
.
Result
=
new
Microsoft
.
AspNetCore
.
Mvc
.
JsonResult
(
new
ApiResult
{
resultCode
=
(
int
)
ResultCode
.
FormRepeatSubmit
,
message
=
"Token验证失败!"
,
data
=
null
});
}
}
}
#
region
签名校验权限校验
#
region
签名校验权限校验
if
(
actionContext
.
HttpContext
.
Items
[
GlobalKey
.
TokenUserInfo
]
!=
null
)
if
(
actionContext
.
HttpContext
.
Items
[
GlobalKey
.
TokenUserInfo
]
!=
null
)
{
{
...
...
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