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
bcca1f84
Commit
bcca1f84
authored
Apr 29, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增商品海报实体类
parent
5755ddcf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
153 additions
and
1 deletion
+153
-1
RB_MiniProgram_GoodPoster.cs
Mall.Model/Entity/User/RB_MiniProgram_GoodPoster.cs
+50
-0
RB_MiniProgram_GoodPoster_Extend.cs
Mall.Model/Extend/User/RB_MiniProgram_GoodPoster_Extend.cs
+17
-0
PosterModule.cs
Mall.Module.User/PosterModule.cs
+44
-1
RB_MiniProgram_GoodPosterRepository.cs
Mall.Repository/User/RB_MiniProgram_GoodPosterRepository.cs
+42
-0
No files found.
Mall.Model/Entity/User/RB_MiniProgram_GoodPoster.cs
0 → 100644
View file @
bcca1f84
using
Mall.Common.AOP
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.User
{
/// <summary>
/// 商品海报实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_MiniProgram_GoodPoster
{
/// <summary>
/// 主键编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 商户Id
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序Id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 是否现在昵称(0-显示,1-不显示)
/// </summary>
public
int
IsShowNick
{
get
;
set
;
}
/// <summary>
/// 是否显示商品描述(0-显示,1-不显示)
/// </summary>
public
int
IsShowGoodsDes
{
get
;
set
;
}
/// <summary>
/// 是否显示商品信息(0-显示,1-不显示)
/// </summary>
public
int
IsShowGoodsInfo
{
get
;
set
;
}
/// <summary>
/// 商品图片数量
/// </summary>
public
int
GoodsImgCount
{
get
;
set
;
}
}
}
Mall.Model/Extend/User/RB_MiniProgram_GoodPoster_Extend.cs
0 → 100644
View file @
bcca1f84
using
Mall.Common.AOP
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.User
;
namespace
Mall.Model.Extend.User
{
/// <summary>
/// 商品海报扩展实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_MiniProgram_GoodPoster_Extend
:
Model
.
Entity
.
User
.
RB_MiniProgram_GoodPoster
{
}
}
Mall.Module.User/PosterModule.cs
View file @
bcca1f84
...
...
@@ -19,6 +19,11 @@ namespace Mall.Module.User
private
RB_MiniProgram_FenXiaoPosterRepository
fenXiaoPosterRepository
=
new
RB_MiniProgram_FenXiaoPosterRepository
();
/// <summary>
/// 商品分销仓储层对象
/// </summary>
private
RB_MiniProgram_GoodPosterRepository
goodPosterRepository
=
new
RB_MiniProgram_GoodPosterRepository
();
/// <summary>
/// 根据查询条件获取分销海报实体
/// </summary>
...
...
@@ -34,7 +39,7 @@ namespace Mall.Module.User
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public
bool
SetFenXiaoPoster
(
RB_MiniProgram_FenXiaoPoster_Extend
extModel
)
public
bool
SetFenXiaoPoster
Module
(
RB_MiniProgram_FenXiaoPoster_Extend
extModel
)
{
bool
flag
=
false
;
if
(
extModel
.
Id
>
0
)
...
...
@@ -65,5 +70,43 @@ namespace Mall.Module.User
}
return
flag
;
}
/// <summary>
/// 根据查询条件获取商品海报实体
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
RB_MiniProgram_GoodPoster_Extend
GetGoodPosterEntityModule
(
RB_MiniProgram_GoodPoster_Extend
query
)
{
return
goodPosterRepository
.
GetEntityExtRepository
(
query
);
}
/// <summary>
/// 添加修改商品海报
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public
bool
SetGoodPosterModule
(
RB_MiniProgram_GoodPoster_Extend
extModel
)
{
bool
flag
=
false
;
if
(
extModel
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_MiniProgram_GoodPoster_Extend
.
IsShowNick
),
extModel
.
IsShowNick
},
{
nameof
(
RB_MiniProgram_GoodPoster_Extend
.
IsShowGoodsDes
),
extModel
.
IsShowGoodsDes
},
{
nameof
(
RB_MiniProgram_GoodPoster_Extend
.
IsShowGoodsInfo
),
extModel
.
IsShowGoodsInfo
},
{
nameof
(
RB_MiniProgram_GoodPoster_Extend
.
GoodsImgCount
),
extModel
.
GoodsImgCount
},
};
flag
=
goodPosterRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_MiniProgram_GoodPoster_Extend
.
Id
),
extModel
.
Id
));
}
else
{
int
NewId
=
goodPosterRepository
.
Insert
(
extModel
);
extModel
.
Id
=
NewId
;
flag
=
NewId
>
0
;
}
return
flag
;
}
}
}
Mall.Repository/User/RB_MiniProgram_GoodPosterRepository.cs
0 → 100644
View file @
bcca1f84
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.User
;
using
Mall.Model.Extend.User
;
using
System.Linq
;
namespace
Mall.Repository.User
{
/// <summary>
/// 商品海报仓储层
/// </summary>
public
class
RB_MiniProgram_GoodPosterRepository
:
RepositoryBase
<
RB_MiniProgram_GoodPoster
>
{
/// <summary>
/// 根据查询条件获取商品海报实体
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
RB_MiniProgram_GoodPoster_Extend
GetEntityExtRepository
(
RB_MiniProgram_GoodPoster_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
" SELECT * FROM RB_MiniProgram_GoodPoster WHERE 1=1 "
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND TenantId={0} "
,
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND MallBaseId={0} "
,
query
.
MallBaseId
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND Id={0} "
,
query
.
Id
);
}
}
return
Get
<
RB_MiniProgram_GoodPoster_Extend
>(
builder
.
ToString
()).
FirstOrDefault
();
}
}
}
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