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
cc2f1147
Commit
cc2f1147
authored
May 21, 2020
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
ead4bf98
164c3848
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
47 changed files
with
3283 additions
and
35 deletions
+3283
-35
UserReidsCache.cs
Mall.CacheManager/User/UserReidsCache.cs
+1
-0
AppletUserInfo.cs
Mall.Common/API/AppletUserInfo.cs
+11
-1
RequestParm.cs
Mall.Common/API/RequestParm.cs
+5
-0
UserInfo.cs
Mall.Common/API/UserInfo.cs
+5
-0
GoodsCommentTypeEnum.cs
Mall.Common/Enum/Goods/GoodsCommentTypeEnum.cs
+31
-0
SendGoodsBetchDataHelper.cs
Mall.DataHelper/Import/SendGoodsBetchDataHelper.cs
+52
-0
Mall.DataHelper.csproj
Mall.DataHelper/Mall.DataHelper.csproj
+0
-6
RB_Goods_Comment.cs
Mall.Model/Entity/Product/RB_Goods_Comment.cs
+163
-0
RB_Goods_CommentTemplate.cs
Mall.Model/Entity/Product/RB_Goods_CommentTemplate.cs
+91
-0
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_Topic.cs
Mall.Model/Entity/User/RB_Topic.cs
+156
-0
RB_Miniprogram_Template_Extend.cs
.../Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
+223
-2
RB_Goods_CommentTemplate_Extend.cs
Mall.Model/Extend/Product/RB_Goods_CommentTemplate_Extend.cs
+18
-0
RB_Goods_Comment_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Comment_Extend.cs
+41
-0
RB_Goods_OrderExpress_Extend.cs
Mall.Model/Extend/Product/RB_Goods_OrderExpress_Extend.cs
+4
-0
RB_Goods_Order_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
+4
-0
RB_Mall_Magic_Extend.cs
Mall.Model/Extend/User/RB_Mall_Magic_Extend.cs
+53
-0
RB_Mall_Nav_Extend.cs
Mall.Model/Extend/User/RB_Mall_Nav_Extend.cs
+17
-0
RB_Menu_Extend.cs
Mall.Model/Extend/User/RB_Menu_Extend.cs
+5
-0
RB_Role_Extend.cs
Mall.Model/Extend/User/RB_Role_Extend.cs
+5
-0
RB_Tenant_Extend.cs
Mall.Model/Extend/User/RB_Tenant_Extend.cs
+10
-0
RB_Topic_Extend.cs
Mall.Model/Extend/User/RB_Topic_Extend.cs
+68
-0
MiniprogramTemplateModule.cs
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
+3
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+389
-0
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+0
-1
ContentModule.cs
Mall.Module.User/ContentModule.cs
+110
-0
EmployeeModule.cs
Mall.Module.User/EmployeeModule.cs
+26
-1
MiniProgramModule.cs
Mall.Module.User/MiniProgramModule.cs
+182
-5
TenantModule.cs
Mall.Module.User/TenantModule.cs
+10
-0
RB_Goods_CommentRepository.cs
Mall.Repository/Product/RB_Goods_CommentRepository.cs
+144
-0
RB_Goods_CommentTemplateRepository.cs
....Repository/Product/RB_Goods_CommentTemplateRepository.cs
+53
-0
RB_Goods_OrderRepository.cs
Mall.Repository/Product/RB_Goods_OrderRepository.cs
+3
-0
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
RB_MenuRepository.cs
Mall.Repository/User/RB_MenuRepository.cs
+6
-0
RB_RoleRepository.cs
Mall.Repository/User/RB_RoleRepository.cs
+16
-0
RB_TenantRepository.cs
Mall.Repository/User/RB_TenantRepository.cs
+23
-0
RB_TopicRepository.cs
Mall.Repository/User/RB_TopicRepository.cs
+83
-0
FileController.cs
Mall.WebApi/Controllers/File/FileController.cs
+67
-0
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+103
-0
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+229
-0
ProductController.cs
Mall.WebApi/Controllers/Product/ProductController.cs
+93
-14
AppletLoginController.cs
Mall.WebApi/Controllers/User/AppletLoginController.cs
+1
-0
EmployeeController.cs
Mall.WebApi/Controllers/User/EmployeeController.cs
+13
-0
MContentController.cs
Mall.WebApi/Controllers/User/MContentController.cs
+75
-0
TenantController.cs
Mall.WebApi/Controllers/User/TenantController.cs
+367
-5
No files found.
Mall.CacheManager/User/UserReidsCache.cs
View file @
cc2f1147
...
...
@@ -187,6 +187,7 @@ namespace Mall.CacheManager.User
Name
=
umodel
.
Name
,
OpenId
=
umodel
.
OpenId
,
Photo
=
umodel
.
Photo
,
Source
=
umodel
.
Source
,
SecretKey
=
umodel
.
SecretKey
,
SuperiorId
=
umodel
.
SuperiorId
??
0
,
Token
=
token
...
...
Mall.Common/API/AppletUserInfo.cs
View file @
cc2f1147
using
System
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
...
...
@@ -71,6 +72,15 @@ namespace Mall.Common
/// </summary>
public
string
Photo
{
get
;
set
;
}
/// <summary>
/// 来源 1微信 2支付宝
/// </summary>
public
UserSourceEnum
?
Source
{
get
;
set
;
}
/// <summary>
/// 商城名称
/// </summary>
...
...
Mall.Common/API/RequestParm.cs
View file @
cc2f1147
...
...
@@ -57,5 +57,10 @@ namespace Mall.Common.API
/// 语种类型
/// </summary>
public
LanguageTypeEnum
languageType
{
get
;
set
;
}
/// <summary>
/// 员工编号【员工登录时使用】
/// </summary>
public
int
EmpId
{
get
;
set
;
}
}
}
Mall.Common/API/UserInfo.cs
View file @
cc2f1147
...
...
@@ -121,5 +121,10 @@ namespace Mall.Common
/// SecretKey
/// </summary>
public
string
SecretKey
{
get
;
set
;
}
/// <summary>
/// 员工编号
/// </summary>
public
int
EmpId
{
get
;
set
;
}
}
}
Mall.Common/Enum/Goods/GoodsCommentTypeEnum.cs
0 → 100644
View file @
cc2f1147
using
Mall.Common.Plugin
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Mall.Common.Enum.Goods
{
/// <summary>
/// 商品评论类型枚举
/// </summary>
public
enum
GoodsCommentTypeEnum
{
/// <summary>
/// 好评
/// </summary>
[
EnumField
(
"好评"
)]
Praise
=
1
,
/// <summary>
/// 中评
/// </summary>
[
EnumField
(
"中评"
)]
Medium
=
2
,
/// <summary>
/// 差评
/// </summary>
[
EnumField
(
"差评"
)]
Negative
=
3
}
}
Mall.DataHelper/Import/SendGoodsBetchDataHelper.cs
0 → 100644
View file @
cc2f1147
using
Mall.Model.Extend.Product
;
using
System
;
using
System.Collections.Generic
;
using
System.Data
;
using
System.Linq
;
namespace
Mall.DataHelper
{
public
class
SendGoodsBetchDataHelper
{
/// <summary>
/// 导入模板
/// </summary>
/// <param name="fileName"></param>
/// <returns></returns>
public
static
List
<
RB_Goods_OrderExpress_Extend
>
ImportClaimData
(
string
fileName
)
{
List
<
RB_Goods_OrderExpress_Extend
>
list
=
new
List
<
RB_Goods_OrderExpress_Extend
>();
var
dt
=
Mall
.
Common
.
Plugin
.
NPOIHelper
.
ImportExceltoDt
(
fileName
,
0
,
0
,
true
);
if
(
dt
!=
null
&&
dt
.
Rows
.
Count
>
0
)
{
foreach
(
DataRow
dr
in
dt
.
Rows
)
{
list
.
Add
(
DataRowToModel
(
dr
));
}
}
return
list
;
}
/// <summary>
/// DataRow转实体
/// </summary>
/// <param name="dr"></param>
/// <returns></returns>
public
static
RB_Goods_OrderExpress_Extend
DataRowToModel
(
DataRow
dr
)
{
RB_Goods_OrderExpress_Extend
model
=
new
RB_Goods_OrderExpress_Extend
();
if
(
dr
!=
null
)
{
if
(
dr
.
Table
.
Columns
.
Contains
(
"订单号"
)
&&
!
string
.
IsNullOrEmpty
(
dr
[
"订单号"
].
ToString
().
Trim
()))
{
model
.
OrderNo
=
dr
[
"订单号"
].
ToString
().
Trim
();
}
if
(
dr
.
Table
.
Columns
.
Contains
(
"快递单号"
)
&&
!
string
.
IsNullOrEmpty
(
dr
[
"快递单号"
].
ToString
().
Trim
()))
{
model
.
ExpressNumber
=
dr
[
"快递单号"
].
ToString
().
Trim
();
}
}
return
model
;
}
}
}
\ No newline at end of file
Mall.DataHelper/Mall.DataHelper.csproj
View file @
cc2f1147
...
...
@@ -4,12 +4,6 @@
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Import\**" />
<EmbeddedResource Remove="Import\**" />
<None Remove="Import\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="4.9.4" />
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
...
...
Mall.Model/Entity/Product/RB_Goods_Comment.cs
0 → 100644
View file @
cc2f1147
using
Mall.Common.AOP
;
using
Mall.Common.Enum.Goods
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.Product
{
/// <summary>
/// 商品订评论表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_Comment
{
/// <summary>
/// Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 用户id
/// </summary>
public
int
?
UserId
{
get
;
set
;
}
/// <summary>
/// 商品id
/// </summary>
public
int
?
GoodsId
{
get
;
set
;
}
/// <summary>
/// 客人名称
/// </summary>
public
string
UserName
{
get
;
set
;
}
/// <summary>
/// 用户头像
/// </summary>
public
int
?
UserPhoto
{
get
;
set
;
}
/// <summary>
/// 评论类型 1 好评 2中评 3差评
/// </summary>
public
GoodsCommentTypeEnum
?
CommentGrade
{
get
;
set
;
}
/// <summary>
/// 评论内容
/// </summary>
public
string
Content
{
get
;
set
;
}
/// <summary>
/// 评论图片
/// </summary>
public
string
CommentImage
{
get
;
set
;
}
/// <summary>
/// 回复
/// </summary>
public
string
Reply
{
get
;
set
;
}
/// <summary>
/// 来源
/// </summary>
public
UserSourceEnum
?
PlatformSource
{
get
;
set
;
}
/// <summary>
/// 是否置顶 1是 2否
/// </summary>
public
int
?
Is_Top
{
get
;
set
;
}
/// <summary>
/// 是否显示 1是 2否
/// </summary>
public
int
?
Is_Show
{
get
;
set
;
}
/// <summary>
/// 是否匿名 1是 2否
/// </summary>
public
int
?
Is_Anonymity
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
?
Status
{
get
;
set
;
}
/// <summary>
/// 商户号
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// CreateDate
/// </summary>
public
DateTime
?
CreateDate
{
get
;
set
;
}
/// <summary>
/// UpdateDate
/// </summary>
public
DateTime
?
UpdateDate
{
get
;
set
;
}
}
}
Mall.Model/Entity/Product/RB_Goods_CommentTemplate.cs
0 → 100644
View file @
cc2f1147
using
Mall.Common.AOP
;
using
Mall.Common.Enum.Goods
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.Product
{
/// <summary>
/// 商品订评论模板表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_CommentTemplate
{
/// <summary>
/// Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 模板名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 模板内容
/// </summary>
public
string
Content
{
get
;
set
;
}
/// <summary>
/// 评论类型 1好评 2中评 3差评
/// </summary>
public
GoodsCommentTypeEnum
?
CommentGrade
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
?
Status
{
get
;
set
;
}
/// <summary>
/// 商户号
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// CreateDate
/// </summary>
public
DateTime
?
CreateDate
{
get
;
set
;
}
/// <summary>
/// UpdateDate
/// </summary>
public
DateTime
?
UpdateDate
{
get
;
set
;
}
}
}
Mall.Model/Entity/User/RB_Mall_Magic.cs
0 → 100644
View file @
cc2f1147
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 @
cc2f1147
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/Entity/User/RB_Topic.cs
0 → 100644
View file @
cc2f1147
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_Topic
{
/// <summary>
/// 专题Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 标题
/// </summary>
public
string
Title
{
get
;
set
;
}
/// <summary>
/// 专题列表布局方式
/// </summary>
public
int
?
FlexType
{
get
;
set
;
}
/// <summary>
/// 封面图
/// </summary>
public
string
CoverImg
{
get
;
set
;
}
/// <summary>
/// 摘要
/// </summary>
public
string
Abstract
{
get
;
set
;
}
/// <summary>
/// 自定义分享标题
/// </summary>
public
string
CustomTitle
{
get
;
set
;
}
/// <summary>
/// 自定义分享图片
/// </summary>
public
string
CustomImg
{
get
;
set
;
}
/// <summary>
/// 是否精选(1-是)
/// </summary>
public
int
?
IsChoice
{
get
;
set
;
}
/// <summary>
/// 分类编号
/// </summary>
public
int
?
TopicTypeId
{
get
;
set
;
}
/// <summary>
/// 阅读数量
/// </summary>
public
int
?
ReadNum
{
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
int
?
SortNum
{
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
;
}
/// <summary>
/// 模板数据[JSON]格式
/// </summary>
public
string
TemplateData
{
get
;
set
;
}
}
}
Mall.Model/Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
View file @
cc2f1147
...
...
@@ -231,7 +231,7 @@ namespace Mall.Model.Extend.MarketingCenter
public
string
url
{
get
;
set
;
}
/// <summary>
///
openType
///
打开方式
/// </summary>
public
string
openType
{
get
;
set
;
}
}
...
...
@@ -302,6 +302,110 @@ namespace Mall.Model.Extend.MarketingCenter
public
string
btnTextColor
{
get
;
set
;
}
}
/// <summary>
/// 专题插件
/// </summary>
public
class
topicItem
{
/// <summary>
/// 专题样式
/// </summary>
public
string
normal
{
get
;
set
;
}
/// <summary>
/// 显示行数
/// </summary>
public
int
count
{
get
;
set
;
}
/// <summary>
/// logo(1行)
/// </summary>
public
string
logo_1
{
get
;
set
;
}
/// <summary>
/// logo(2行)
/// </summary>
public
string
logo_2
{
get
;
set
;
}
/// <summary>
/// 专题标签
/// </summary>
public
string
icon
{
get
;
set
;
}
/// <summary>
/// 是否显示分类
/// </summary>
public
bool
cat_show
{
get
;
set
;
}
/// <summary>
/// 专题列表
/// </summary>
public
List
<
topicDetailsItem
>
topic_list
{
get
;
set
;
}
/// <summary>
/// 专题分类列表
/// </summary>
public
List
<
topicTypeItem
>
list
{
get
;
set
;
}
}
/// <summary>
/// 专题分类
/// </summary>
public
class
topicTypeItem
{
/// <summary>
/// 分类Id
/// </summary>
public
int
cat_id
{
get
;
set
;
}
/// <summary>
/// 分类名称
/// </summary>
public
int
cat_name
{
get
;
set
;
}
/// <summary>
/// 分类名称
/// </summary>
public
int
name
{
get
;
set
;
}
public
int
custom
{
get
;
set
;
}
public
int
number
{
get
;
set
;
}
public
List
<
object
>
children
{
get
;
set
;
}
}
/// <summary>
/// 专题列表详情
/// </summary>
public
class
topicDetailsItem
{
/// <summary>
/// 专题标题
/// </summary>
public
string
title
{
get
;
set
;
}
/// <summary>
/// 专题封面图
/// </summary>
public
string
cover_pic
{
get
;
set
;
}
/// <summary>
/// 专题阅读数量
/// </summary>
public
int
read_count
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
layout
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
id
{
get
;
set
;
}
}
/// <summary>
/// 标题组件
/// </summary>
...
...
@@ -425,15 +529,56 @@ namespace Mall.Model.Extend.MarketingCenter
/// </summary>
public
class
rubikDetailItem
{
/// <summary>
/// 背景颜色
/// </summary>
public
string
backgroundColor
{
get
;
set
;
}
public
int
numberX
{
get
;
set
;
}
public
int
numberY
{
get
;
set
;
}
public
int
x
{
get
;
set
;
}
public
int
y
{
get
;
set
;
}
public
int
w
{
get
;
set
;
}
public
int
h
{
get
;
set
;
}
/// <summary>
/// 图片导航链接
/// </summary>
public
rubikLinkItem
link
{
get
;
set
;
}
/// <summary>
/// 宽度
/// </summary>
public
string
width
{
get
;
set
;
}
/// <summary>
/// 高度
/// </summary>
public
string
height
{
get
;
set
;
}
/// <summary>
/// 左
/// </summary>
public
string
left
{
get
;
set
;
}
/// <summary>
/// 顶部
/// </summary>
public
string
top
{
get
;
set
;
}
public
string
pic_url
{
get
;
set
;
}
public
string
backgroundImage
{
get
;
set
;
}
public
string
backgroundRepeat
{
get
;
set
;
}
public
string
backgroundSize
{
get
;
set
;
}
public
string
backgroundPosition
{
get
;
set
;
}
public
int
zIndex
{
get
;
set
;
}
}
/// <summary>
...
...
@@ -467,22 +612,49 @@ namespace Mall.Model.Extend.MarketingCenter
/// </summary>
public
class
hotspotItem
{
/// <summary>
/// 热区高度
/// </summary>
public
int
height
{
get
;
set
;
}
/// <summary>
/// 热区宽度
/// </summary>
public
int
width
{
get
;
set
;
}
/// <summary>
/// 热区左
/// </summary>
public
int
left
{
get
;
set
;
}
/// <summary>
/// 热区上
/// </summary>
public
int
top
{
get
;
set
;
}
/// <summary>
/// 开始点X
/// </summary>
public
int
defaultX
{
get
;
set
;
}
/// <summary>
/// 开始点Y
/// </summary>
public
int
defaultY
{
get
;
set
;
}
/// <summary>
/// 是否关闭
/// </summary>
public
bool
is_close
{
get
;
set
;
}
/// <summary>
/// 热区链接
/// </summary>
public
rubikLinkItem
link
{
get
;
set
;
}
/// <summary>
/// 打开方式
/// </summary>
public
string
open_type
{
get
;
set
;
}
}
...
...
@@ -651,7 +823,56 @@ namespace Mall.Model.Extend.MarketingCenter
/// <summary>
/// 商品列表
/// </summary>
public
List
<
GoodsDetailsItem
>
list
{
get
;
set
;
}
public
List
<
GoodsDetailsItem2
>
list
{
get
;
set
;
}
}
/// <summary>
/// 商品详情项
/// </summary>
public
class
GoodsDetailsItem2
{
/// <summary>
/// 商品编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 商品名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 商品图片
/// </summary>
public
string
CoverImage
{
get
;
set
;
}
/// <summary>
/// 售价
/// </summary>
public
decimal
SellingPrice
{
get
;
set
;
}
public
int
SalesNum
{
get
;
set
;
}
/// <summary>
/// 商品分类列表
/// </summary>
public
List
<
CategoryItem
>
CategoryList
{
get
;
set
;
}
}
/// <summary>
/// 商品分类
/// </summary>
public
class
CategoryItem
{
/// <summary>
/// 商品分类编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 商品分类名称
/// </summary>
public
string
CategoryName
{
get
;
set
;
}
}
/// <summary>
...
...
Mall.Model/Extend/Product/RB_Goods_CommentTemplate_Extend.cs
0 → 100644
View file @
cc2f1147
using
Mall.Common.AOP
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
namespace
Mall.Model.Extend.Product
{
/// <summary>
/// 商品评论模板表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_CommentTemplate_Extend
:
RB_Goods_CommentTemplate
{
}
}
Mall.Model/Extend/Product/RB_Goods_Comment_Extend.cs
0 → 100644
View file @
cc2f1147
using
Mall.Common.AOP
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
namespace
Mall.Model.Extend.Product
{
/// <summary>
/// 商品评论表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_Comment_Extend
:
RB_Goods_Comment
{
/// <summary>
/// 商品图片
/// </summary>
public
string
CarouselImage
{
get
;
set
;
}
/// <summary>
/// 商品名称
/// </summary>
public
string
GoodsName
{
get
;
set
;
}
/// <summary>
/// 封面图
/// </summary>
public
string
CoverImage
{
get
;
set
;
}
/// <summary>
/// 评论图片列表
/// </summary>
public
List
<
string
>
CommentImgList
{
get
;
set
;
}
/// <summary>
/// 头像路径
/// </summary>
public
string
UserPhotoPath
{
get
;
set
;
}
/// <summary>
/// 评论数量
/// </summary>
public
int
CommentNum
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_OrderExpress_Extend.cs
View file @
cc2f1147
...
...
@@ -22,6 +22,10 @@ namespace Mall.Model.Extend.Product
/// </summary>
public
int
?
OrderId
{
get
;
set
;}
/// <summary>
/// 订单号
/// </summary>
public
string
OrderNo
{
get
;
set
;
}
/// <summary>
/// 订单快递ids
/// </summary>
public
string
OrderExpressIds
{
get
;
set
;
}
...
...
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
View file @
cc2f1147
...
...
@@ -18,6 +18,10 @@ namespace Mall.Model.Extend.Product
/// </summary>
public
string
OrderIds
{
get
;
set
;
}
/// <summary>
/// 订单号s
/// </summary>
public
string
orderNos
{
get
;
set
;
}
/// <summary>
/// 是否来自购物车 1是 2否
/// </summary>
public
int
?
IsFormShoppingCart
{
get
;
set
;
}
...
...
Mall.Model/Extend/User/RB_Mall_Magic_Extend.cs
0 → 100644
View file @
cc2f1147
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
{
/// <summary>
/// 魔方数据列表
/// </summary>
public
List
<
MagicItem
>
MagicDataList
{
get
;
set
;
}
/// <summary>
/// 创建时间字符串
/// </summary>
public
string
CreateDateStr
{
get
{
string
str
=
""
;
if
(
this
.
CreateDate
!=
null
)
{
str
=
Convert
.
ToDateTime
(
this
.
CreateDate
).
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
}
return
str
;
}
}
}
/// <summary>
/// 魔方数据项
/// </summary>
public
class
MagicItem
{
/// <summary>
/// 魔方链接
/// </summary>
public
string
Link
{
get
;
set
;
}
/// <summary>
/// 魔方图片
/// </summary>
public
string
ImgUrl
{
get
;
set
;
}
}
}
\ No newline at end of file
Mall.Model/Extend/User/RB_Mall_Nav_Extend.cs
0 → 100644
View file @
cc2f1147
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.Model/Extend/User/RB_Menu_Extend.cs
View file @
cc2f1147
...
...
@@ -27,5 +27,10 @@ namespace Mall.Model.Extend.User
return
str
;
}
}
/// <summary>
/// 查询菜单编号
/// </summary>
public
string
QMenuIds
{
get
;
set
;
}
}
}
Mall.Model/Extend/User/RB_Role_Extend.cs
View file @
cc2f1147
...
...
@@ -30,5 +30,10 @@ namespace Mall.Model.Entity.User
/// 创建人
/// </summary>
public
string
CreateByName
{
get
;
set
;
}
/// <summary>
/// 员工编号
/// </summary>
public
int
EmpId
{
get
;
set
;
}
}
}
\ No newline at end of file
Mall.Model/Extend/User/RB_Tenant_Extend.cs
View file @
cc2f1147
...
...
@@ -34,5 +34,15 @@ namespace Mall.Model.Extend.User
return
str
;
}
}
/// <summary>
/// 小程序Id【用于登录验证】
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 当前登录员工编号
/// </summary>
public
int
EmpId
{
get
;
set
;
}
}
}
Mall.Model/Extend/User/RB_Topic_Extend.cs
0 → 100644
View file @
cc2f1147
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
Mall.Model.Extend.MarketingCenter
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.User
{
/// <summary>
/// 专题表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Topic_Extend
:
Model
.
Entity
.
User
.
RB_Topic
{
/// <summary>
/// 专题名称
/// </summary>
public
string
TopicName
{
get
;
set
;
}
/// <summary>
/// 专题列表布局方式
/// </summary>
public
string
FlexTypeStr
{
get
{
string
str
=
""
;
if
(
this
.
FlexType
>
0
)
{
switch
(
Convert
.
ToInt32
(
this
.
FlexType
))
{
case
1
:
str
=
"小图模式"
;
break
;
case
2
:
str
=
"大图模式"
;
break
;
case
3
:
str
=
"多图模式"
;
break
;
}
}
return
str
;
}
}
/// <summary>
/// 是否精选字符串
/// </summary>
public
string
IsChoiceStr
{
get
{
string
str
=
""
;
if
(
this
.
IsChoice
>=
0
)
{
switch
(
Convert
.
ToInt32
(
this
.
IsChoice
))
{
case
0
:
str
=
"否"
;
break
;
case
1
:
str
=
"是"
;
break
;
}
}
return
str
;
}
}
/// <summary>
/// 前端组件
/// </summary>
public
List
<
ComponentItem
>
ComponentDataList
{
get
;
set
;
}
}
}
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
View file @
cc2f1147
...
...
@@ -101,6 +101,9 @@ namespace Mall.Module.MarketingCenter
case
"nav"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
navItem
>(
item
.
data
.
ToString
());
break
;
case
"banner"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
bannerItem
>(
item
.
data
.
ToString
());
break
;
case
"notice"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
noticeItem
>(
item
.
data
.
ToString
());
break
;
//专题
case
"topic"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
topicItem
>(
item
.
data
.
ToString
());
break
;
case
"link"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
linkItem
>(
item
.
data
.
ToString
());
break
;
case
"rubik"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
rubikItem
>(
item
.
data
.
ToString
());
break
;
case
"video"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
videoItem
>(
item
.
data
.
ToString
());
break
;
...
...
Mall.Module.Product/OrderModule.cs
View file @
cc2f1147
This diff is collapsed.
Click to expand it.
Mall.Module.Product/ProductModule.cs
View file @
cc2f1147
...
...
@@ -2034,7 +2034,6 @@ namespace Mall.Module.Product
{
nameof
(
RB_Goods
.
SeparateDistribution
),
demodel
.
SeparateDistribution
},
{
nameof
(
RB_Goods
.
SeparateDistributionType
),
demodel
.
SeparateDistributionType
},
{
nameof
(
RB_Goods
.
SeparateDistributionMoneyType
),
demodel
.
SeparateDistributionMoneyType
},
{
nameof
(
RB_Goods
.
SeparateDistributionMoneyType
),
demodel
.
SeparateDistributionMoneyType
},
{
nameof
(
RB_Goods
.
SeparateSetMember
),
demodel
.
SeparateSetMember
},
{
nameof
(
RB_Goods
.
IsQuickBuy
),
demodel
.
IsQuickBuy
}
};
...
...
Mall.Module.User/ContentModule.cs
View file @
cc2f1147
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Common.Plugin
;
using
Mall.Model.Entity.User
;
using
Mall.Model.Extend.MarketingCenter
;
using
Mall.Model.Extend.User
;
using
Mall.Repository
;
using
Mall.Repository.User
;
...
...
@@ -33,6 +35,11 @@ namespace Mall.Module.User
/// </summary>
private
RB_ArticleRepository
articleRepository
=
new
RB_ArticleRepository
();
/// <summary>
/// 专题仓储层对象
/// </summary>
private
RB_TopicRepository
topicRepository
=
new
RB_TopicRepository
();
#
region
专题分类
/// <summary>
...
...
@@ -129,6 +136,109 @@ namespace Mall.Module.User
}
#
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_Topic_Extend
>
GetTopicPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Topic_Extend
query
)
{
return
topicRepository
.
GetTopicPageListRepository
(
pageIndex
,
pageSize
,
out
rowCount
,
query
);
}
/// <summary>
/// 获取专题列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Topic_Extend
>
GetTopicListModule
(
RB_Topic_Extend
query
)
{
return
topicRepository
.
GetTopicListRepository
(
query
);
}
/// <summary>
/// 新增修改专题
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public
bool
SetTopicModule
(
RB_Topic_Extend
extModel
)
{
bool
flag
=
false
;
if
(
extModel
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Topic_Extend
.
Title
),
extModel
.
Title
.
Trim
()},
{
nameof
(
RB_Topic_Extend
.
FlexType
),
extModel
.
FlexType
},
{
nameof
(
RB_Topic_Extend
.
CoverImg
),
extModel
.
CoverImg
},
{
nameof
(
RB_Topic_Extend
.
Abstract
),
extModel
.
Abstract
},
{
nameof
(
RB_Topic_Extend
.
CustomTitle
),
extModel
.
CustomTitle
},
{
nameof
(
RB_Topic_Extend
.
CustomImg
),
extModel
.
CustomImg
},
{
nameof
(
RB_Topic_Extend
.
IsChoice
),
extModel
.
IsChoice
},
{
nameof
(
RB_Topic_Extend
.
TopicTypeId
),
extModel
.
TopicTypeId
},
{
nameof
(
RB_Topic_Extend
.
ReadNum
),
extModel
.
ReadNum
},
{
nameof
(
RB_Topic_Extend
.
SortNum
),
extModel
.
SortNum
},
};
flag
=
topicRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Topic_Extend
.
Id
),
extModel
.
Id
));
}
else
{
var
newId
=
topicRepository
.
Insert
(
extModel
);
extModel
.
Id
=
newId
;
flag
=
newId
>
0
;
}
return
flag
;
}
/// <summary>
/// 获取专题实体
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
RB_Topic_Extend
GetTopicModule
(
object
Id
)
{
var
extModel
=
topicRepository
.
GetEntity
<
RB_Topic_Extend
>(
Id
);
if
(
extModel
.
TemplateData
!=
null
&&
!
string
.
IsNullOrEmpty
(
extModel
.
TemplateData
))
{
extModel
.
ComponentDataList
=
JsonHelper
.
DeserializeObject
<
List
<
ComponentItem
>>(
extModel
.
TemplateData
);
if
(
extModel
.
ComponentDataList
!=
null
&&
extModel
.
ComponentDataList
.
Count
>
0
)
{
foreach
(
var
item
in
extModel
.
ComponentDataList
)
{
switch
(
item
.
Id
)
{
case
"rubik"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
rubikItem
>(
item
.
data
.
ToString
());
break
;
case
"video"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
videoItem
>(
item
.
data
.
ToString
());
break
;
case
"image-text"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
imagetextItem
>(
item
.
data
.
ToString
());
break
;
}
}
}
}
return
extModel
;
}
/// <summary>
/// 删除专题
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public
bool
RemoveTopicModule
(
object
Id
)
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Topic_Extend
.
Status
),
1
},
};
flag
=
topicRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Topic_Extend
.
Id
),
Id
));
return
flag
;
}
#
endregion
#
region
门店
/// <summary>
...
...
Mall.Module.User/EmployeeModule.cs
View file @
cc2f1147
...
...
@@ -53,6 +53,16 @@ namespace Mall.Module.User
return
roleRepository
.
GetRoleListRepository
(
query
);
}
/// <summary>
/// 根据员工编号获取角色权限
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Role_Extend
>
GetRoleListExtModule
(
RB_Role_Extend
query
)
{
return
roleRepository
.
GetRoleListExtRepository
(
query
);
}
/// <summary>
/// 新增修改角色
/// </summary>
...
...
@@ -146,7 +156,6 @@ namespace Mall.Module.User
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Employee_Extend
.
EmpAccount
),
extModel
.
EmpAccount
.
Trim
()},
{
nameof
(
RB_Employee_Extend
.
EmpPwd
),
extModel
.
EmpPwd
},
{
nameof
(
RB_Employee_Extend
.
EmpName
),
extModel
.
EmpName
},
{
nameof
(
RB_Employee_Extend
.
RoleAuth
),
extModel
.
RoleAuth
},
};
...
...
@@ -161,6 +170,22 @@ namespace Mall.Module.User
return
flag
;
}
/// <summary>
/// 修改员工密码
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public
bool
SetEmployeePwdModule
(
RB_Employee_Extend
extModel
)
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Employee_Extend
.
EmpPwd
),
extModel
.
EmpPwd
},
};
flag
=
employeeRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Employee_Extend
.
EmpId
),
extModel
.
EmpId
));
return
flag
;
}
/// <summary>
/// 获取员工实体
/// </summary>
...
...
Mall.Module.User/MiniProgramModule.cs
View file @
cc2f1147
...
...
@@ -10,6 +10,7 @@ using Newtonsoft.Json.Linq;
using
Newtonsoft.Json
;
using
Mall.Common.Plugin
;
using
NPOI.SS.Formula.Functions
;
using
Mall.Repository.User
;
namespace
Mall.Module.User
{
...
...
@@ -46,6 +47,187 @@ namespace Mall.Module.User
/// </summary>
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
();
}
if
(
extModel
.
MagicData
!=
null
&&
!
string
.
IsNullOrEmpty
(
extModel
.
MagicData
))
{
extModel
.
MagicDataList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
MagicItem
>>(
extModel
.
MagicData
);
}
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
小程序
/// <summary>
...
...
@@ -507,7 +689,6 @@ namespace Mall.Module.User
#
endregion
#
region
微信小程序基础配置
...
...
@@ -572,9 +753,6 @@ namespace Mall.Module.User
#
endregion
#
region
发送小程序订阅信息
...
...
@@ -1522,7 +1700,6 @@ namespace Mall.Module.User
#
endregion
#
region
小程序直播房间信息
...
...
Mall.Module.User/TenantModule.cs
View file @
cc2f1147
...
...
@@ -27,6 +27,16 @@ namespace Mall.Module.User
return
tenantRepository
.
GetListRepository
(
query
);
}
/// <summary>
/// 根据小程序获取商户信息
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
RB_Tenant_Extend
GetTenantByMallModule
(
RB_Tenant_Extend
query
)
{
return
tenantRepository
.
GetTenantByMallRepository
(
query
);
}
/// <summary>
/// 获取商户分页列表
/// </summary>
...
...
Mall.Repository/Product/RB_Goods_CommentRepository.cs
0 → 100644
View file @
cc2f1147
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
using
Mall.Model.Extend.Product
;
using
System.Linq
;
using
Mall.Model.Entity.User
;
namespace
Mall.Repository.Product
{
/// <summary>
/// 商品评论仓储层
/// </summary>
public
class
RB_Goods_CommentRepository
:
RepositoryBase
<
RB_Goods_Comment
>
{
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_Comment_Extend
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_Comment_Extend
dmodel
)
{
string
where
=
$" 1=1 "
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
Id
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
Id
)}
=
{
dmodel
.
Id
}
"
;
}
if
(
dmodel
.
CommentGrade
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
CommentGrade
)}
=
{(
int
)
dmodel
.
CommentGrade
}
"
;
}
if
(
dmodel
.
PlatformSource
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
PlatformSource
)}
=
{(
int
)
dmodel
.
PlatformSource
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
UserName
))
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
UserName
)}
like '%
{
dmodel
.
UserName
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsName
))
{
where
+=
$@" and g.
{
nameof
(
RB_Goods
.
Name
)}
like '%
{
dmodel
.
GoodsName
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Content
))
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
Content
)}
like '%
{
dmodel
.
Content
}
%'"
;
}
string
sql
=
$@"SELECT c.*,g.Name as GoodsName,g.CarouselImage FROM RB_Goods_Comment c
left join rb_goods g on c.GoodsId = g.Id
where
{
where
}
order by c.Id desc"
;
return
GetPage
<
RB_Goods_Comment_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_Comment_Extend
>
GetAppletPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_Comment_Extend
dmodel
)
{
string
where
=
$" 1=1 "
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
Id
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
Id
)}
=
{
dmodel
.
Id
}
"
;
}
if
(
dmodel
.
CommentGrade
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
CommentGrade
)}
=
{(
int
)
dmodel
.
CommentGrade
}
"
;
}
if
(
dmodel
.
GoodsId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
GoodsId
)}
=
{
dmodel
.
GoodsId
}
"
;
}
if
(
dmodel
.
PlatformSource
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
PlatformSource
)}
=
{(
int
)
dmodel
.
PlatformSource
}
"
;
}
if
(
dmodel
.
Is_Show
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
Is_Show
)}
=
{
dmodel
.
Is_Show
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
UserName
))
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
UserName
)}
like '%
{
dmodel
.
UserName
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Content
))
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
Content
)}
like '%
{
dmodel
.
Content
}
%'"
;
}
string
sql
=
$@"SELECT c.* FROM RB_Goods_Comment c where
{
where
}
order by c.Is_Top asc,c.Id desc"
;
return
GetPage
<
RB_Goods_Comment_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
/// <summary>
/// 获取评论数量统计
/// </summary>
/// <param name="goodsId"></param>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
List
<
RB_Goods_Comment_Extend
>
GetAppletGoodsCommentStatistics
(
int
goodsId
,
int
tenantId
,
int
mallBaseId
)
{
string
where
=
$" 1=1 and c.
{
nameof
(
RB_Goods_Comment
.
Is_Show
)}
=1"
;
if
(
tenantId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
TenantId
)}
=
{
tenantId
}
"
;
}
if
(
mallBaseId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
MallBaseId
)}
=
{
mallBaseId
}
"
;
}
if
(
goodsId
>
0
)
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Comment
.
GoodsId
)}
=
{
goodsId
}
"
;
}
string
sql
=
$@"SELECT c.CommentGrade,COUNT(0) as CommentNum FROM RB_Goods_Comment c where
{
where
}
GROUP BY c.CommentGrade"
;
return
Get
<
RB_Goods_Comment_Extend
>(
sql
).
ToList
();
}
}
}
Mall.Repository/Product/RB_Goods_CommentTemplateRepository.cs
0 → 100644
View file @
cc2f1147
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
using
Mall.Model.Extend.Product
;
using
System.Linq
;
using
Mall.Model.Entity.User
;
namespace
Mall.Repository.Product
{
/// <summary>
/// 商品评论模板仓储层
/// </summary>
public
class
RB_Goods_CommentTemplateRepository
:
RepositoryBase
<
RB_Goods_CommentTemplate
>
{
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_CommentTemplate_Extend
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_CommentTemplate_Extend
dmodel
)
{
string
where
=
$" 1=1 and Status =0 "
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_CommentTemplate
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_CommentTemplate
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_CommentTemplate
.
Id
)}
=
{
dmodel
.
Id
}
"
;
}
if
(
dmodel
.
CommentGrade
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_CommentTemplate
.
CommentGrade
)}
=
{(
int
)
dmodel
.
CommentGrade
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Name
))
{
where
+=
$@" and
{
nameof
(
RB_Goods_CommentTemplate
.
Name
)}
like '%
{
dmodel
.
Name
}
%'"
;
}
string
sql
=
$@"SELECT * FROM RB_Goods_CommentTemplate where
{
where
}
order by Id desc"
;
return
GetPage
<
RB_Goods_CommentTemplate_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
}
}
Mall.Repository/Product/RB_Goods_OrderRepository.cs
View file @
cc2f1147
...
...
@@ -133,6 +133,9 @@ where {where} group by o.OrderId order by o.CreateDate desc";
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderIds
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderId
)}
in(
{
dmodel
.
OrderIds
}
)"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
orderNos
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderNo
)}
in(
{
dmodel
.
orderNos
}
)"
;
}
string
sql
=
$@"SELECT o.* FROM rb_goods_order o
where
{
where
}
group by o.OrderId asc"
;
...
...
Mall.Repository/User/RB_Mall_MagicRepository.cs
0 → 100644
View file @
cc2f1147
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 @
cc2f1147
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_Nav 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_Nav 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.Repository/User/RB_MenuRepository.cs
View file @
cc2f1147
...
...
@@ -31,10 +31,16 @@ namespace Mall.Repository.User
{
builder
.
AppendFormat
(
" AND MenuName LIKE '%{0}%' "
,
query
.
MenuName
.
Trim
());
}
if
(
query
.
QMenuIds
!=
null
&&
!
string
.
IsNullOrEmpty
(
query
.
QMenuIds
.
Trim
()))
{
builder
.
AppendFormat
(
" AND MenuId IN({0}) "
,
query
.
QMenuIds
.
Trim
());
}
}
return
Get
<
RB_Menu_Extend
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取菜单分页列表
/// </summary>
...
...
Mall.Repository/User/RB_RoleRepository.cs
View file @
cc2f1147
...
...
@@ -71,5 +71,21 @@ namespace Mall.Repository.User
}
return
Get
<
RB_Role_Extend
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 根据员工编号获取角色权限
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Role_Extend
>
GetRoleListExtRepository
(
RB_Role_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT group_concat(RoleAuth) AS RoleAuth
FROM rb_role
WHERE `Status`=0 AND RoleId IN (SELECT group_concat(RoleAuth) AS RoleAuth FROM rb_employee WHERE empId={0} )
"
,
query
.
EmpId
);
return
Get
<
RB_Role_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
\ No newline at end of file
Mall.Repository/User/RB_TenantRepository.cs
View file @
cc2f1147
...
...
@@ -31,6 +31,29 @@ namespace Mall.Repository.User
return
Get
<
RB_Tenant_Extend
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 根据小程序获取商户信息
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
RB_Tenant_Extend
GetTenantByMallRepository
(
RB_Tenant_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
@"
SELECT A.TenantId,B.EmpAccount AS Account,A.Name,A.MobilePhone,A.WeChatNum,A.IsEffective,A.AccountValidate,A.CreateMiniPrograme
,A.AccountStatus,B.EmpPwd AS Password,B.EmpId
FROM RB_Tenant AS A LEFT JOIN rb_employee AS B ON A.TenantId=B.TenantId
WHERE 1=1 "
);
if
(
query
!=
null
)
{
if
(
query
.
Account
!=
null
&&
!
string
.
IsNullOrEmpty
(
query
.
Account
.
Trim
()))
{
builder
.
AppendFormat
(
" AND B.EmpAccount='{0}' "
,
query
.
Account
.
Trim
());
}
}
return
Get
<
RB_Tenant_Extend
>(
builder
.
ToString
()).
FirstOrDefault
();
}
/// <summary>
/// 获取商户分页列表
/// </summary>
...
...
Mall.Repository/User/RB_TopicRepository.cs
0 → 100644
View file @
cc2f1147
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_TopicRepository
:
RepositoryBase
<
RB_Topic
>
{
/// <summary>
/// 专题分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Topic_Extend
>
GetTopicPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Topic_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,B.TopicName FROM RB_Topic AS A LEFT JOIN rb_topic_type AS B ON A.TopicTypeId=B.Id
WHERE 1=1 AND A.Status=0
"
);
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Topic_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Topic_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Topic_Extend
.
Id
),
query
.
Id
);
}
if
(
query
.
Title
!=
null
&&
!
string
.
IsNullOrEmpty
(
query
.
Title
.
Trim
()))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE '%{1}%' "
,
nameof
(
RB_Topic_Extend
.
Title
),
query
.
Title
.
Trim
());
}
if
(
query
.
TopicTypeId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Topic_Extend
.
TopicTypeId
),
query
.
TopicTypeId
);
}
builder
.
Append
(
" ORDER BY A.SortNum "
);
return
GetPage
<
RB_Topic_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取专题列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Topic_Extend
>
GetTopicListRepository
(
RB_Topic_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT * FROM RB_Topic WHERE 1=1 AND Status=0 "
);
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Topic_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Topic_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Topic_Extend
.
Id
),
query
.
Id
);
}
if
(
query
.
Title
!=
null
&&
!
string
.
IsNullOrEmpty
(
query
.
Title
.
Trim
()))
{
builder
.
AppendFormat
(
" AND {0} LIKE '%{1}%' "
,
nameof
(
RB_Topic_Extend
.
Title
),
query
.
Title
.
Trim
());
}
builder
.
Append
(
" ORDER BY SortNum "
);
return
Get
<
RB_Topic_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
Mall.WebApi/Controllers/File/FileController.cs
0 → 100644
View file @
cc2f1147
using
Microsoft.AspNetCore.Mvc
;
using
System
;
using
System.IO
;
using
Microsoft.AspNetCore.Cors
;
using
System.Collections.Generic
;
using
System.Linq
;
using
Mall.WebApi.Filter
;
using
Mall.Common.API
;
using
Mall.Common.Plugin
;
namespace
Mall.WebApi.Controllers.File
{
[
Route
(
"api/[controller]/[action]"
)]
[
ApiExceptionFilter
]
[
ApiController
]
[
EnableCors
(
"AllowCors"
)]
public
class
FileController
:
ControllerBase
{
/// <summary>
/// 上传文件到本地临时文件
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
LocalFileUploadImport
()
{
try
{
var
files
=
Request
.
Form
.
Files
;
if
(
files
.
Count
==
0
)
{
return
new
ApiResult
{
resultCode
=
(
int
)
ResultCode
.
Fail
,
message
=
"未选择文件"
,
data
=
""
};
}
string
filename
=
files
[
0
].
FileName
;
string
fileExtention
=
System
.
IO
.
Path
.
GetExtension
(
files
[
0
].
FileName
);
//验证文件格式
List
<
string
>
ExtList
=
new
List
<
string
>()
{
".xls"
,
".xlsx"
};
if
(!
ExtList
.
Contains
(
fileExtention
))
{
return
new
ApiResult
{
resultCode
=
(
int
)
ResultCode
.
Fail
,
message
=
"文件格式有误"
,
data
=
""
};
}
string
path
=
Guid
.
NewGuid
().
ToString
()
+
fileExtention
;
string
basepath
=
AppContext
.
BaseDirectory
;
string
path_server
=
basepath
+
"\\upfile\\temporary\\"
+
path
;
if
(!
Directory
.
Exists
(
basepath
+
"\\upfile\\temporary"
))
{
Directory
.
CreateDirectory
(
basepath
+
"\\upfile\\temporary"
);
}
using
(
FileStream
fstream
=
new
FileStream
(
path_server
,
FileMode
.
OpenOrCreate
,
FileAccess
.
ReadWrite
))
{
files
[
0
].
CopyTo
(
fstream
);
}
return
ApiResult
.
Success
(
""
,
path_server
);
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"LocalFileUploadImport"
);
return
ApiResult
.
Failed
();
}
}
}
}
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
cc2f1147
...
...
@@ -402,6 +402,10 @@ namespace Mall.WebApi.Controllers.MallBase
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
#
endregion
#
region
订单售后
/// <summary>
/// 获取我的订单商品售后申请页面 订单信息
/// </summary>
...
...
@@ -567,5 +571,104 @@ namespace Mall.WebApi.Controllers.MallBase
}
#
endregion
#
region
订单评价
/// <summary>
/// 获取商品评论分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAppletGoodsCommentPageList
()
{
var
parms
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
parms
.
msg
.
ToString
());
RB_Goods_Comment_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Comment_Extend
>(
parms
.
msg
.
ToString
());
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
Is_Show
=
1
;
var
list
=
orderModule
.
GetAppletGoodsCommentPageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
UserId
,
UserName
=
x
.
Is_Anonymity
==
1
?
"匿名用户"
:
x
.
UserName
,
UserPhotoPath
=
x
.
UserPhotoPath
??
""
,
x
.
CommentGrade
,
CommentGradeName
=
x
.
CommentGrade
.
GetEnumName
(),
x
.
CommentImgList
,
x
.
Content
,
x
.
Reply
,
x
.
TenantId
,
x
.
MallBaseId
,
CreateDate
=
x
.
CreateDate
.
HasValue
?
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
/// <summary>
/// 获取商品评论统计
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAppletGoodsCommentStatistics
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
GoodsId
=
parms
.
GetInt
(
"GoodsId"
,
0
);
return
orderModule
.
GetAppletGoodsCommentStatistics
(
GoodsId
,
userInfo
.
TenantId
,
userInfo
.
MallBaseId
);
}
/// <summary>
/// 用户新增评论
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetGoodsCommentInfo
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
RB_Goods_Comment_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Comment_Extend
>(
req
.
msg
.
ToString
());
if
((
demodel
.
GoodsId
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递商品"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Content
))
{
return
ApiResult
.
ParamIsNull
(
"请输入评价内容"
);
}
if
(!
demodel
.
CommentGrade
.
HasValue
)
{
return
ApiResult
.
ParamIsNull
(
"请选择评分"
);
}
demodel
.
CommentImage
=
""
;
if
(
demodel
.
CommentImgList
!=
null
&&
demodel
.
CommentImgList
.
Any
())
{
demodel
.
CommentImage
=
JsonConvert
.
SerializeObject
(
demodel
.
CommentImgList
);
}
demodel
.
UserPhoto
??=
0
;
demodel
.
Is_Top
??=
2
;
demodel
.
Is_Show
??=
2
;
demodel
.
Is_Anonymity
??=
2
;
demodel
.
UserId
??=
0
;
demodel
.
Reply
??=
""
;
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
UserId
=
userInfo
.
UserId
;
demodel
.
UserName
=
userInfo
.
Name
;
demodel
.
PlatformSource
=
userInfo
.
Source
;
demodel
.
Status
=
0
;
demodel
.
UpdateDate
=
DateTime
.
Now
;
bool
flag
=
orderModule
.
SetGoodsCommentInfo
(
demodel
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
#
endregion
}
}
\ No newline at end of file
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
cc2f1147
...
...
@@ -1387,6 +1387,235 @@ namespace Mall.WebApi.Controllers.MallBase
}
#
endregion
#
region
订单评论
/// <summary>
/// 获取评论模板分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetGoodsCommentTemplatePageList
()
{
var
parms
=
RequestParm
;
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
parms
.
msg
.
ToString
());
RB_Goods_CommentTemplate_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_CommentTemplate_Extend
>(
parms
.
msg
.
ToString
());
demodel
.
TenantId
=
parms
.
TenantId
;
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
var
list
=
orderModule
.
GetGoodsCommentTemplatePageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
Name
,
x
.
Content
,
x
.
CommentGrade
,
CommentGradeName
=
x
.
CommentGrade
.
GetEnumName
(),
x
.
TenantId
,
x
.
MallBaseId
,
CreateDate
=
x
.
CreateDate
.
HasValue
?
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
/// <summary>
/// 新增修改模板
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetGoodsCommentTemplateInfo
()
{
var
req
=
RequestParm
;
RB_Goods_CommentTemplate_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_CommentTemplate_Extend
>(
req
.
msg
.
ToString
());
if
(
string
.
IsNullOrEmpty
(
demodel
.
Name
))
{
return
ApiResult
.
ParamIsNull
(
"请输入模板名称"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Content
))
{
return
ApiResult
.
ParamIsNull
(
"请输入模板内容"
);
}
if
(!
demodel
.
CommentGrade
.
HasValue
)
{
return
ApiResult
.
ParamIsNull
(
"请选择模板类型"
);
}
demodel
.
TenantId
=
req
.
TenantId
;
demodel
.
MallBaseId
=
req
.
MallBaseId
;
demodel
.
Status
=
0
;
demodel
.
CreateDate
=
DateTime
.
Now
;
demodel
.
UpdateDate
=
DateTime
.
Now
;
bool
flag
=
orderModule
.
SetGoodsCommentTemplateInfo
(
demodel
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// 删除评论模板
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
DelGoodsCommentTemplateInfo
()
{
var
req
=
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
TemplateId
=
parms
.
GetInt
(
"TemplateId"
,
0
);
if
(
TemplateId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
bool
flag
=
orderModule
.
DelGoodsCommentTemplateInfo
(
TemplateId
,
req
.
TenantId
,
req
.
MallBaseId
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// 获取商品评论分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetGoodsCommentPageList
()
{
var
parms
=
RequestParm
;
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
parms
.
msg
.
ToString
());
RB_Goods_Comment_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Comment_Extend
>(
parms
.
msg
.
ToString
());
demodel
.
TenantId
=
parms
.
TenantId
;
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
var
list
=
orderModule
.
GetGoodsCommentPageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
UserId
,
x
.
UserName
,
x
.
GoodsId
,
x
.
GoodsName
,
x
.
CoverImage
,
x
.
CommentGrade
,
CommentGradeName
=
x
.
CommentGrade
.
GetEnumName
(),
x
.
CommentImgList
,
x
.
Content
,
x
.
Reply
,
x
.
Is_Top
,
x
.
Is_Show
,
x
.
Is_Anonymity
,
x
.
PlatformSource
,
x
.
TenantId
,
x
.
MallBaseId
,
CreateDate
=
x
.
CreateDate
.
HasValue
?
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
/// <summary>
/// 管理新增评论
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetGoodsCommentInfo
()
{
var
req
=
RequestParm
;
RB_Goods_Comment_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Comment_Extend
>(
req
.
msg
.
ToString
());
if
(
string
.
IsNullOrEmpty
(
demodel
.
UserName
))
{
return
ApiResult
.
ParamIsNull
(
"请输入用户名称"
);
}
if
(!
demodel
.
CreateDate
.
HasValue
)
{
return
ApiResult
.
ParamIsNull
(
"请输入评论时间"
);
}
if
((
demodel
.
GoodsId
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请选择商品"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Content
))
{
return
ApiResult
.
ParamIsNull
(
"请输入评价内容"
);
}
if
(!
demodel
.
CommentGrade
.
HasValue
)
{
return
ApiResult
.
ParamIsNull
(
"请选择评分"
);
}
demodel
.
CommentImage
=
""
;
if
(
demodel
.
CommentImgList
!=
null
&&
demodel
.
CommentImgList
.
Any
())
{
demodel
.
CommentImage
=
JsonConvert
.
SerializeObject
(
demodel
.
CommentImgList
);
}
demodel
.
UserPhoto
??=
0
;
demodel
.
Is_Top
??=
2
;
demodel
.
Is_Show
??=
2
;
demodel
.
Is_Anonymity
??=
2
;
demodel
.
UserId
??=
0
;
demodel
.
Reply
??=
""
;
demodel
.
TenantId
=
req
.
TenantId
;
demodel
.
MallBaseId
=
req
.
MallBaseId
;
demodel
.
Status
=
0
;
demodel
.
UpdateDate
=
DateTime
.
Now
;
bool
flag
=
orderModule
.
SetGoodsCommentInfo
(
demodel
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// 批量操作
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetGoodsCommentBatch
()
{
var
req
=
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
string
CommentIds
=
parms
.
GetStringValue
(
"CommentIds"
);
int
Type
=
parms
.
GetInt
(
"Type"
,
1
);
//1批量回复 2批量隐藏 3批量显示 4批量置顶 5取消置顶 6批量删除
string
Content
=
parms
.
GetStringValue
(
"Content"
);
if
(
string
.
IsNullOrEmpty
(
CommentIds
))
{
return
ApiResult
.
ParamIsNull
();
}
if
(
Type
==
1
)
{
if
(
string
.
IsNullOrEmpty
(
Content
))
{
return
ApiResult
.
ParamIsNull
(
"回复内容不能为空"
);
}
}
bool
flag
=
orderModule
.
SetGoodsCommentBatch
(
CommentIds
,
Type
,
Content
,
req
.
TenantId
,
req
.
MallBaseId
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// 获取商品评价类型枚举
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetGoodsCommentTypeEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
GoodsCommentTypeEnum
));
return
ApiResult
.
Success
(
""
,
list
.
Select
(
x
=>
new
{
Name
=
x
.
Key
,
Id
=
Convert
.
ToInt32
(
x
.
Value
)
}));
}
#
endregion
#
region
订单批量发货
/// <summary>
/// 批量发货
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetOrderBatchSendGoods
()
{
var
req
=
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
string
FilePath
=
parms
.
GetStringValue
(
"FilePath"
);
int
ExpressId
=
parms
.
GetInt
(
"ExpressId"
,
0
);
if
(
string
.
IsNullOrEmpty
(
FilePath
))
{
return
ApiResult
.
ParamIsNull
(
"文件路径不存在"
);
}
if
(
ExpressId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请选择快递id"
);
}
string
msg
=
orderModule
.
SetOrderBatchSendGoods
(
FilePath
,
ExpressId
,
req
.
TenantId
,
req
.
MallBaseId
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
#
endregion
}
}
\ No newline at end of file
Mall.WebApi/Controllers/Product/ProductController.cs
View file @
cc2f1147
...
...
@@ -1471,24 +1471,47 @@ namespace Mall.WebApi.Controllers.MallBase
{
return
ApiResult
.
ParamIsNull
(
"请传递分销佣金列表"
);
}
//普通设置 直接根据等级验证数量
if
(
DGradeList
.
Count
()
*
TotalNum
!=
demodel
.
DistributionCommissionList
.
Count
())
{
return
ApiResult
.
ParamIsNull
(
"分销佣金列表数量不正确"
);
//转换
List
<
RB_Goods_DistributionCommission_Extend
>
Rlist
=
new
List
<
RB_Goods_DistributionCommission_Extend
>();
foreach
(
var
item
in
demodel
.
DistributionCommissionList
)
{
if
(
item
.
GradeCommissionList
==
null
||
!
item
.
GradeCommissionList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请传递分销佣金列表"
);
}
foreach
(
var
qitem
in
item
.
GradeCommissionList
)
{
Rlist
.
Add
(
new
RB_Goods_DistributionCommission_Extend
()
{
DistributorGrade
=
qitem
.
DistributorGrade
,
Id
=
0
,
SpecificationSort
=
item
.
SpecificationSort
,
OneCommission
=
qitem
.
OneCommission
,
TwoCommission
=
qitem
.
TwoCommission
,
ThreeCommission
=
qitem
.
ThreeCommission
});
}
}
if
(
Rlist
.
Any
())
{
demodel
.
DistributionCommissionList
=
Rlist
;
}
foreach
(
var
item
in
DGradeList
)
if
(
demodel
.
SeparateDistributionType
==
1
)
{
var
gradeList
=
demodel
.
DistributionCommissionList
.
Where
(
x
=>
x
.
DistributorGrade
==
item
.
Id
).
ToList
();
if
(
!
gradeList
.
Any
())
//普通设置 直接根据等级验证数量
if
(
DGradeList
.
Count
()
!=
demodel
.
DistributionCommissionList
.
Count
())
{
return
ApiResult
.
ParamIsNull
(
"分销佣金
"
+
item
.
Name
+
"列表不存在
"
);
return
ApiResult
.
ParamIsNull
(
"分销佣金
列表数量不正确
"
);
}
if
(
gradeList
.
Count
()
!=
TotalNum
)
{
return
ApiResult
.
ParamIsNull
(
"分销佣金"
+
item
.
Name
+
"列表数量不正确"
);
}
foreach
(
var
qitem
in
KeyList
)
{
string
keys
=
qitem
[
1.
.];
var
gcmodel
=
gradeList
.
Where
(
x
=>
x
.
SpecificationSort
==
keys
).
FirstOrDefault
();
foreach
(
var
item
in
DGradeList
)
{
var
gradeList
=
demodel
.
DistributionCommissionList
.
Where
(
x
=>
x
.
DistributorGrade
==
item
.
Id
).
ToList
();
if
(!
gradeList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"分销佣金"
+
item
.
Name
+
"列表不存在"
);
}
if
(
gradeList
.
Count
()
!=
TotalNum
)
{
return
ApiResult
.
ParamIsNull
(
"分销佣金"
+
item
.
Name
+
"列表数量不正确"
);
}
var
gcmodel
=
gradeList
.
Where
(
x
=>
x
.
SpecificationSort
==
""
).
FirstOrDefault
();
if
(
gcmodel
==
null
)
{
return
ApiResult
.
ParamIsNull
(
"分销Key有误"
);
...
...
@@ -1498,6 +1521,38 @@ namespace Mall.WebApi.Controllers.MallBase
gcmodel
.
ThreeCommission
??=
0
;
}
}
else
{
//普通设置 直接根据等级验证数量
if
(
DGradeList
.
Count
()
*
TotalNum
!=
demodel
.
DistributionCommissionList
.
Count
())
{
return
ApiResult
.
ParamIsNull
(
"分销佣金列表数量不正确"
);
}
foreach
(
var
item
in
DGradeList
)
{
var
gradeList
=
demodel
.
DistributionCommissionList
.
Where
(
x
=>
x
.
DistributorGrade
==
item
.
Id
).
ToList
();
if
(!
gradeList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"分销佣金"
+
item
.
Name
+
"列表不存在"
);
}
if
(
gradeList
.
Count
()
!=
TotalNum
)
{
return
ApiResult
.
ParamIsNull
(
"分销佣金"
+
item
.
Name
+
"列表数量不正确"
);
}
foreach
(
var
qitem
in
KeyList
)
{
string
keys
=
qitem
[
1.
.];
var
gcmodel
=
gradeList
.
Where
(
x
=>
x
.
SpecificationSort
==
keys
).
FirstOrDefault
();
if
(
gcmodel
==
null
)
{
return
ApiResult
.
ParamIsNull
(
"分销Key有误"
);
}
gcmodel
.
OneCommission
??=
0
;
gcmodel
.
TwoCommission
??=
0
;
gcmodel
.
ThreeCommission
??=
0
;
}
}
}
}
//会员价格
...
...
@@ -1515,6 +1570,30 @@ namespace Mall.WebApi.Controllers.MallBase
{
return
ApiResult
.
ParamIsNull
(
"请传递会员价格列表"
);
}
//转换
List
<
RB_Goods_MemberPrice_Extend
>
Rlist
=
new
List
<
RB_Goods_MemberPrice_Extend
>();
foreach
(
var
item
in
demodel
.
MemberPriceList
)
{
if
(
item
.
GradePriceList
==
null
||
!
item
.
GradePriceList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请传递会员价格列表"
);
}
foreach
(
var
qitem
in
item
.
GradePriceList
)
{
Rlist
.
Add
(
new
RB_Goods_MemberPrice_Extend
()
{
MemberGrade
=
qitem
.
MemberGrade
,
Id
=
0
,
SpecificationSort
=
item
.
SpecificationSort
,
MemberPrice
=
qitem
.
MemberPrice
});
}
}
if
(
Rlist
.
Any
())
{
demodel
.
MemberPriceList
=
Rlist
;
}
//普通设置 直接根据等级验证数量
if
(
MGradeList
.
Count
()
*
TotalNum
!=
demodel
.
MemberPriceList
.
Count
())
{
...
...
Mall.WebApi/Controllers/User/AppletLoginController.cs
View file @
cc2f1147
...
...
@@ -123,6 +123,7 @@ namespace Mall.WebApi.Controllers.User
Name
=
demodel
.
Name
,
OpenId
=
demodel
.
OpenId
,
Photo
=
demodel
.
Photo
,
Source
=
demodel
.
Source
,
SecretKey
=
demodel
.
SecretKey
,
SuperiorId
=
demodel
.
SuperiorId
??
0
,
Token
=
token
...
...
Mall.WebApi/Controllers/User/EmployeeController.cs
View file @
cc2f1147
...
...
@@ -154,10 +154,23 @@ namespace Mall.WebApi.Controllers.User
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
extModel
.
CreateDate
=
DateTime
.
Now
;
extModel
.
EmpPwd
=
Common
.
DES
.
Encrypt
(
extModel
.
EmpPwd
,
Common
.
Config
.
WebApiKey
,
Common
.
Config
.
WebApiIV
);
var
flag
=
module
.
SetEmployeeModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 修改密码
/// </summary>
/// <returns></returns>
public
ApiResult
SetEmployeePwd
()
{
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_Employee_Extend
>(
RequestParm
.
msg
.
ToString
());
extModel
.
EmpPwd
=
Common
.
DES
.
Encrypt
(
extModel
.
EmpPwd
,
Common
.
Config
.
WebApiKey
,
Common
.
Config
.
WebApiIV
);
var
flag
=
module
.
SetEmployeePwdModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取员工实体
/// </summary>
...
...
Mall.WebApi/Controllers/User/MContentController.cs
View file @
cc2f1147
...
...
@@ -115,6 +115,81 @@ namespace Mall.WebApi.Controllers.User
#
endregion
#
region
专题
/// <summary>
/// 专题分页列表
/// </summary>
/// <returns></returns>
public
ApiResult
GetTopicPageList
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Topic_Extend
>(
RequestParm
.
msg
.
ToString
());
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
contentModule
.
GetTopicPageListModule
(
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
GetTopicList
()
{
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Topic_Extend
>(
RequestParm
.
msg
.
ToString
());
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
contentModule
.
GetTopicListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 新增修改专题
/// </summary>
/// <returns></returns>
public
ApiResult
SetTopic
()
{
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_Topic_Extend
>(
RequestParm
.
msg
.
ToString
());
extModel
.
Status
=
0
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
extModel
.
CreateDate
=
DateTime
.
Now
;
if
(
extModel
.
ComponentDataList
!=
null
&&
extModel
.
ComponentDataList
.
Count
>
0
)
{
extModel
.
TemplateData
=
JsonConvert
.
SerializeObject
(
extModel
.
ComponentDataList
);
}
var
flag
=
contentModule
.
SetTopicModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取专题实体
/// </summary>
/// <returns></returns>
public
ApiResult
GetTopic
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
Id
=
parms
.
GetInt
(
"Id"
,
0
);
var
extModel
=
contentModule
.
GetTopicModule
(
Id
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 删除专题
/// </summary>
/// <returns></returns>
public
ApiResult
RemoveTopic
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
Id
=
parms
.
GetInt
(
"Id"
,
0
);
var
flag
=
contentModule
.
RemoveTopicModule
(
Id
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
#
region
门店
/// <summary>
...
...
Mall.WebApi/Controllers/User/TenantController.cs
View file @
cc2f1147
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