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
08762fda
Commit
08762fda
authored
May 19, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
ca37b02d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
679 additions
and
5 deletions
+679
-5
RB_Mall_Magic.cs
Mall.Model/Entity/User/RB_Mall_Magic.cs
+88
-0
RB_Mall_Nav.cs
Mall.Model/Entity/User/RB_Mall_Nav.cs
+88
-0
RB_Mall_Magic_Extend.cs
Mall.Model/Extend/User/RB_Mall_Magic_Extend.cs
+18
-0
RB_Mall_Nav_Extend.cs
Mall.Model/Extend/User/RB_Mall_Nav_Extend.cs
+17
-0
MiniProgramModule.cs
Mall.Module.User/MiniProgramModule.cs
+178
-5
RB_Mall_MagicRepository.cs
Mall.Repository/User/RB_Mall_MagicRepository.cs
+74
-0
RB_Mall_NavRepository.cs
Mall.Repository/User/RB_Mall_NavRepository.cs
+74
-0
TenantController.cs
Mall.WebApi/Controllers/User/TenantController.cs
+142
-0
No files found.
Mall.Model/Entity/User/RB_Mall_Magic.cs
0 → 100644
View file @
08762fda
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.User
{
/// <summary>
/// 图片魔方表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Mall_Magic
{
/// <summary>
/// 魔方Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 魔方名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 魔方样式
/// </summary>
public
int
?
Style
{
get
;
set
;
}
/// <summary>
/// 魔方数据[JSON]格式
/// </summary>
public
string
MagicData
{
get
;
set
;
}
/// <summary>
/// 商户号Id
/// </summary>
public
int
?
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序Id
/// </summary>
public
int
?
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
?
CreateDate
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
?
Status
{
get
;
set
;
}
}
}
\ No newline at end of file
Mall.Model/Entity/User/RB_Mall_Nav.cs
0 → 100644
View file @
08762fda
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.User
{
/// <summary>
/// 轮播图表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Mall_Nav
{
/// <summary>
/// 导航编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 标题
/// </summary>
public
string
NavName
{
get
;
set
;
}
/// <summary>
/// 链接
/// </summary>
public
string
NavLink
{
get
;
set
;
}
/// <summary>
/// 图片
/// </summary>
public
string
NavImg
{
get
;
set
;
}
/// <summary>
/// 商户号Id
/// </summary>
public
int
?
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序Id
/// </summary>
public
int
?
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
?
CreateDate
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
?
Status
{
get
;
set
;
}
}
}
Mall.Model/Extend/User/RB_Mall_Magic_Extend.cs
0 → 100644
View file @
08762fda
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.User
{
/// <summary>
/// 图片魔方表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Mall_Magic_Extend
:
Model
.
Entity
.
User
.
RB_Mall_Magic
{
}
}
\ No newline at end of file
Mall.Model/Extend/User/RB_Mall_Nav_Extend.cs
0 → 100644
View file @
08762fda
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.User
{
/// <summary>
/// 轮播图表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Mall_Nav_Extend
:
Model
.
Entity
.
User
.
RB_Mall_Nav
{
}
}
\ No newline at end of file
Mall.Module.User/MiniProgramModule.cs
View file @
08762fda
...
@@ -10,6 +10,7 @@ using Newtonsoft.Json.Linq;
...
@@ -10,6 +10,7 @@ using Newtonsoft.Json.Linq;
using
Newtonsoft.Json
;
using
Newtonsoft.Json
;
using
Mall.Common.Plugin
;
using
Mall.Common.Plugin
;
using
NPOI.SS.Formula.Functions
;
using
NPOI.SS.Formula.Functions
;
using
Mall.Repository.User
;
namespace
Mall.Module.User
namespace
Mall.Module.User
{
{
...
@@ -46,6 +47,183 @@ namespace Mall.Module.User
...
@@ -46,6 +47,183 @@ namespace Mall.Module.User
/// </summary>
/// </summary>
private
Repository
.
AppletWeChat
.
RB_Live_HouseRepository
liveHouseRepository
=
new
Repository
.
AppletWeChat
.
RB_Live_HouseRepository
();
private
Repository
.
AppletWeChat
.
RB_Live_HouseRepository
liveHouseRepository
=
new
Repository
.
AppletWeChat
.
RB_Live_HouseRepository
();
/// <summary>
/// 轮播图表仓储层对象
/// </summary>
private
RB_Mall_NavRepository
navRepository
=
new
RB_Mall_NavRepository
();
/// <summary>
/// 图片魔方表仓储层对象
/// </summary>
private
RB_Mall_MagicRepository
magicRepository
=
new
RB_Mall_MagicRepository
();
#
region
轮播图管理
/// <summary>
/// 轮播图分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Mall_Nav_Extend
>
GetMallNavPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Mall_Nav_Extend
query
)
{
return
navRepository
.
GetMallNavPageListRepository
(
pageIndex
,
pageSize
,
out
rowCount
,
query
);
}
/// <summary>
/// 获取轮播图列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Mall_Nav_Extend
>
GetMallNavListModule
(
RB_Mall_Nav_Extend
query
)
{
return
navRepository
.
GetMallNavListRepository
(
query
);
}
/// <summary>
/// 添加修改轮播图
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public
bool
SetMallNavModule
(
RB_Mall_Nav_Extend
extModel
)
{
bool
flag
=
false
;
if
(
extModel
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Mall_Nav_Extend
.
NavName
),
extModel
.
NavName
.
Trim
()},
{
nameof
(
RB_Mall_Nav_Extend
.
NavLink
),
extModel
.
NavLink
},
{
nameof
(
RB_Mall_Nav_Extend
.
NavImg
),
extModel
.
NavImg
},
};
flag
=
navRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Mall_Nav_Extend
.
Id
),
extModel
.
Id
));
}
else
{
int
NewId
=
navRepository
.
Insert
(
extModel
);
extModel
.
Id
=
NewId
;
flag
=
NewId
>
0
;
}
return
flag
;
}
/// <summary>
/// 获取轮播图实体
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public
RB_Mall_Nav_Extend
GetMallNavModule
(
object
Id
)
{
var
extModel
=
navRepository
.
GetEntity
<
RB_Mall_Nav_Extend
>(
Id
);
if
(
extModel
==
null
)
{
extModel
=
new
RB_Mall_Nav_Extend
();
}
return
extModel
;
}
/// <summary>
/// 删除轮播图
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
bool
RemoveMallNavModule
(
object
Id
)
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Mall_Nav_Extend
.
Status
),
1
},
};
flag
=
navRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Mall_Nav_Extend
.
Id
),
Id
));
return
flag
;
}
#
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_Mall_Magic_Extend
>
GetMallMagicPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Mall_Magic_Extend
query
)
{
return
magicRepository
.
GetMallMagicPageListRepository
(
pageIndex
,
pageSize
,
out
rowCount
,
query
);
}
/// <summary>
/// 获取图片魔方列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Mall_Magic_Extend
>
GetMallMagicListModule
(
RB_Mall_Magic_Extend
query
)
{
return
magicRepository
.
GetMallMagicListRepository
(
query
);
}
/// <summary>
/// 添加修改图片魔方
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public
bool
SetMallMagicModule
(
RB_Mall_Magic_Extend
extModel
)
{
bool
flag
=
false
;
if
(
extModel
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Mall_Magic_Extend
.
Name
),
extModel
.
Name
.
Trim
()},
{
nameof
(
RB_Mall_Magic_Extend
.
Style
),
extModel
.
Style
},
{
nameof
(
RB_Mall_Magic_Extend
.
MagicData
),
extModel
.
MagicData
},
};
flag
=
magicRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Mall_Magic_Extend
.
Id
),
extModel
.
Id
));
}
else
{
int
NewId
=
magicRepository
.
Insert
(
extModel
);
extModel
.
Id
=
NewId
;
flag
=
NewId
>
0
;
}
return
flag
;
}
/// <summary>
/// 获取图片魔方实体
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public
RB_Mall_Magic_Extend
GetMallMagicModule
(
object
Id
)
{
var
extModel
=
magicRepository
.
GetEntity
<
RB_Mall_Magic_Extend
>(
Id
);
if
(
extModel
==
null
)
{
extModel
=
new
RB_Mall_Magic_Extend
();
}
return
extModel
;
}
/// <summary>
/// 删除图片魔方
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
bool
RemoveMallMagicModule
(
object
Id
)
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Mall_Magic_Extend
.
Status
),
1
},
};
flag
=
magicRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Mall_Magic_Extend
.
Id
),
Id
));
return
flag
;
}
#
endregion
#
region
小程序
#
region
小程序
/// <summary>
/// <summary>
...
@@ -507,7 +685,6 @@ namespace Mall.Module.User
...
@@ -507,7 +685,6 @@ namespace Mall.Module.User
#
endregion
#
endregion
#
region
微信小程序基础配置
#
region
微信小程序基础配置
...
@@ -572,9 +749,6 @@ namespace Mall.Module.User
...
@@ -572,9 +749,6 @@ namespace Mall.Module.User
#
endregion
#
endregion
#
region
发送小程序订阅信息
#
region
发送小程序订阅信息
...
@@ -1522,7 +1696,6 @@ namespace Mall.Module.User
...
@@ -1522,7 +1696,6 @@ namespace Mall.Module.User
#
endregion
#
endregion
#
region
小程序直播房间信息
#
region
小程序直播房间信息
...
...
Mall.Repository/User/RB_Mall_MagicRepository.cs
0 → 100644
View file @
08762fda
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_Mall_MagicRepository
:
RepositoryBase
<
RB_Mall_Magic
>
{
/// <summary>
/// 图片魔方分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Mall_Magic_Extend
>
GetMallMagicPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Mall_Magic_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT * FROM RB_Mall_Magic WHERE 1=1 AND Status=0 "
);
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Mall_Magic_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Mall_Magic_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Mall_Magic_Extend
.
Id
),
query
.
Id
);
}
if
(
query
.
Name
!=
null
&&
!
string
.
IsNullOrEmpty
(
query
.
Name
.
Trim
()))
{
builder
.
AppendFormat
(
" AND {0} LIKE '%{1}%' "
,
nameof
(
RB_Mall_Magic_Extend
.
Name
),
query
.
Name
.
Trim
());
}
return
GetPage
<
RB_Mall_Magic_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取图片魔方列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Mall_Magic_Extend
>
GetMallMagicListRepository
(
RB_Mall_Magic_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT * FROM RB_Mall_Magic WHERE 1=1 AND Status=0 "
);
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Mall_Magic_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Mall_Magic_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Mall_Magic_Extend
.
Id
),
query
.
Id
);
}
if
(
query
.
Name
!=
null
&&
!
string
.
IsNullOrEmpty
(
query
.
Name
.
Trim
()))
{
builder
.
AppendFormat
(
" AND {0} LIKE '%{1}%' "
,
nameof
(
RB_Mall_Magic_Extend
.
Name
),
query
.
Name
.
Trim
());
}
return
Get
<
RB_Mall_Magic_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
Mall.Repository/User/RB_Mall_NavRepository.cs
0 → 100644
View file @
08762fda
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_Mall_NavRepository
:
RepositoryBase
<
RB_Mall_Nav
>
{
/// <summary>
/// 轮播图分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Mall_Nav_Extend
>
GetMallNavPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Mall_Nav_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT * FROM RB_Mall_Magic WHERE 1=1 AND Status=0 "
);
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Mall_Nav_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Mall_Nav_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Mall_Nav_Extend
.
Id
),
query
.
Id
);
}
if
(
query
.
NavName
!=
null
&&
!
string
.
IsNullOrEmpty
(
query
.
NavName
.
Trim
()))
{
builder
.
AppendFormat
(
" AND {0} LIKE '%{1}%' "
,
nameof
(
RB_Mall_Nav_Extend
.
NavName
),
query
.
NavName
.
Trim
());
}
return
GetPage
<
RB_Mall_Nav_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取轮播图列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Mall_Nav_Extend
>
GetMallNavListRepository
(
RB_Mall_Nav_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT * FROM RB_Mall_Magic WHERE 1=1 AND Status=0 "
);
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Mall_Nav_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Mall_Nav_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Mall_Nav_Extend
.
Id
),
query
.
Id
);
}
if
(
query
.
NavName
!=
null
&&
!
string
.
IsNullOrEmpty
(
query
.
NavName
.
Trim
()))
{
builder
.
AppendFormat
(
" AND {0} LIKE '%{1}%' "
,
nameof
(
RB_Mall_Nav_Extend
.
NavName
),
query
.
NavName
.
Trim
());
}
return
Get
<
RB_Mall_Nav_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
Mall.WebApi/Controllers/User/TenantController.cs
View file @
08762fda
...
@@ -18,6 +18,7 @@ using Mall.CacheManager.User;
...
@@ -18,6 +18,7 @@ using Mall.CacheManager.User;
using
Mall.CacheKey
;
using
Mall.CacheKey
;
using
Mall.Common.Plugin
;
using
Mall.Common.Plugin
;
using
Mall.Common.Enum.MallBase
;
using
Mall.Common.Enum.MallBase
;
using
Mall.Model.Entity.User
;
namespace
Mall.WebApi.Controllers.User
namespace
Mall.WebApi.Controllers.User
{
{
...
@@ -929,5 +930,146 @@ namespace Mall.WebApi.Controllers.User
...
@@ -929,5 +930,146 @@ namespace Mall.WebApi.Controllers.User
return
ApiResult
.
Success
(
data
:
resultList
);
return
ApiResult
.
Success
(
data
:
resultList
);
}
}
#
region
轮播图
/// <summary>
/// 轮播图分页列表
/// </summary>
/// <returns></returns>
public
ApiResult
GetMallNavPageList
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Mall_Nav_Extend
>(
RequestParm
.
msg
.
ToString
());
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
programModule
.
GetMallNavPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
pageModel
.
count
=
Convert
.
ToInt32
(
rowsCount
);
pageModel
.
pageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取轮播图列表
/// </summary>
/// <returns></returns>
public
ApiResult
GetMallNavList
()
{
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Mall_Nav_Extend
>(
RequestParm
.
msg
.
ToString
());
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
programModule
.
GetMallNavListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 新增修改轮播图
/// </summary>
/// <returns></returns>
public
ApiResult
SetMallNav
()
{
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_Mall_Nav_Extend
>(
RequestParm
.
msg
.
ToString
());
extModel
.
Status
=
0
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
extModel
.
CreateDate
=
DateTime
.
Now
;
var
flag
=
programModule
.
SetMallNavModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取轮播图实体
/// </summary>
/// <returns></returns>
public
ApiResult
GetMallNav
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
Id
=
parms
.
GetInt
(
"Id"
,
0
);
var
extModel
=
programModule
.
GetMallNavModule
(
Id
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 删除轮播图
/// </summary>
/// <returns></returns>
public
ApiResult
RemoveMallNav
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
Id
=
parms
.
GetInt
(
"Id"
,
0
);
var
flag
=
programModule
.
RemoveMallNavModule
(
Id
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
#
region
图片魔方管理
/// <summary>
/// 图片魔方分页列表
/// </summary>
/// <returns></returns>
public
ApiResult
GetMallMagicPageList
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Mall_Magic_Extend
>(
RequestParm
.
msg
.
ToString
());
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
programModule
.
GetMallMagicPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
pageModel
.
count
=
Convert
.
ToInt32
(
rowsCount
);
pageModel
.
pageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取图片魔方列表
/// </summary>
/// <returns></returns>
public
ApiResult
GetMallMagicList
()
{
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Mall_Magic_Extend
>(
RequestParm
.
msg
.
ToString
());
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
programModule
.
GetMallMagicListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 新增修改图片魔方
/// </summary>
/// <returns></returns>
public
ApiResult
SetMallMagic
()
{
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_Mall_Magic_Extend
>(
RequestParm
.
msg
.
ToString
());
extModel
.
Status
=
0
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
extModel
.
CreateDate
=
DateTime
.
Now
;
var
flag
=
programModule
.
SetMallMagicModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取图片魔方实体
/// </summary>
/// <returns></returns>
public
ApiResult
GetMallMagic
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
Id
=
parms
.
GetInt
(
"Id"
,
0
);
var
extModel
=
programModule
.
GetMallMagicModule
(
Id
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 删除图片魔方
/// </summary>
/// <returns></returns>
public
ApiResult
RemoveMallMagic
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
Id
=
parms
.
GetInt
(
"Id"
,
0
);
var
flag
=
programModule
.
RemoveMallMagicModule
(
Id
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
}
}
}
}
\ No newline at end of file
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