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
bd4cac9e
Commit
bd4cac9e
authored
Dec 11, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
53a2e7e3
1d5123a1
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
504 additions
and
24 deletions
+504
-24
RB_BuildingApplyFor.cs
Mall.Model/Entity/TradePavilion/RB_BuildingApplyFor.cs
+2
-2
RB_Collect.cs
Mall.Model/Entity/TradePavilion/RB_Collect.cs
+1
-1
RB_EnterpriseServicesApply.cs
....Model/Entity/TradePavilion/RB_EnterpriseServicesApply.cs
+2
-2
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
+254
-7
No files found.
Mall.Model/Entity/TradePavilion/RB_BuildingApplyFor.cs
View file @
bd4cac9e
...
@@ -59,12 +59,12 @@ namespace Mall.Model.Entity.TradePavilion
...
@@ -59,12 +59,12 @@ namespace Mall.Model.Entity.TradePavilion
/// <summary>
/// <summary>
/// 楼层数
/// 楼层数
/// </summary>
/// </summary>
public
int
FloorNum
{
get
;
set
;
}
public
string
FloorNum
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 电梯数
/// 电梯数
/// </summary>
/// </summary>
public
int
ElevatorNum
{
get
;
set
;
}
public
string
ElevatorNum
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 层高
/// 层高
...
...
Mall.Model/Entity/TradePavilion/RB_Collect.cs
View file @
bd4cac9e
...
@@ -20,7 +20,7 @@ namespace Mall.Model.Entity.TradePavilion
...
@@ -20,7 +20,7 @@ namespace Mall.Model.Entity.TradePavilion
public
int
Id
{
get
;
set
;
}
public
int
Id
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 类型 1载体 2品牌
/// 类型 1载体 2品牌
,3-企业,4-楼宇
/// </summary>
/// </summary>
public
int
Type
{
get
;
set
;
}
public
int
Type
{
get
;
set
;
}
...
...
Mall.Model/Entity/TradePavilion/RB_EnterpriseServicesApply.cs
View file @
bd4cac9e
...
@@ -74,12 +74,12 @@ namespace Mall.Model.Entity.TradePavilion
...
@@ -74,12 +74,12 @@ namespace Mall.Model.Entity.TradePavilion
/// <summary>
/// <summary>
/// 意向楼层
/// 意向楼层
/// </summary>
/// </summary>
public
int
IntentionalFloor
{
get
;
set
;
}
public
string
IntentionalFloor
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 电梯数
/// 电梯数
/// </summary>
/// </summary>
public
int
ElevatorNum
{
get
;
set
;
}
public
string
ElevatorNum
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 物业费(元/㎡)
/// 物业费(元/㎡)
...
...
Mall.Model/Extend/TradePavilion/RB_Brand_Enterprise_Extend.cs
View file @
bd4cac9e
...
@@ -30,5 +30,10 @@ namespace Mall.Model.Extend.TradePavilion
...
@@ -30,5 +30,10 @@ namespace Mall.Model.Extend.TradePavilion
/// 根据ids查询
/// 根据ids查询
/// </summary>
/// </summary>
public
string
SelectIds
{
get
;
set
;
}
public
string
SelectIds
{
get
;
set
;
}
/// <summary>
/// 收藏id
/// </summary>
public
int
CollectId
{
get
;
set
;
}
}
}
}
}
Mall.Model/Extend/TradePavilion/RB_Building_Extend.cs
View file @
bd4cac9e
using
Mall.Model.Entity.TradePavilion
;
using
Mall.Model.Entity.TradePavilion
;
using
System.Collections.Generic
;
namespace
Mall.Model.Extend.TradePavilion
namespace
Mall.Model.Extend.TradePavilion
{
{
...
@@ -11,5 +12,15 @@ namespace Mall.Model.Extend.TradePavilion
...
@@ -11,5 +12,15 @@ namespace Mall.Model.Extend.TradePavilion
/// 分类名称
/// 分类名称
/// </summary>
/// </summary>
public
string
CategoryName
{
get
;
set
;
}
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 @
bd4cac9e
...
@@ -27,8 +27,16 @@ namespace Mall.Model.Extend.TradePavilion
...
@@ -27,8 +27,16 @@ namespace Mall.Model.Extend.TradePavilion
/// </summary>
/// </summary>
public
string
Address
{
get
;
set
;
}
public
string
Address
{
get
;
set
;
}
/// <summary>
/// 品牌名称
/// </summary>
public
string
ProjectName
{
get
;
set
;
}
/// <summary>
/// 品牌ID
/// </summary>
public
int
ProjectId
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 项目类型
/// 项目类型
/// </summary>
/// </summary>
...
...
Mall.Model/Extend/TradePavilion/RB_EnterpriseServices_Extend.cs
View file @
bd4cac9e
using
Mall.Model.Entity.TradePavilion
;
using
Mall.Model.Entity.TradePavilion
;
using
System.Collections.Generic
;
namespace
Mall.Model.Extend.TradePavilion
namespace
Mall.Model.Extend.TradePavilion
{
{
/// <summary>
/// <summary>
/// 企业服务扩展实体类
/// 企业服务扩展实体类
/// </summary>
/// </summary>
public
class
RB_EnterpriseServices_Extend
:
RB_EnterpriseServices
public
class
RB_EnterpriseServices_Extend
:
RB_EnterpriseServices
{
{
/// <summary>
/// <summary>
/// 分类名称
/// 分类名称
/// </summary>
/// </summary>
public
string
CategoryName
{
get
;
set
;
}
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 @
bd4cac9e
...
@@ -243,7 +243,7 @@ namespace Mall.Module.TradePavilion
...
@@ -243,7 +243,7 @@ namespace Mall.Module.TradePavilion
}
}
if
((
extModel
?.
ID
??
0
)
>
0
&&
isVisit
)
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
;
return
extModel
;
}
}
...
@@ -340,15 +340,16 @@ namespace Mall.Module.TradePavilion
...
@@ -340,15 +340,16 @@ namespace Mall.Module.TradePavilion
if
(
extModel
!=
null
&&
extModel
.
CategoryId
>
0
)
if
(
extModel
!=
null
&&
extModel
.
CategoryId
>
0
)
{
{
extModel
.
CategoryName
=
brandClassRepository
.
GetEntity
(
extModel
.
CategoryId
)?.
ClassName
??
""
;
extModel
.
CategoryName
=
brandClassRepository
.
GetEntity
(
extModel
.
CategoryId
)?.
ClassName
??
""
;
}
extModel
.
BannerList
=
new
List
<
string
>();
extModel
.
BannerList
=
new
List
<
string
>();
if
(!
string
.
IsNullOrWhiteSpace
(
extModel
.
Banner
))
if
(!
string
.
IsNullOrWhiteSpace
(
extModel
.
Banner
))
{
{
extModel
.
BannerList
=
Newtonsoft
.
Json
.
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
extModel
.
Banner
);
extModel
.
BannerList
=
Newtonsoft
.
Json
.
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
extModel
.
Banner
);
}
}
}
if
((
extModel
?.
ID
??
0
)
>
0
&&
isVisit
)
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
;
return
extModel
;
}
}
...
@@ -382,7 +383,20 @@ namespace Mall.Module.TradePavilion
...
@@ -382,7 +383,20 @@ namespace Mall.Module.TradePavilion
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Building_Extend
>
GetBuildingPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Building_Extend
query
)
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>
/// <summary>
...
@@ -439,16 +453,27 @@ namespace Mall.Module.TradePavilion
...
@@ -439,16 +453,27 @@ namespace Mall.Module.TradePavilion
/// </summary>
/// </summary>
/// <param name="BuildId"></param>
/// <param name="BuildId"></param>
/// <returns></returns>
/// <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
);
var
extModel
=
buildingRepository
.
GetEntity
<
RB_Building_Extend
>(
BuildId
);
if
(
extModel
!=
null
&&
extModel
.
CategoryId
>
0
)
if
(
extModel
!=
null
&&
extModel
.
CategoryId
>
0
)
{
{
extModel
.
CategoryName
=
brandClassRepository
.
GetEntity
(
extModel
.
CategoryId
)?.
ClassName
??
""
;
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
;
return
extModel
;
}
}
/// <summary>
/// <summary>
/// 根据编号删除获取楼宇
/// 根据编号删除获取楼宇
/// </summary>
/// </summary>
...
@@ -479,7 +504,20 @@ namespace Mall.Module.TradePavilion
...
@@ -479,7 +504,20 @@ namespace Mall.Module.TradePavilion
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_EnterpriseServices_Extend
>
GetEnterpriseServicesPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_EnterpriseServices_Extend
query
)
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>
/// <summary>
...
@@ -530,13 +568,22 @@ namespace Mall.Module.TradePavilion
...
@@ -530,13 +568,22 @@ namespace Mall.Module.TradePavilion
/// </summary>
/// </summary>
/// <param name="ServiceId"></param>
/// <param name="ServiceId"></param>
/// <returns></returns>
/// <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
);
var
extModel
=
enterpriseServicesRepository
.
GetEntity
<
RB_EnterpriseServices_Extend
>(
ServiceId
);
if
(
extModel
!=
null
&&
extModel
.
CategoryId
>
0
)
if
(
extModel
!=
null
&&
extModel
.
CategoryId
>
0
)
{
{
extModel
.
CategoryName
=
brandClassRepository
.
GetEntity
(
extModel
.
CategoryId
)?.
ClassName
??
""
;
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
;
return
extModel
;
}
}
...
...
Mall.Module.TradePavilion/BuildingCarrierModule_V2.cs
View file @
bd4cac9e
...
@@ -58,6 +58,10 @@ namespace Mall.Module.TradePavilion
...
@@ -58,6 +58,10 @@ namespace Mall.Module.TradePavilion
private
readonly
RB_BuildingApplyForRepository
buildingApplyForRepository
=
new
RB_BuildingApplyForRepository
();
private
readonly
RB_BuildingApplyForRepository
buildingApplyForRepository
=
new
RB_BuildingApplyForRepository
();
/// <summary>
/// 收藏仓储层对象
/// </summary>
private
readonly
RB_CollectRepository
collectRepository
=
new
RB_CollectRepository
();
#
region
品牌
/
企业
#
region
品牌
/
企业
/// <summary>
/// <summary>
/// 品牌/企业申请信息列表
/// 品牌/企业申请信息列表
...
@@ -1590,5 +1594,137 @@ namespace Mall.Module.TradePavilion
...
@@ -1590,5 +1594,137 @@ namespace Mall.Module.TradePavilion
return
list
;
return
list
;
}
}
#
endregion
#
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 @
bd4cac9e
...
@@ -1288,6 +1288,11 @@ namespace Mall.Module.TradePavilion
...
@@ -1288,6 +1288,11 @@ namespace Mall.Module.TradePavilion
}
}
return
flag
;
return
flag
;
}
}
#
endregion
#
endregion
...
...
Mall.Repository/TradePavilion/RB_BuildingRepository.cs
View file @
bd4cac9e
...
@@ -89,6 +89,10 @@ WHERE 1=1
...
@@ -89,6 +89,10 @@ WHERE 1=1
{
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Building_Extend
.
MallBaseId
),
query
.
MallBaseId
);
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
)
if
(
query
.
CategoryId
>
0
)
{
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Building_Extend
.
CategoryId
),
query
.
CategoryId
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Building_Extend
.
CategoryId
),
query
.
CategoryId
);
...
...
Mall.Repository/TradePavilion/RB_EnterpriseServicesRepository.cs
View file @
bd4cac9e
...
@@ -46,6 +46,8 @@ WHERE 1=1
...
@@ -46,6 +46,8 @@ WHERE 1=1
{
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_EnterpriseServices_Extend
.
CategoryId
),
query
.
CategoryId
);
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_EnterpriseServices_Extend
.
CategoryId
),
query
.
CategoryId
);
}
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Name
))
if
(!
string
.
IsNullOrEmpty
(
query
.
Name
))
{
{
builder
.
AppendFormat
(
@" AND A.{0} LIKE @Name "
,
nameof
(
RB_EnterpriseServices_Extend
.
Name
));
builder
.
AppendFormat
(
@" AND A.{0} LIKE @Name "
,
nameof
(
RB_EnterpriseServices_Extend
.
Name
));
...
@@ -82,6 +84,10 @@ WHERE 1=1
...
@@ -82,6 +84,10 @@ WHERE 1=1
{
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_EnterpriseServices_Extend
.
MallBaseId
),
query
.
MallBaseId
);
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
)
if
(
query
.
CategoryId
>
0
)
{
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_EnterpriseServices_Extend
.
CategoryId
),
query
.
CategoryId
);
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_EnterpriseServices_Extend
.
CategoryId
),
query
.
CategoryId
);
...
...
Mall.WebApi/Controllers/TradePavilion/AppletTradeController.cs
View file @
bd4cac9e
...
@@ -15,7 +15,9 @@ using Microsoft.AspNetCore.Cors;
...
@@ -15,7 +15,9 @@ using Microsoft.AspNetCore.Cors;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.AspNetCore.Mvc
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
using
Newtonsoft.Json.Linq
;
using
Org.BouncyCastle.Ocsp
;
using
RabbitMQ.Client.Framing.Impl
;
using
RabbitMQ.Client.Framing.Impl
;
using
Senparc.Weixin.Annotations
;
using
System
;
using
System
;
using
System.Collections
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -2913,8 +2915,15 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -2913,8 +2915,15 @@ namespace Mall.WebApi.Controllers.TradePavilion
TenantId
=
RequestParm
.
TenantId
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
return
ApiResult
.
Success
(
data
:
new
{
{
CollectId
,
extModel
.
ID
,
extModel
.
ID
,
extModel
.
CarrierName
,
extModel
.
CarrierName
,
extModel
.
Logo
,
extModel
.
Logo
,
...
@@ -2958,6 +2967,114 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -2958,6 +2967,114 @@ namespace Mall.WebApi.Controllers.TradePavilion
#
endregion
#
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
??
""
,
ElevatorNum
=
extModel
?.
ElevatorNum
??
""
,
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
品牌
#
region
品牌
/// <summary>
/// <summary>
/// 获取品牌分页列表
/// 获取品牌分页列表
...
@@ -3035,11 +3152,102 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -3035,11 +3152,102 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
{
extModel
.
Other
=
HtmlHelper
.
StripHT
(
extModel
.
Other
);
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
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
}
#
endregion
#
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
??
""
,
ElevatorNum
=
extModel
?.
ElevatorNum
??
""
,
PropertyFee
=
extModel
?.
PropertyFee
??
0
,
RentFee
=
extModel
?.
RentFee
??
0
,
BannerList
=
extModel
?.
BannerList
??
new
List
<
string
>(),
};
return
ApiResult
.
Success
(
data
:
extModel
);
}
#
endregion
/// <summary>
/// <summary>
/// 修改品牌
/// 修改品牌
...
@@ -3273,13 +3481,13 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -3273,13 +3481,13 @@ namespace Mall.WebApi.Controllers.TradePavilion
Renovation
=
parms
.
GetStringValue
(
"Renovation"
),
Renovation
=
parms
.
GetStringValue
(
"Renovation"
),
Payment
=
parms
.
GetStringValue
(
"Payment"
),
Payment
=
parms
.
GetStringValue
(
"Payment"
),
HandoverDate
=
parms
.
GetStringValue
(
"HandoverDate"
),
HandoverDate
=
parms
.
GetStringValue
(
"HandoverDate"
),
IntentionalFloor
=
parms
.
Get
Int
(
"IntentionalFloor"
),
IntentionalFloor
=
parms
.
Get
StringValue
(
"IntentionalFloor"
),
ElevatorNum
=
parms
.
Get
Int
(
"ElevatorNum"
),
ElevatorNum
=
parms
.
Get
StringValue
(
"ElevatorNum"
),
PropertyFee
=
parms
.
GetDecimal
(
"PropertyFee"
),
PropertyFee
=
parms
.
GetDecimal
(
"PropertyFee"
),
RentFee
=
parms
.
GetDecimal
(
"RentFee"
),
RentFee
=
parms
.
GetDecimal
(
"RentFee"
),
ContactName
=
parms
.
GetStringValue
(
"ContactName"
),
ContactName
=
parms
.
GetStringValue
(
"ContactName"
),
ContactPhone
=
parms
.
GetStringValue
(
"ContactPhone"
),
ContactPhone
=
parms
.
GetStringValue
(
"ContactPhone"
),
CompanyId
=
parms
.
GetInt
(
"CompanyId"
),
CompanyId
=
parms
.
GetInt
(
"CompanyId"
),
};
};
if
(
model
.
CompanyId
<=
0
)
if
(
model
.
CompanyId
<=
0
)
{
{
...
@@ -3521,8 +3729,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -3521,8 +3729,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
CategoryId
=
parms
.
GetInt
(
"CategoryId"
),
CategoryId
=
parms
.
GetInt
(
"CategoryId"
),
Areas
=
parms
.
GetStringValue
(
"Areas"
),
Areas
=
parms
.
GetStringValue
(
"Areas"
),
BuildingNum
=
parms
.
GetStringValue
(
"BuildingNum"
),
BuildingNum
=
parms
.
GetStringValue
(
"BuildingNum"
),
FloorNum
=
parms
.
Get
Int
(
"FloorNum"
),
FloorNum
=
parms
.
Get
StringValue
(
"FloorNum"
),
ElevatorNum
=
parms
.
Get
Int
(
"ElevatorNum"
),
ElevatorNum
=
parms
.
Get
StringValue
(
"ElevatorNum"
),
FloorHeight
=
parms
.
GetDecimal
(
"FloorHeight"
),
FloorHeight
=
parms
.
GetDecimal
(
"FloorHeight"
),
Developers
=
parms
.
GetStringValue
(
"Developers"
),
Developers
=
parms
.
GetStringValue
(
"Developers"
),
PropertyComp
=
parms
.
GetStringValue
(
"PropertyComp"
),
PropertyComp
=
parms
.
GetStringValue
(
"PropertyComp"
),
...
@@ -3778,6 +3986,45 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -3778,6 +3986,45 @@ namespace Mall.WebApi.Controllers.TradePavilion
return
msg
==
""
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
msg
);
return
msg
==
""
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
msg
);
}
}
#
endregion
#
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
#
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