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
Expand all
Hide 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
);
}
}
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
This diff is collapsed.
Click to expand it.
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