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
78369f0f
Commit
78369f0f
authored
Sep 25, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
8e4d7793
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
AppletLoginController.cs
Mall.WebApi/Controllers/User/AppletLoginController.cs
+17
-12
No files found.
Mall.WebApi/Controllers/User/AppletLoginController.cs
View file @
78369f0f
...
@@ -59,7 +59,7 @@ namespace Mall.WebApi.Controllers.User
...
@@ -59,7 +59,7 @@ namespace Mall.WebApi.Controllers.User
Moblie
=
parms
.
GetStringValue
(
"Moblie"
),
Moblie
=
parms
.
GetStringValue
(
"Moblie"
),
SuperiorId
=
parms
.
GetInt
(
"SuperiorId"
),
SuperiorId
=
parms
.
GetInt
(
"SuperiorId"
),
SmallShopId
=
parms
.
GetInt
(
"SmallShopId"
),
SmallShopId
=
parms
.
GetInt
(
"SmallShopId"
),
UserPageType
=
(
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
)
parms
.
GetInt
(
"UserPageType"
,
0
),
UserPageType
=
(
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
)
parms
.
GetInt
(
"UserPageType"
,
0
),
};
};
if
(
requestParm
.
TenantId
<=
0
)
if
(
requestParm
.
TenantId
<=
0
)
{
{
...
@@ -109,12 +109,16 @@ namespace Mall.WebApi.Controllers.User
...
@@ -109,12 +109,16 @@ namespace Mall.WebApi.Controllers.User
demodel
.
TotalConsumption
??=
0
;
demodel
.
TotalConsumption
??=
0
;
if
(!
demodel
.
UserPageType
.
HasValue
)
if
(!
demodel
.
UserPageType
.
HasValue
)
{
{
demodel
.
UserPageType
??
=
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
Mall
;
demodel
.
UserPageType
=
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
Mall
;
}
}
else
if
(
demodel
.
UserPageType
==
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
All
)
else
{
{
demodel
.
UserPageType
??=
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
Mall
;
if
(
demodel
.
UserPageType
==
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
All
)
{
demodel
.
UserPageType
=
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
Mall
;
}
}
}
#
endregion
#
endregion
var
basicsModel
=
userModule
.
GetDistributorBasicsInfo
(
requestParm
.
TenantId
.
ToString
(),
requestParm
.
MallBaseId
);
var
basicsModel
=
userModule
.
GetDistributorBasicsInfo
(
requestParm
.
TenantId
.
ToString
(),
requestParm
.
MallBaseId
);
if
((
basicsModel
?.
ReferralsCondition
??
DistrbutorReferralsEnum
.
SCDJ
)
==
DistrbutorReferralsEnum
.
SCDJ
||
(
basicsModel
?.
ReferralsCondition
??
DistrbutorReferralsEnum
.
SCDJ
)
==
DistrbutorReferralsEnum
.
SC7SF
)
if
((
basicsModel
?.
ReferralsCondition
??
DistrbutorReferralsEnum
.
SCDJ
)
==
DistrbutorReferralsEnum
.
SCDJ
||
(
basicsModel
?.
ReferralsCondition
??
DistrbutorReferralsEnum
.
SCDJ
)
==
DistrbutorReferralsEnum
.
SC7SF
)
...
@@ -198,22 +202,22 @@ namespace Mall.WebApi.Controllers.User
...
@@ -198,22 +202,22 @@ namespace Mall.WebApi.Controllers.User
SmallShopId
=
0
,
SmallShopId
=
0
,
UserSmallShopId
=
demodel
.
SmallShopId
,
UserSmallShopId
=
demodel
.
SmallShopId
,
IsOpenSchool
=
mmodel
.
IsOpenSchool
,
IsOpenSchool
=
mmodel
.
IsOpenSchool
,
UserPageType
=
mmodel
.
IsOpenSchool
==
1
?
demodel
.
UserPageType
:
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
All
UserPageType
=
mmodel
.
IsOpenSchool
==
1
?
demodel
.
UserPageType
:
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
All
};
};
UserReidsCache
.
AppletUserInfoSet
(
UserModuleCacheKeyConfig
.
Applet_Login_Info
+
UserId
,
appletUserInfo
,
Config
.
JwtExpirTime
);
UserReidsCache
.
AppletUserInfoSet
(
UserModuleCacheKeyConfig
.
Applet_Login_Info
+
UserId
,
appletUserInfo
,
Config
.
JwtExpirTime
);
if
(
couponResult
!=
null
&&
couponResult
.
ID
>
0
)
if
(
couponResult
!=
null
&&
couponResult
.
ID
>
0
)
{
{
return
ApiResult
.
CouponSuccess
(
ResultCode
.
Success
,
1
,
""
,
couponResult
.
Name
,
appletUserInfo
);
return
ApiResult
.
CouponSuccess
(
ResultCode
.
Success
,
1
,
""
,
couponResult
.
Name
,
appletUserInfo
);
}
}
else
else
{
{
return
ApiResult
.
CouponSuccess
(
ResultCode
.
Fail
,
1
,
""
,
""
,
appletUserInfo
);
return
ApiResult
.
CouponSuccess
(
ResultCode
.
Fail
,
1
,
""
,
""
,
appletUserInfo
);
}
}
}
}
return
ApiResult
.
CouponFailed
(
ResultCode
.
Fail
,
1
,
""
);
return
ApiResult
.
CouponFailed
(
ResultCode
.
Fail
,
1
,
""
);
// return ApiResult.Failed("注册失败,请联系管理员");
// return ApiResult.Failed("注册失败,请联系管理员");
}
}
else
else
...
@@ -225,7 +229,8 @@ namespace Mall.WebApi.Controllers.User
...
@@ -225,7 +229,8 @@ namespace Mall.WebApi.Controllers.User
return
ApiResult
.
CouponFailed
(
ResultCode
.
Fail
,
1
,
""
);
return
ApiResult
.
CouponFailed
(
ResultCode
.
Fail
,
1
,
""
);
// return ApiResult.Failed("未能查询到用户信息");
// return ApiResult.Failed("未能查询到用户信息");
}
}
if
(
umodel
.
Blacklist
==
1
)
{
if
(
umodel
.
Blacklist
==
1
)
{
return
ApiResult
.
Failed
(
"账号已被冻结,请联系运营商"
);
return
ApiResult
.
Failed
(
"账号已被冻结,请联系运营商"
);
}
}
TokenUserInfo
userInfo
=
new
TokenUserInfo
{
uid
=
umodel
.
Id
.
ToString
(),
requestFrom
=
ApiRequestFromEnum
.
MiniProgram
};
TokenUserInfo
userInfo
=
new
TokenUserInfo
{
uid
=
umodel
.
Id
.
ToString
(),
requestFrom
=
ApiRequestFromEnum
.
MiniProgram
};
...
@@ -249,7 +254,7 @@ namespace Mall.WebApi.Controllers.User
...
@@ -249,7 +254,7 @@ namespace Mall.WebApi.Controllers.User
#
endregion
#
endregion
var
mmodel
=
programModule
.
GetMiniProgramModule
(
new
RB_MiniProgram_Extend
()
{
MallBaseId
=
umodel
.
MallBaseId
});
var
mmodel
=
programModule
.
GetMiniProgramModule
(
new
RB_MiniProgram_Extend
()
{
MallBaseId
=
umodel
.
MallBaseId
});
//2020-08-12 Add By:W
//2020-08-12 Add By:W
var
smallShopsInfoModle
=
userModule
.
GetSmallShopsInfoList
(
new
RB_SmallShops_Info_Extend
{
TenantId
=
umodel
.
TenantId
,
MallBaseId
=
umodel
.
MallBaseId
,
UserId
=
umodel
.
Id
}).
OrderByDescending
(
x
=>
x
.
CreateDate
).
FirstOrDefault
();
var
smallShopsInfoModle
=
userModule
.
GetSmallShopsInfoList
(
new
RB_SmallShops_Info_Extend
{
TenantId
=
umodel
.
TenantId
,
MallBaseId
=
umodel
.
MallBaseId
,
UserId
=
umodel
.
Id
}).
OrderByDescending
(
x
=>
x
.
CreateDate
).
FirstOrDefault
();
AppletUserInfo
appletUserInfo
=
new
AppletUserInfo
()
AppletUserInfo
appletUserInfo
=
new
AppletUserInfo
()
{
{
...
@@ -265,13 +270,13 @@ namespace Mall.WebApi.Controllers.User
...
@@ -265,13 +270,13 @@ namespace Mall.WebApi.Controllers.User
SecretKey
=
umodel
.
SecretKey
,
SecretKey
=
umodel
.
SecretKey
,
SuperiorId
=
umodel
.
SuperiorId
??
0
,
SuperiorId
=
umodel
.
SuperiorId
??
0
,
Token
=
token
,
Token
=
token
,
SmallShopId
=(
smallShopsInfoModle
!=
null
&&
smallShopsInfoModle
.
AuditStatus
==
DistributorAuditStatusEnum
.
Audited
)
?
smallShopsInfoModle
.
Id
:
0
,
SmallShopId
=
(
smallShopsInfoModle
!=
null
&&
smallShopsInfoModle
.
AuditStatus
==
DistributorAuditStatusEnum
.
Audited
)
?
smallShopsInfoModle
.
Id
:
0
,
UserSmallShopId
=
umodel
.
SmallShopId
,
UserSmallShopId
=
umodel
.
SmallShopId
,
IsOpenSchool
=
mmodel
.
IsOpenSchool
,
IsOpenSchool
=
mmodel
.
IsOpenSchool
,
UserPageType
=
mmodel
.
IsOpenSchool
==
1
?
umodel
.
UserPageType
:
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
All
UserPageType
=
mmodel
.
IsOpenSchool
==
1
?
umodel
.
UserPageType
:
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
All
};
};
UserReidsCache
.
AppletUserInfoSet
(
UserModuleCacheKeyConfig
.
Applet_Login_Info
+
umodel
.
Id
,
appletUserInfo
,
Config
.
JwtExpirTime
);
UserReidsCache
.
AppletUserInfoSet
(
UserModuleCacheKeyConfig
.
Applet_Login_Info
+
umodel
.
Id
,
appletUserInfo
,
Config
.
JwtExpirTime
);
return
ApiResult
.
CouponSuccess
(
ResultCode
.
Fail
,
1
,
""
,
""
,
appletUserInfo
);
return
ApiResult
.
CouponSuccess
(
ResultCode
.
Fail
,
1
,
""
,
""
,
appletUserInfo
);
//return ApiResult.Success("", appletUserInfo);
//return ApiResult.Success("", appletUserInfo);
}
}
}
}
...
...
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