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
8f072ff4
Commit
8f072ff4
authored
May 14, 2026
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
08163c0a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
113 additions
and
0 deletions
+113
-0
TradeIndexQuery.cs
Mall.Model/Query/TradeIndexQuery.cs
+66
-0
TradeIndexRepository.cs
Mall.Repository/TradePavilion/TradeIndexRepository.cs
+47
-0
No files found.
Mall.Model/Query/TradeIndexQuery.cs
0 → 100644
View file @
8f072ff4
using
Mall.Common.Enum.TradePavilion
;
namespace
Mall.Model.Query
{
/// <summary>
/// 首店首页数据查询条件
/// </summary>
public
class
TradeIndexQuery
{
/// <summary>
/// 查询类型
/// </summary>
public
int
qType
{
get
;
set
;
}
/// <summary>
/// 小程序Id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
}
/// <summary>
/// 首店首页数据结果
/// </summary>
public
class
TradeIndexResult
{
/// <summary>
/// 编号
/// </summary>
public
int
DataId
{
get
;
set
;
}
/// <summary>
/// 名称
/// </summary>
public
string
DataName
{
get
;
set
;
}
/// <summary>
/// 品牌全称
/// </summary>
public
string
FullBrandName
{
get
;
set
;
}
/// <summary>
/// 载体项目地址
/// </summary>
public
string
Address
{
get
;
set
;
}
/// <summary>
/// 载体项目区域
/// </summary>
public
ProjectTypeEnum
?
ProjectType
{
get
;
set
;
}
/// <summary>
/// 区域名称
/// </summary>
public
string
ProjectTypeName
{
get
;
set
;
}
/// <summary>
/// 类型
/// </summary>
public
BrandCategoryEnum
DataType
{
get
;
set
;
}
/// <summary>
// 封面图
/// </summary>
public
string
CoverImg
{
get
;
set
;
}
}
}
Mall.Repository/TradePavilion/TradeIndexRepository.cs
0 → 100644
View file @
8f072ff4
using
Mall.Model.Entity.TradePavilion
;
using
Mall.Model.Query
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Mall.Repository.TradePavilion
{
/// <summary>
/// 首页推荐数据统计
/// </summary>
public
class
TradeIndexRepository
:
BaseRepository
<
RB_Brand
>
{
/// <summary>
/// 获取首页推荐数据
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
TradeIndexResult
>
GetTradeIndexPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
TradeIndexQuery
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM
(
SELECT ID AS DataId,CarrierName AS DataName,1 AS DataType,Logo AS CoverImg,RecommendDate,'' AS FullBrandName,ProjectType,Address
FROM rb_carrier WHERE Status=0 AND IsRecommend=1 AND MallBaseId={0}
UNION ALL
SELECT BuildId AS DataId,Name AS DataName,2 AS DataType,Banner AS CoverImg,RecommendDate,'' AS FullBrandName, 0 AS ProjectType,'' AS Address
FROM rb_building WHERE Status=0 AND IsRecommend=1 AND MallBaseId={0}
UNION ALL
SELECT ID AS DataId,BrandName AS DataName,3 AS DataType,Logo AS CoverImg,RecommendDate,FullBrandName,0 AS ProjectType,'' AS Address
FROM rb_brand WHERE Status=0 AND IsRecommend=1 AND MallBaseId={0}
UNION ALL
SELECT ServiceId AS DataId,Name AS DataName,4 AS DataType,Banner AS CoverImg,RecommendDate,'' AS FullBrandName,0 AS ProjectType,'' AS Address
FROM rb_enterpriseservices WHERE Status=0 AND IsRecommend=1 AND MallBaseId={0}
) AS A WHERE 1=1
"
,
query
.
MallBaseId
);
builder
.
AppendFormat
(
" ORDER BY A.RecommendDate DESC "
);
return
base
.
GetPage
<
TradeIndexResult
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
}
}
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