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
9a7280ab
Commit
9a7280ab
authored
Dec 11, 2024
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f7121fa7
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
497 additions
and
16 deletions
+497
-16
RB_Collect.cs
Mall.Model/Entity/TradePavilion/RB_Collect.cs
+1
-1
RB_Brand_Enterprise_Extend.cs
....Model/Extend/TradePavilion/RB_Brand_Enterprise_Extend.cs
+5
-0
RB_Building_Extend.cs
Mall.Model/Extend/TradePavilion/RB_Building_Extend.cs
+11
-0
RB_Collect_Extend.cs
Mall.Model/Extend/TradePavilion/RB_Collect_Extend.cs
+8
-0
RB_EnterpriseServices_Extend.cs
...odel/Extend/TradePavilion/RB_EnterpriseServices_Extend.cs
+12
-1
BuildingCarrierModule.cs
Mall.Module.TradePavilion/BuildingCarrierModule.cs
+58
-11
BuildingCarrierModule_V2.cs
Mall.Module.TradePavilion/BuildingCarrierModule_V2.cs
+136
-0
CarrierModule.cs
Mall.Module.TradePavilion/CarrierModule.cs
+5
-0
RB_BuildingRepository.cs
Mall.Repository/TradePavilion/RB_BuildingRepository.cs
+4
-0
RB_EnterpriseServicesRepository.cs
...pository/TradePavilion/RB_EnterpriseServicesRepository.cs
+6
-0
AppletTradeController.cs
...WebApi/Controllers/TradePavilion/AppletTradeController.cs
+251
-3
No files found.
Mall.Model/Entity/TradePavilion/RB_Collect.cs
View file @
9a7280ab
...
...
@@ -20,7 +20,7 @@ namespace Mall.Model.Entity.TradePavilion
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 类型 1载体 2品牌
/// 类型 1载体 2品牌
,3-企业,4-楼宇
/// </summary>
public
int
Type
{
get
;
set
;
}
...
...
Mall.Model/Extend/TradePavilion/RB_Brand_Enterprise_Extend.cs
View file @
9a7280ab
...
...
@@ -30,5 +30,10 @@ namespace Mall.Model.Extend.TradePavilion
/// 根据ids查询
/// </summary>
public
string
SelectIds
{
get
;
set
;
}
/// <summary>
/// 收藏id
/// </summary>
public
int
CollectId
{
get
;
set
;
}
}
}
Mall.Model/Extend/TradePavilion/RB_Building_Extend.cs
View file @
9a7280ab
using
Mall.Model.Entity.TradePavilion
;
using
System.Collections.Generic
;
namespace
Mall.Model.Extend.TradePavilion
{
...
...
@@ -11,5 +12,15 @@ namespace Mall.Model.Extend.TradePavilion
/// 分类名称
/// </summary>
public
string
CategoryName
{
get
;
set
;
}
/// <summary>
/// 轮播图
/// </summary>
public
List
<
string
>
BannerList
{
get
;
set
;
}
/// <summary>
/// 根据ids获取
/// </summary>
public
string
QIds
{
get
;
set
;
}
}
}
Mall.Model/Extend/TradePavilion/RB_Collect_Extend.cs
View file @
9a7280ab
...
...
@@ -27,8 +27,16 @@ namespace Mall.Model.Extend.TradePavilion
/// </summary>
public
string
Address
{
get
;
set
;
}
/// <summary>
/// 品牌名称
/// </summary>
public
string
ProjectName
{
get
;
set
;
}
/// <summary>
/// 品牌ID
/// </summary>
public
int
ProjectId
{
get
;
set
;
}
/// <summary>
/// 项目类型
/// </summary>
...
...
Mall.Model/Extend/TradePavilion/RB_EnterpriseServices_Extend.cs
View file @
9a7280ab
using
Mall.Model.Entity.TradePavilion
;
using
System.Collections.Generic
;
namespace
Mall.Model.Extend.TradePavilion
{
/// <summary>
/// 企业服务扩展实体类
/// </summary>
public
class
RB_EnterpriseServices_Extend
:
RB_EnterpriseServices
public
class
RB_EnterpriseServices_Extend
:
RB_EnterpriseServices
{
/// <summary>
/// 分类名称
/// </summary>
public
string
CategoryName
{
get
;
set
;
}
/// <summary>
/// 轮播图
/// </summary>
public
List
<
string
>
BannerList
{
get
;
set
;
}
/// <summary>
/// ids
/// </summary>
public
string
SelectIds
{
get
;
set
;
}
}
}
Mall.Module.TradePavilion/BuildingCarrierModule.cs
View file @
9a7280ab
...
...
@@ -243,7 +243,7 @@ namespace Mall.Module.TradePavilion
}
if
((
extModel
?.
ID
??
0
)
>
0
&&
isVisit
)
{
System
.
Threading
.
Tasks
.
Task
.
Run
(()
=>
visit_LogRepository
.
AddVisitLog
(
extModel
.
TenantId
,
extModel
.
MallBaseId
,
extModel
.
ID
,
extModel
.
BuildingCarrierType
));
System
.
Threading
.
Tasks
.
Task
.
Run
(()
=>
visit_LogRepository
.
AddVisitLog
(
extModel
.
TenantId
,
extModel
.
MallBaseId
,
extModel
.
ID
,
1
));
}
return
extModel
;
}
...
...
@@ -338,15 +338,16 @@ namespace Mall.Module.TradePavilion
if
(
extModel
!=
null
&&
extModel
.
CategoryId
>
0
)
{
extModel
.
CategoryName
=
brandClassRepository
.
GetEntity
(
extModel
.
CategoryId
)?.
ClassName
??
""
;
}
extModel
.
BannerList
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
extModel
.
Banner
))
{
extModel
.
BannerList
=
Newtonsoft
.
Json
.
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
extModel
.
Banner
);
}
}
if
((
extModel
?.
ID
??
0
)
>
0
&&
isVisit
)
{
System
.
Threading
.
Tasks
.
Task
.
Run
(()
=>
visit_LogRepository
.
AddVisitLog
(
extModel
.
TenantId
,
extModel
.
MallBaseId
,
extModel
.
ID
,
extModel
.
BrandEnterpriseType
==
1
?
3
:
4
));
System
.
Threading
.
Tasks
.
Task
.
Run
(()
=>
visit_LogRepository
.
AddVisitLog
(
extModel
.
TenantId
,
extModel
.
MallBaseId
,
extModel
.
ID
,
3
));
}
return
extModel
;
}
...
...
@@ -380,7 +381,20 @@ namespace Mall.Module.TradePavilion
/// <returns></returns>
public
List
<
RB_Building_Extend
>
GetBuildingPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Building_Extend
query
)
{
return
buildingRepository
.
GetBuildingPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
var
list
=
buildingRepository
.
GetBuildingPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Any
())
{
foreach
(
var
item
in
list
)
{
item
.
BannerList
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
item
.
Banner
))
{
item
.
BannerList
=
Newtonsoft
.
Json
.
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
item
.
Banner
);
}
}
}
return
list
;
}
/// <summary>
...
...
@@ -437,16 +451,27 @@ namespace Mall.Module.TradePavilion
/// </summary>
/// <param name="BuildId"></param>
/// <returns></returns>
public
RB_Building_Extend
GetBuildingInfoModule
(
int
BuildId
)
public
RB_Building_Extend
GetBuildingInfoModule
(
int
BuildId
,
bool
isVisit
=
false
)
{
var
extModel
=
buildingRepository
.
GetEntity
<
RB_Building_Extend
>(
BuildId
);
if
(
extModel
!=
null
&&
extModel
.
CategoryId
>
0
)
{
extModel
.
CategoryName
=
brandClassRepository
.
GetEntity
(
extModel
.
CategoryId
)?.
ClassName
??
""
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
extModel
?.
Banner
??
""
))
{
extModel
.
BannerList
=
new
List
<
string
>();
extModel
.
BannerList
=
Newtonsoft
.
Json
.
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
extModel
.
Banner
);
}
if
((
extModel
?.
BuildId
??
0
)
>
0
&&
isVisit
)
{
System
.
Threading
.
Tasks
.
Task
.
Run
(()
=>
visit_LogRepository
.
AddVisitLog
(
extModel
.
TenantId
,
extModel
.
MallBaseId
,
extModel
.
BuildId
,
2
));
}
return
extModel
;
}
/// <summary>
/// 根据编号删除获取楼宇
/// </summary>
...
...
@@ -477,7 +502,20 @@ namespace Mall.Module.TradePavilion
/// <returns></returns>
public
List
<
RB_EnterpriseServices_Extend
>
GetEnterpriseServicesPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_EnterpriseServices_Extend
query
)
{
return
enterpriseServicesRepository
.
GetEnterpriseServicesPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
var
list
=
enterpriseServicesRepository
.
GetEnterpriseServicesPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Any
())
{
foreach
(
var
item
in
list
)
{
item
.
BannerList
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
item
?.
Banner
??
""
))
{
item
.
BannerList
=
Newtonsoft
.
Json
.
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
item
.
Banner
);
}
}
}
return
list
;
}
/// <summary>
...
...
@@ -528,13 +566,22 @@ namespace Mall.Module.TradePavilion
/// </summary>
/// <param name="ServiceId"></param>
/// <returns></returns>
public
RB_EnterpriseServices_Extend
GetEnterpriseServicesInfoModule
(
int
ServiceId
)
public
RB_EnterpriseServices_Extend
GetEnterpriseServicesInfoModule
(
int
ServiceId
,
bool
isVisit
=
false
)
{
var
extModel
=
enterpriseServicesRepository
.
GetEntity
<
RB_EnterpriseServices_Extend
>(
ServiceId
);
if
(
extModel
!=
null
&&
extModel
.
CategoryId
>
0
)
{
extModel
.
CategoryName
=
brandClassRepository
.
GetEntity
(
extModel
.
CategoryId
)?.
ClassName
??
""
;
}
extModel
.
BannerList
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
extModel
.
Banner
))
{
extModel
.
BannerList
=
Newtonsoft
.
Json
.
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
extModel
.
Banner
);
}
if
((
extModel
?.
ServiceId
??
0
)
>
0
&&
isVisit
)
{
System
.
Threading
.
Tasks
.
Task
.
Run
(()
=>
visit_LogRepository
.
AddVisitLog
(
extModel
.
TenantId
,
extModel
.
MallBaseId
,
extModel
.
ServiceId
,
4
));
}
return
extModel
;
}
...
...
Mall.Module.TradePavilion/BuildingCarrierModule_V2.cs
View file @
9a7280ab
...
...
@@ -58,6 +58,10 @@ namespace Mall.Module.TradePavilion
private
readonly
RB_BuildingApplyForRepository
buildingApplyForRepository
=
new
RB_BuildingApplyForRepository
();
/// <summary>
/// 收藏仓储层对象
/// </summary>
private
readonly
RB_CollectRepository
collectRepository
=
new
RB_CollectRepository
();
#
region
品牌
/
企业
/// <summary>
/// 品牌/企业申请信息列表
...
...
@@ -1591,5 +1595,137 @@ namespace Mall.Module.TradePavilion
return
list
;
}
#
endregion
#
region
收藏
/// <summary>
/// 分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Collect_Extend
>
GetMyCollectEnterprisePage
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Collect_Extend
query
)
{
var
list
=
collectRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
rowCount
,
query
);
string
sourceIds
=
""
;
if
(
list
!=
null
&&
list
.
Any
())
{
sourceIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
SourceId
));
}
if
(
query
.
Type
==
1
)
//1-载体
{
if
(!
string
.
IsNullOrEmpty
(
sourceIds
))
{
var
sourceList
=
GetBuildingCarrierListModule
(
new
RB_Building_Carrier_Extend
{
TenantId
=
query
.
TenantId
,
MallBaseId
=
query
.
MallBaseId
,
SelectIds
=
sourceIds
});
foreach
(
var
item
in
list
)
{
RB_Building_Carrier_Extend
carrierModel
=
sourceList
.
Where
(
x
=>
x
.
ID
==
item
.
SourceId
).
FirstOrDefault
();
if
(
carrierModel
!=
null
&&
carrierModel
.
ID
>
0
)
{
item
.
SourceName
=
carrierModel
.
CarrierName
;
item
.
Address
=
carrierModel
.
Address
;
item
.
ProjectName
=
carrierModel
.
CategoryName
;
item
.
ProjectId
=
carrierModel
.
CategoryId
;
item
.
BannerList
=
carrierModel
.
BannerList
;
}
}
}
}
else
if
(
query
.
Type
==
2
)
//2-品牌
{
if
(!
string
.
IsNullOrEmpty
(
sourceIds
))
{
var
sourceList
=
GetBrandEnterpriseListModule
(
new
RB_Brand_Enterprise_Extend
{
TenantId
=
query
.
TenantId
,
MallBaseId
=
query
.
MallBaseId
,
SelectIds
=
sourceIds
,
RanQi
=
-
1
,
KongTiao
=
-
1
,
XinFeng
=
-
1
,
Plumbing
=
-
1
,
Caliber
=
-
1
,
Sewage
=
-
1
,
PaiYan
=
-
1
,
});
foreach
(
var
item
in
list
)
{
RB_Brand_Enterprise_Extend
carrierModel
=
sourceList
.
Where
(
x
=>
x
.
ID
==
item
.
SourceId
).
FirstOrDefault
();
if
(
carrierModel
!=
null
&&
carrierModel
.
ID
>
0
)
{
if
(!
string
.
IsNullOrWhiteSpace
(
carrierModel
.
Banner
))
{
carrierModel
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
carrierModel
.
Banner
);
}
item
.
SourceName
=
carrierModel
.
BrandName
;
item
.
SourceFullName
=
carrierModel
.
FullBrandName
;
item
.
ProjectName
=
carrierModel
.
CategoryName
;
item
.
ProjectId
=
carrierModel
.
CategoryId
;
item
.
BannerList
=
carrierModel
.
BannerList
;
}
}
}
}
else
if
(
query
.
Type
==
3
)
//企业
{
if
(!
string
.
IsNullOrEmpty
(
sourceIds
))
{
var
sourceList
=
enterpriseServicesRepository
.
GetEnterpriseServicesListRepository
(
new
RB_EnterpriseServices_Extend
{
TenantId
=
query
.
TenantId
,
MallBaseId
=
query
.
MallBaseId
,
SelectIds
=
sourceIds
,
});
foreach
(
var
item
in
list
)
{
RB_EnterpriseServices_Extend
carrierModel
=
sourceList
.
Where
(
x
=>
x
.
ServiceId
==
item
.
SourceId
).
FirstOrDefault
();
if
(
carrierModel
!=
null
&&
carrierModel
.
ServiceId
>
0
)
{
if
(!
string
.
IsNullOrWhiteSpace
(
carrierModel
.
Banner
))
{
carrierModel
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
carrierModel
.
Banner
);
}
item
.
SourceName
=
carrierModel
.
Name
;
item
.
SourceFullName
=
carrierModel
.
Name
;
item
.
ProjectName
=
carrierModel
.
CategoryName
;
item
.
ProjectId
=
carrierModel
.
CategoryId
;
item
.
BannerList
=
carrierModel
.
BannerList
;
}
}
}
}
else
if
(
query
.
Type
==
4
)
//楼宇
{
if
(!
string
.
IsNullOrEmpty
(
sourceIds
))
{
var
sourceList
=
buildingRepository
.
GetBuildingRepository
(
new
RB_Building_Extend
{
TenantId
=
query
.
TenantId
,
MallBaseId
=
query
.
MallBaseId
,
QIds
=
sourceIds
,
});
foreach
(
var
item
in
list
)
{
RB_Building_Extend
carrierModel
=
sourceList
.
Where
(
x
=>
x
.
BuildId
==
item
.
SourceId
).
FirstOrDefault
();
if
(
carrierModel
!=
null
&&
carrierModel
.
BuildId
>
0
)
{
if
(!
string
.
IsNullOrWhiteSpace
(
carrierModel
.
Banner
))
{
carrierModel
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
carrierModel
.
Banner
);
}
item
.
SourceName
=
carrierModel
.
Name
;
item
.
SourceFullName
=
carrierModel
.
Name
;
item
.
ProjectName
=
carrierModel
.
CategoryName
;
item
.
ProjectId
=
carrierModel
.
CategoryId
;
item
.
BannerList
=
carrierModel
.
BannerList
;
}
}
}
}
return
list
;
}
#
endregion
}
}
Mall.Module.TradePavilion/CarrierModule.cs
View file @
9a7280ab
...
...
@@ -1288,6 +1288,11 @@ namespace Mall.Module.TradePavilion
}
return
flag
;
}
#
endregion
...
...
Mall.Repository/TradePavilion/RB_BuildingRepository.cs
View file @
9a7280ab
...
...
@@ -89,6 +89,10 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Building_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
QIds
))
{
builder
.
AppendFormat
(
" AND A.{0} in ({1}) "
,
nameof
(
RB_Building_Extend
.
BuildId
),
query
.
QIds
);
}
if
(
query
.
CategoryId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Building_Extend
.
CategoryId
),
query
.
CategoryId
);
...
...
Mall.Repository/TradePavilion/RB_EnterpriseServicesRepository.cs
View file @
9a7280ab
...
...
@@ -46,6 +46,8 @@ WHERE 1=1
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_EnterpriseServices_Extend
.
CategoryId
),
query
.
CategoryId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Name
))
{
builder
.
AppendFormat
(
@" AND A.{0} LIKE @Name "
,
nameof
(
RB_EnterpriseServices_Extend
.
Name
));
...
...
@@ -82,6 +84,10 @@ WHERE 1=1
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_EnterpriseServices_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
SelectIds
))
{
builder
.
AppendFormat
(
@" AND A.{0} in ({1}) "
,
nameof
(
RB_EnterpriseServices_Extend
.
ServiceId
),
query
.
SelectIds
);
}
if
(
query
.
CategoryId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_EnterpriseServices_Extend
.
CategoryId
),
query
.
CategoryId
);
...
...
Mall.WebApi/Controllers/TradePavilion/AppletTradeController.cs
View file @
9a7280ab
...
...
@@ -15,7 +15,9 @@ using Microsoft.AspNetCore.Cors;
using
Microsoft.AspNetCore.Mvc
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
using
Org.BouncyCastle.Ocsp
;
using
RabbitMQ.Client.Framing.Impl
;
using
Senparc.Weixin.Annotations
;
using
System
;
using
System.Collections
;
using
System.Collections.Generic
;
...
...
@@ -2913,8 +2915,15 @@ namespace Mall.WebApi.Controllers.TradePavilion
TenantId
=
RequestParm
.
TenantId
};
}
int
CollectId
=
0
;
if
(
RequestParm
.
UserId
>
0
&&
extModel
.
ID
>
0
)
{
//判断是否已经关注过
var
collectModel
=
carrierModule
.
GetList
(
new
RB_Collect_Extend
{
Status
=
0
,
Type
=
1
,
UserId
=
RequestParm
.
UserId
,
SourceId
=
extModel
.
ID
,
MallBaseId
=
query
.
MallBaseId
,
TenantId
=
query
.
TenantId
}).
FirstOrDefault
();
CollectId
=
collectModel
?.
Id
??
0
;
}
return
ApiResult
.
Success
(
data
:
new
{
CollectId
,
extModel
.
ID
,
extModel
.
CarrierName
,
extModel
.
Logo
,
...
...
@@ -2958,6 +2967,114 @@ namespace Mall.WebApi.Controllers.TradePavilion
#
endregion
#
region
楼宇管理
/// <summary>
/// 获取列表
/// </summary>
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetBuildingPageList
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Building_Extend
()
{
Name
=
parms
.
GetStringValue
(
"MetroName"
),
CategoryId
=
parms
.
GetInt
(
"CategoryId"
,
0
),
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
buildingCarrierModule
.
GetBuildingPageModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
count
,
query
);
pageModel
.
count
=
Convert
.
ToInt32
(
count
);
pageModel
.
pageData
=
list
.
Select
(
x
=>
new
{
ID
=
x
.
BuildId
,
CarrierName
=
x
.
Name
,
Logo
=
x
.
BannerList
?.
FirstOrDefault
()
??
""
,
CreateDate
=
x
.
CreateDate
.
ToString
(
"yyyy-MM-dd HH:mm"
),
x
.
Address
,
x
.
LatAndLon
,
x
.
Developers
,
ProjectType
=
x
.
CategoryId
,
ProjectTypeName
=
x
.
CategoryName
,
CarrierSize
=
x
.
Areas
,
LayersNum
=
x
.
FloorNum
,
CarNum
=
x
.
ElevatorNum
,
//电梯数,载体的是车位数
x
.
BannerList
,
});
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取楼宇实体
/// </summary>
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetBuildingDetails
()
{
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Building_Extend
()
{
BuildId
=
parms
.
GetInt
(
"ID"
,
0
),
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
userInfo
?.
TenantId
??
0
;
var
extModel
=
buildingCarrierModule
.
GetBuildingInfoModule
(
query
.
BuildId
,
isVisit
:
true
);
if
(
userInfo
==
null
)
{
userInfo
=
new
AppletUserInfo
{
UserId
=
RequestParm
.
UserId
,
MallBaseId
=
RequestParm
.
MallBaseId
,
TenantId
=
RequestParm
.
TenantId
};
}
int
CollectId
=
0
;
if
(
RequestParm
.
UserId
>
0
&&
extModel
.
BuildId
>
0
)
{
//判断是否已经关注过
var
collectModel
=
carrierModule
.
GetList
(
new
RB_Collect_Extend
{
Status
=
0
,
Type
=
4
,
UserId
=
RequestParm
.
UserId
,
SourceId
=
extModel
.
BuildId
,
MallBaseId
=
query
.
MallBaseId
,
TenantId
=
query
.
TenantId
}).
FirstOrDefault
();
CollectId
=
collectModel
?.
Id
??
0
;
}
return
ApiResult
.
Success
(
data
:
new
{
CollectId
,
BuildId
=
extModel
?.
BuildId
??
0
,
Name
=
extModel
?.
Name
??
""
,
extModel
.
Banner
,
Address
=
extModel
?.
Address
??
""
,
LatAndLon
=
extModel
?.
LatAndLon
??
""
,
OperationTime
=
extModel
?.
OperationTime
??
""
,
CategoryId
=
extModel
?.
CategoryId
??
0
,
CategoryName
=
extModel
?.
CategoryName
??
""
,
Areas
=
extModel
?.
Areas
??
""
,
BuildingNum
=
extModel
?.
BuildingNum
??
""
,
FloorNum
=
extModel
?.
FloorNum
??
0
,
ElevatorNum
=
extModel
?.
ElevatorNum
??
0
,
FloorHeight
=
extModel
?.
FloorHeight
??
0
,
Developers
=
extModel
?.
Developers
??
""
,
PropertyComp
=
extModel
?.
PropertyComp
??
""
,
SaleOrSelf
=
extModel
?.
SaleOrSelf
??
""
,
IsAllOperate
=
extModel
?.
IsAllOperate
??
0
,
ConstructionTime
=
extModel
?.
ConstructionTime
??
""
,
PropertyFee
=
extModel
?.
PropertyFee
??
0
,
RentFee
=
extModel
?.
RentFee
??
0
,
IndustryDirection
=
extModel
?.
IndustryDirection
??
""
,
BrandDemand
=
extModel
?.
BrandDemand
??
""
,
Other
=
extModel
?.
Other
??
""
,
//ContactName = extModel?.ContactName ?? "",
// ContactPhone = extModel?.ContactPhone ?? "",
});
}
#
endregion
#
region
品牌
/// <summary>
/// 获取品牌分页列表
...
...
@@ -3035,11 +3152,102 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
extModel
.
Other
=
HtmlHelper
.
StripHT
(
extModel
.
Other
);
}
if
(
RequestParm
.
UserId
>
0
&&
extModel
.
ID
>
0
)
{
//判断是否已经关注过
var
collectModel
=
carrierModule
.
GetList
(
new
RB_Collect_Extend
{
Status
=
0
,
Type
=
2
,
UserId
=
RequestParm
.
UserId
,
SourceId
=
extModel
.
ID
,
MallBaseId
=
query
.
MallBaseId
,
TenantId
=
query
.
TenantId
}).
FirstOrDefault
();
extModel
.
CollectId
=
collectModel
?.
Id
??
0
;
}
return
ApiResult
.
Success
(
data
:
extModel
);
}
#
endregion
#
region
企业
/// <summary>
/// 获取企业服务分页列表
/// </summary>
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetEnterpriseServicesPageList
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_EnterpriseServices_Extend
()
{
Name
=
parms
.
GetStringValue
(
"BrandName"
),
CategoryId
=
parms
.
GetInt
(
"BrandClassId"
,
0
),
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
buildingCarrierModule
.
GetEnterpriseServicesPageModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
var
result
=
list
?.
Select
(
x
=>
new
{
ID
=
x
.
ServiceId
,
Logo
=
x
?.
BannerList
?.
FirstOrDefault
()
??
""
,
x
.
BannerList
,
BrandName
=
x
.
Name
,
ShopNum
=
x
.
IntentionalFloor
,
//店铺数对应企业服务的楼层数
});
pageModel
.
count
=
Convert
.
ToInt32
(
rowsCount
);
pageModel
.
pageData
=
result
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取企业服务实体
/// </summary>
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetEnterpriseServicesDetails
()
{
var
req
=
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
var
query
=
new
RB_EnterpriseServices_Extend
()
{
ServiceId
=
parms
.
GetInt
(
"ID"
,
0
),
};
query
.
MallBaseId
=
req
.
MallBaseId
;
var
extModel
=
buildingCarrierModule
.
GetEnterpriseServicesInfoModule
(
query
.
ServiceId
,
isVisit
:
true
);
int
CollectId
=
0
;
if
(
RequestParm
.
UserId
>
0
&&
extModel
.
ServiceId
>
0
)
{
//判断是否已经关注过
var
collectModel
=
carrierModule
.
GetList
(
new
RB_Collect_Extend
{
Status
=
0
,
Type
=
3
,
UserId
=
RequestParm
.
UserId
,
SourceId
=
extModel
.
ServiceId
,
MallBaseId
=
query
.
MallBaseId
,
TenantId
=
query
.
TenantId
}).
FirstOrDefault
();
CollectId
=
collectModel
?.
Id
??
0
;
}
var
result
=
new
{
CollectId
=
0
,
ServiceId
=
extModel
?.
ServiceId
??
0
,
Name
=
extModel
?.
Name
??
""
,
Introduction
=
extModel
?.
Introduction
??
""
,
DevIntention
=
extModel
?.
DevIntention
??
""
,
Address
=
extModel
?.
Address
??
""
,
LatAndLon
=
extModel
?.
LatAndLon
??
""
,
OperationTime
=
extModel
?.
OperationTime
??
""
,
CategoryId
=
extModel
?.
CategoryId
??
0
,
CategoryName
=
extModel
?.
CategoryName
??
""
,
Renovation
=
extModel
?.
Renovation
??
""
,
Payment
=
extModel
?.
Payment
??
""
,
HandoverDate
=
extModel
?.
HandoverDate
??
""
,
IntentionalFloor
=
extModel
?.
IntentionalFloor
??
0
,
ElevatorNum
=
extModel
?.
ElevatorNum
??
0
,
PropertyFee
=
extModel
?.
PropertyFee
??
0
,
RentFee
=
extModel
?.
RentFee
??
0
,
BannerList
=
extModel
?.
BannerList
??
new
List
<
string
>(),
};
return
ApiResult
.
Success
(
data
:
extModel
);
}
#
endregion
/// <summary>
/// 修改品牌
...
...
@@ -3279,7 +3487,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
RentFee
=
parms
.
GetDecimal
(
"RentFee"
),
ContactName
=
parms
.
GetStringValue
(
"ContactName"
),
ContactPhone
=
parms
.
GetStringValue
(
"ContactPhone"
),
CompanyId
=
parms
.
GetInt
(
"CompanyId"
),
CompanyId
=
parms
.
GetInt
(
"CompanyId"
),
};
if
(
model
.
CompanyId
<=
0
)
{
...
...
@@ -3778,6 +3986,46 @@ namespace Mall.WebApi.Controllers.TradePavilion
return
msg
==
""
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
msg
);
}
#
endregion
/// <summary>
/// 我的收藏
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetMyCollectEnterprisePage
()
{
var
userInfo
=
AppletUserInfo
;
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Collect_Extend
()
{
Type
=
parms
.
GetInt
(
"Type"
),
UserId
=
userInfo
.
UserId
};
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
query
.
TenantId
=
userInfo
.
TenantId
;
var
list
=
buildingCarrierModule
.
GetMyCollectEnterprisePage
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
pageModel
.
count
=
Convert
.
ToInt32
(
rowsCount
);
pageModel
.
pageData
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
SourceId
,
x
.
Type
,
x
.
SourceName
,
x
.
SourceFullName
,
x
.
BannerList
,
x
.
Address
,
x
.
ProjectId
,
x
.
ProjectName
,
//ProjectType = x.ProjectType.HasValue ? x.ProjectType.GetEnumName() : ""
});
return
ApiResult
.
Success
(
data
:
pageModel
);
}
#
endregion
}
}
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