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
7ed91697
Commit
7ed91697
authored
Oct 29, 2020
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
提交代码
parents
23c97c57
f2201cd3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
2 deletions
+45
-2
ContentModule.cs
Mall.Module.User/ContentModule.cs
+23
-0
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+5
-2
AppletStoresController.cs
Mall.WebApi/Controllers/Reserve/AppletStoresController.cs
+17
-0
No files found.
Mall.Module.User/ContentModule.cs
View file @
7ed91697
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
Mall.Common.Plugin
;
using
Mall.Model.Entity.User
;
...
...
@@ -268,6 +269,28 @@ namespace Mall.Module.User
return
storesRepository
.
GetStoresListRepository
(
query
,
isFirst
:
isFirst
);
}
/// <summary>
/// 获取门店
/// </summary>
/// <param name="query"></param>
/// <param name="isFirst"></param>
/// <returns></returns>
public
object
GetStoresInfoModule
(
RB_Stores_Extend
query
)
{
var
storeModel
=
GetStoresListModule
(
query
,
isFirst
:
true
)?.
FirstOrDefault
();
object
result
=
new
{
storeId
=
storeModel
?.
Id
,
storeName
=
storeModel
?.
Name
,
storeAddress
=
storeModel
?.
Address
,
storeTel
=
storeModel
?.
Tel
,
distance
=
storeModel
?.
KM
,
storeCoverImg
=
storeModel
?.
CoverImg
,
storeNavImg
=
storeModel
?.
NavImg
};
return
result
;
}
/// <summary>
/// 新增修改门店
/// </summary>
...
...
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
7ed91697
...
...
@@ -97,6 +97,9 @@ namespace Mall.WebApi.Controllers.MallBase
int
page_id
=
parms
.
GetInt
(
"page_id"
);
//是否开启校园版【1-是】
int
isOpenSchool
=
parms
.
GetInt
(
"open_school"
,
0
);
//店铺id
int
storeId
=
parms
.
GetInt
(
"StoreId"
,
0
);
//首页数据
var
homePage
=
new
object
();
//底部导航
...
...
@@ -169,7 +172,7 @@ namespace Mall.WebApi.Controllers.MallBase
{
foreach
(
var
subItem
in
templateModel
.
ComponentDataList
)
{
templateData
.
data
.
Add
(
MallHelper
.
PlusDataToObject
(
subItem
,
(
miniProgram
?.
TenantId
??
0
),
miniProgram
.
MallBaseId
,
RequestParm
.
SmallShopsId
,
isOpenSchool
));
templateData
.
data
.
Add
(
MallHelper
.
PlusDataToObject
(
subItem
,
(
miniProgram
?.
TenantId
??
0
),
miniProgram
.
MallBaseId
,
RequestParm
.
SmallShopsId
,
isOpenSchool
,
storeId
));
}
}
var
tempObj
=
new
...
...
@@ -242,7 +245,7 @@ namespace Mall.WebApi.Controllers.MallBase
{
foreach
(
var
subItem
in
templateModel
.
ComponentDataList
)
{
templateData
.
data
.
Add
(
MallHelper
.
PlusDataToObject
(
subItem
,
(
miniProgram
?.
TenantId
??
0
),
miniProgram
.
MallBaseId
,
RequestParm
.
SmallShopsId
,
isOpenSchool
));
templateData
.
data
.
Add
(
MallHelper
.
PlusDataToObject
(
subItem
,
(
miniProgram
?.
TenantId
??
0
),
miniProgram
.
MallBaseId
,
RequestParm
.
SmallShopsId
,
isOpenSchool
,
storeId
));
}
}
var
tempObj
=
new
...
...
Mall.WebApi/Controllers/Reserve/AppletStoresController.cs
View file @
7ed91697
...
...
@@ -4,8 +4,10 @@ using Mall.AOP;
using
Mall.Common.API
;
using
Mall.Common.Plugin
;
using
Mall.Model.Entity.User
;
using
Mall.Module.Product
;
using
Mall.Module.User
;
using
Mall.WebApi.Filter
;
using
Microsoft.AspNetCore.Authorization
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Mvc
;
using
Newtonsoft.Json
;
...
...
@@ -27,11 +29,19 @@ namespace Mall.WebApi.Controllers.Reserve
/// </summary>
private
readonly
ContentModule
contentModule
=
AOPHelper
.
CreateAOPObject
<
ContentModule
>();
/// <summary>
/// 线下服务商品处理类对象
/// </summary>
private
readonly
OfflineGoodsModule
offlineGoodsModule
=
AOPHelper
.
CreateAOPObject
<
OfflineGoodsModule
>();
/// <summary>
/// 线下服务首页获取当前距离最近门店
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
public
virtual
ApiResult
GetCurrentStore
(
object
requestMsg
)
{
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -70,6 +80,9 @@ namespace Mall.WebApi.Controllers.Reserve
/// </summary>
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
public
virtual
ApiResult
GetStorePage
(
object
requestMsg
)
{
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -93,6 +106,9 @@ namespace Mall.WebApi.Controllers.Reserve
/// </summary>
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
public
virtual
ApiResult
GetStoreInfo
(
object
requestMsg
)
{
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -117,6 +133,7 @@ namespace Mall.WebApi.Controllers.Reserve
storeAddress
=
storeModel
?.
Address
,
storeTel
=
storeModel
?.
Tel
,
distance
=
storeModel
?.
KM
,
storeScore
=
storeModel
?.
Score
,
storeCoverImg
=
storeModel
?.
CoverImg
,
storeNavImg
=
storeModel
?.
NavImg
},
...
...
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