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
43df8075
Commit
43df8075
authored
Feb 05, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增实体类
parent
8c5049a6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
220 additions
and
0 deletions
+220
-0
RB_Commerce_Consult.cs
Mall.Model/Entity/TradePavilion/RB_Commerce_Consult.cs
+59
-0
RB_Commerce_Consult_Extend.cs
....Model/Extend/TradePavilion/RB_Commerce_Consult_Extend.cs
+14
-0
CommerceConsultModule.cs
Mall.Module.TradePavilion/CommerceConsultModule.cs
+87
-0
RB_Commerce_ConsultRepository.cs
...Repository/TradePavilion/RB_Commerce_ConsultRepository.cs
+60
-0
No files found.
Mall.Model/Entity/TradePavilion/RB_Commerce_Consult.cs
0 → 100644
View file @
43df8075
using
Mall.Common.Enum
;
using
System
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.TradePavilion
{
/// <summary>
/// 商会活动报名实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Commerce_Consult
{
/// <summary>
/// 主键编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 活动编号
/// </summary>
public
int
ActivityId
{
get
;
set
;
}
/// <summary>
/// 用户编号
/// </summary>
public
int
UserId
{
get
;
set
;
}
/// <summary>
/// 联系人
/// </summary>
public
string
LinkMan
{
get
;
set
;
}
/// <summary>
/// 联系电话
/// </summary>
public
string
LinkTel
{
get
;
set
;
}
/// <summary>
/// 商户号id
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 报名时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
}
}
Mall.Model/Extend/TradePavilion/RB_Commerce_Consult_Extend.cs
0 → 100644
View file @
43df8075
using
Mall.Model.Entity.TradePavilion
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Extend.TradePavilion
{
/// <summary>
/// 商会活动报名扩展实体类
/// </summary>
public
class
RB_Commerce_Consult_Extend
:
RB_Commerce_Consult
{
}
}
Mall.Module.TradePavilion/CommerceConsultModule.cs
0 → 100644
View file @
43df8075
using
Mall.Model.Extend.TradePavilion
;
using
Mall.Repository.TradePavilion
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Mall.Module.TradePavilion
{
/// <summary>
/// 商会活动报名处理类
/// </summary>
public
class
CommerceConsultModule
{
/// <summary>
/// 商会活动报名仓储层对象
/// </summary>
private
readonly
RB_Commerce_ConsultRepository
consultRepository
=
new
RB_Commerce_ConsultRepository
();
/// <summary>
/// 获取商会活动报名分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Commerce_Consult_Extend
>
GetCommerceConsultPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Commerce_Consult_Extend
query
)
{
return
consultRepository
.
GetCommerceConsultPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
}
/// <summary>
/// 新增修改商会活动报名
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetCommerceConsultModule
(
RB_Commerce_Consult_Extend
model
)
{
bool
flag
;
if
(
model
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Commerce_Consult_Extend
.
ActivityId
),
model
.
ActivityId
},
{
nameof
(
RB_Commerce_Consult_Extend
.
UserId
),
model
.
UserId
},
{
nameof
(
RB_Commerce_Consult_Extend
.
LinkMan
),
model
.
LinkMan
},
{
nameof
(
RB_Commerce_Consult_Extend
.
LinkTel
),
model
.
LinkTel
},
};
flag
=
consultRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Commerce_Consult_Extend
.
Id
),
model
.
Id
));
}
else
{
var
newId
=
consultRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
flag
=
newId
>
0
;
}
return
flag
;
}
/// <summary>
/// 根据编号获取商会活动报名实体
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
RB_Commerce_Consult_Extend
GetCommerceConsultModule
(
object
Id
)
{
return
consultRepository
.
GetEntity
<
RB_Commerce_Consult_Extend
>(
Id
);
}
/// <summary>
/// 更新商会活动报名状态
/// </summary>
/// <param name="Id"></param>
/// <param name="Status"></param>
/// <returns></returns>
public
bool
RemoveCommerceConsultModule
(
int
Id
,
int
Status
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Commerce_Consult_Extend
.
Status
),
Status
},
};
bool
flag
=
consultRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Commerce_Consult_Extend
.
Id
),
Id
));
return
flag
;
}
}
}
Mall.Repository/TradePavilion/RB_Commerce_ConsultRepository.cs
0 → 100644
View file @
43df8075
using
Mall.Common.Enum
;
using
Mall.Model.Entity.TradePavilion
;
using
Mall.Model.Extend.TradePavilion
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Mall.Repository.TradePavilion
{
/// <summary>
/// 商会活动报名仓储层
/// </summary>
public
class
RB_Commerce_ConsultRepository
:
BaseRepository
<
RB_Commerce_Consult
>
{
/// <summary>
/// 获取商会活动报名分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Commerce_Consult_Extend
>
GetCommerceConsultPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Commerce_Consult_Extend
query
)
{
rowsCount
=
0
;
DynamicParameters
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM RB_Commerce_Consult
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Commerce_Consult_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
==
null
)
{
return
new
List
<
RB_Commerce_Consult_Extend
>();
}
else
{
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Commerce_Consult_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Commerce_Consult_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
LinkMan
))
{
builder
.
AppendFormat
(
" AND {0} LIKE @Name "
,
nameof
(
RB_Commerce_Consult_Extend
.
LinkMan
));
parameters
.
Add
(
"Name"
,
"%"
+
query
.
LinkMan
.
Trim
()
+
"%"
);
}
}
return
GetPage
<
RB_Commerce_Consult_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
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