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
dd6db51b
Commit
dd6db51b
authored
Aug 12, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交微店设置
parent
73f54d9a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
2 deletions
+79
-2
RB_SmallShops_Custom.cs
Mall.Model/Entity/User/RB_SmallShops_Custom.cs
+2
-0
RB_SmallShops_CustomRepository.cs
Mall.Repository/User/RB_SmallShops_CustomRepository.cs
+75
-0
AppletLoginController.cs
Mall.WebApi/Controllers/User/AppletLoginController.cs
+2
-2
No files found.
Mall.Model/Entity/User/RB_SmallShops_Custom.cs
View file @
dd6db51b
...
...
@@ -248,6 +248,8 @@ namespace Mall.Model.Entity.User
// set;
//}
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 商户号
/// </summary>
...
...
Mall.Repository/User/RB_SmallShops_CustomRepository.cs
0 → 100644
View file @
dd6db51b
using
Mall.Model.Entity.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Mall.Repository.User
{
public
class
RB_SmallShops_CustomRepository
:
BaseRepository
<
RB_SmallShops_Custom
>
{
/// <summary>
/// 表名称
/// </summary>
public
string
TableName
{
get
{
return
nameof
(
RB_SmallShops_Custom
);
}
}
/// <summary>
/// 物料规则列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_SmallShops_Custom
>
GetPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_SmallShops_Custom
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
$" SELECT * FROM
{
TableName
}
WHERE
{
nameof
(
RB_SmallShops_Custom
.
Status
)}
=0"
);
if
(
query
!=
null
)
{
// where += $@" and {nameof(RB_Customer_InfoCreate.CustomerId)}={dmodel.CustomerId}";
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_SmallShops_Custom
.
TenantId
)}
=
{
query
.
TenantId
}
"
);
}
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_SmallShops_Custom
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
}
return
GetPage
<
RB_SmallShops_Custom
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 物流规则列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_SmallShops_Custom
>
GetLogisticsRulesList
(
RB_SmallShops_Custom
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
$" SELECT * FROM
{
TableName
}
WHERE
{
nameof
(
RB_SmallShops_Custom
.
Status
)}
=0 "
);
if
(
query
!=
null
)
{
if
(
query
.
Id
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_SmallShops_Custom
.
Id
)}
=
{
query
.
Id
}
"
);
}
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_SmallShops_Custom
.
TenantId
)}
=
{
query
.
TenantId
}
"
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_SmallShops_Custom
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
}
return
Get
<
RB_SmallShops_Custom
>(
builder
.
ToString
()).
ToList
();
}
}
}
Mall.WebApi/Controllers/User/AppletLoginController.cs
View file @
dd6db51b
...
...
@@ -224,7 +224,7 @@ namespace Mall.WebApi.Controllers.User
#
endregion
var
mmodel
=
programModule
.
GetMiniProgramModule
(
new
RB_MiniProgram_Extend
()
{
MallBaseId
=
umodel
.
MallBaseId
});
//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
()
{
...
...
@@ -240,7 +240,7 @@ namespace Mall.WebApi.Controllers.User
SecretKey
=
umodel
.
SecretKey
,
SuperiorId
=
umodel
.
SuperiorId
??
0
,
Token
=
token
,
SmallShopId
=
(
smallShopsInfoModle
!=
null
&&
smallShopsInfoModle
.
AuditStatus
==
DistributorAuditStatusEnum
.
Audited
)
?
smallShopsInfoModle
.
Id
:
0
SmallShopId
=
0
//
(smallShopsInfoModle != null && smallShopsInfoModle.AuditStatus == DistributorAuditStatusEnum.Audited) ? smallShopsInfoModle.Id : 0
};
UserReidsCache
.
AppletUserInfoSet
(
UserModuleCacheKeyConfig
.
Applet_Login_Info
+
umodel
.
Id
,
appletUserInfo
,
Config
.
JwtExpirTime
);
return
ApiResult
.
CouponSuccess
(
ResultCode
.
Fail
,
""
,
""
,
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