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
c687a920
Commit
c687a920
authored
Aug 30, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
into sdzq-ld
parents
ab291858
bc0602cc
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
583 additions
and
13 deletions
+583
-13
CustomFormTypeEnum.cs
Mall.Common/Enum/TradePavilion/CustomFormTypeEnum.cs
+34
-0
RB_Custom_Form.cs
Mall.Model/Entity/TradePavilion/RB_Custom_Form.cs
+72
-0
RB_PlugIn.cs
Mall.Model/Entity/User/RB_PlugIn.cs
+2
-2
RB_Custom_Form_Extend.cs
Mall.Model/Extend/TradePavilion/RB_Custom_Form_Extend.cs
+103
-0
RB_PlugIn_Extend.cs
Mall.Model/Extend/User/RB_PlugIn_Extend.cs
+10
-4
CustomFormModule.cs
Mall.Module.TradePavilion/CustomFormModule.cs
+101
-0
RB_Custom_FormRepository.cs
Mall.Repository/TradePavilion/RB_Custom_FormRepository.cs
+100
-0
RB_PlugInRepository.cs
Mall.Repository/User/RB_PlugInRepository.cs
+8
-0
CustomFormController.cs
Mall.WebApi/Controllers/MallBase/CustomFormController.cs
+132
-0
ProductController.cs
Mall.WebApi/Controllers/Product/ProductController.cs
+2
-1
MContentController.cs
Mall.WebApi/Controllers/User/MContentController.cs
+13
-2
TenantController.cs
Mall.WebApi/Controllers/User/TenantController.cs
+3
-1
Mall.WebApi.csproj.user
Mall.WebApi/Mall.WebApi.csproj.user
+3
-3
No files found.
Mall.Common/Enum/TradePavilion/CustomFormTypeEnum.cs
0 → 100644
View file @
c687a920
using
Mall.Common.Plugin
;
namespace
Mall.Common.Enum.TradePavilion
{
/// <summary>
///自定义表单枚举
/// </summary>
public
enum
CustomFormTypeEnum
{
/// <summary>
/// 招引贡献
/// </summary>
[
EnumField
(
"招引贡献"
)]
ZYGX
=
1
,
/// <summary>
/// 首展
/// </summary>
[
EnumField
(
"首展"
)]
SZ
=
2
,
/// <summary>
/// 首秀
/// </summary>
[
EnumField
(
"首秀"
)]
SX
=
3
,
/// <summary>
/// 首发
/// </summary>
[
EnumField
(
"首发"
)]
SF
=
4
,
}
}
Mall.Model/Entity/TradePavilion/RB_Custom_Form.cs
0 → 100644
View file @
c687a920
using
Mall.Common.Enum
;
using
Mall.Common.Enum.TradePavilion
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.TradePavilion
{
/// <summary>
/// 自定义表单实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Custom_Form
{
/// <summary>
/// 主键
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 表单名称
/// </summary>
public
string
FormName
{
get
;
set
;
}
/// <summary>
/// 表单类型(见枚举)
/// </summary>
public
CustomFormTypeEnum
FormType
{
get
;
set
;
}
/// <summary>
/// 表单内容
/// </summary>
public
string
FormData
{
get
;
set
;
}
/// <summary>
/// 商户号id
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 修改时间
/// </summary>
public
DateTime
UpdateDate
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
}
}
Mall.Model/Entity/User/RB_PlugIn.cs
View file @
c687a920
...
...
@@ -23,7 +23,7 @@ namespace Mall.Model.Entity.User
}
/// <summary>
/// 插件类型(1-基础组件,2-营销组件,3-其他组件)
/// 插件类型(1-基础组件,2-营销组件,3-其他组件
,4-表单组件
)
/// </summary>
public
int
PlugType
{
...
...
@@ -61,7 +61,7 @@ namespace Mall.Model.Entity.User
/// <summary>
/// 状态
/// </summary>
public
int
?
Status
public
int
Status
{
get
;
set
;
...
...
Mall.Model/Extend/TradePavilion/RB_Custom_Form_Extend.cs
0 → 100644
View file @
c687a920
using
Mall.Model.Entity.TradePavilion
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Extend.TradePavilion
{
/// <summary>
/// 自定义表单扩展实体类
/// </summary>
public
class
RB_Custom_Form_Extend
:
RB_Custom_Form
{
/// <summary>
/// 表单内容
/// </summary>
public
List
<
FormDataItem
>
FormDataList
{
get
;
set
;
}
}
/// <summary>
/// 组件对象
/// </summary>
public
class
FormDataItem
{
/// <summary>
///组件Key
/// </summary>
public
string
CompKey
{
get
;
set
;
}
/// <summary>
/// 组件对象
/// </summary>
public
object
CompData
{
get
;
set
;
}
}
/// <summary>
/// 文本对象
/// </summary>
public
class
TextItem
{
/// <summary>
/// 名字
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 字数(0-不限)
/// </summary>
public
int
WordsLength
{
get
;
set
;
}
/// <summary>
/// 是否必填
/// </summary>
public
bool
IsRequire
{
get
;
set
;
}
}
/// <summary>
/// 下拉框对象
/// </summary>
public
class
SelectItem
{
/// <summary>
/// 名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 是否多选
/// </summary>
public
bool
IsMultiple
{
get
;
set
;
}
/// <summary>
/// 选项值(以英文逗号相隔)
/// </summary>
public
string
OptionValue
{
get
;
set
;
}
/// <summary>
/// 是否必填
/// </summary>
public
bool
IsRequire
{
get
;
set
;
}
}
/// <summary>
/// 上传组件
/// </summary>
public
class
UploadItem
{
/// <summary>
/// 名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 上传文件数量
/// </summary>
public
int
FileCount
{
get
;
set
;
}
/// <summary>
/// 上传文件大小M
/// </summary>
public
int
FileSizeLimit
{
get
;
set
;
}
}
}
Mall.Model/Extend/User/RB_PlugIn_Extend.cs
View file @
c687a920
...
...
@@ -10,7 +10,7 @@ namespace Mall.Model.Extend.User
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_PlugIn_Extend
:
Model
.
Entity
.
User
.
RB_PlugIn
public
class
RB_PlugIn_Extend
:
Entity
.
User
.
RB_PlugIn
{
/// <summary>
/// 组件分类名称
...
...
@@ -22,11 +22,12 @@ namespace Mall.Model.Extend.User
string
str
=
""
;
switch
(
this
.
PlugType
)
{
case
1
:
str
=
"基础组件"
;
break
;
case
1
:
str
=
"基础组件"
;
break
;
case
2
:
str
=
"营销组件"
;
break
;
case
3
:
str
=
"其他组件"
;
break
;
case
3
:
str
=
"其它组件"
;
break
;
case
4
:
str
=
"表单组件"
;
break
;
}
return
str
;
return
str
;
}
}
...
...
@@ -34,5 +35,10 @@ namespace Mall.Model.Extend.User
/// 商城编号
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 查询插件类型【查询使用】
/// </summary>
public
string
QPlugTypeStr
{
get
;
set
;
}
}
}
Mall.Module.TradePavilion/CustomFormModule.cs
0 → 100644
View file @
c687a920
using
Mall.Model.Extend.TradePavilion
;
using
Mall.Repository.TradePavilion
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.AOP.CustomerAttribute
;
using
Mall.Common.Enum
;
using
VT.FW.DB
;
namespace
Mall.Module.TradePavilion
{
/// <summary>
/// 自定义表单处理类
/// </summary>
public
class
CustomFormModule
{
/// <summary>
/// 自定义表单仓储层对象
/// </summary>
private
readonly
RB_Custom_FormRepository
custom_FormRepository
=
new
RB_Custom_FormRepository
();
/// <summary>
/// 获取自定义表单分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Custom_Form_Extend
>
GetCustomFormPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Custom_Form_Extend
query
)
{
return
custom_FormRepository
.
GetCustomFormPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
}
/// <summary>
/// 获取自定义表单列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Custom_Form_Extend
>
GetCustomFormListModule
(
RB_Custom_Form_Extend
query
)
{
return
custom_FormRepository
.
GetCustomFormListRepository
(
query
);
}
/// <summary>
/// 新增修改自定义表单
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[
TransactionCallHandler
]
public
virtual
bool
SetCustomFormModule
(
RB_Custom_Form_Extend
model
)
{
bool
flag
=
false
;
if
(
model
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Custom_Form_Extend
.
FormName
),
model
.
FormName
.
Trim
()},
{
nameof
(
RB_Custom_Form_Extend
.
FormType
),
model
.
FormType
},
{
nameof
(
RB_Custom_Form_Extend
.
FormData
),
model
.
FormData
},
{
nameof
(
RB_Custom_Form_Extend
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Custom_Form_Extend
.
UpdateDate
),
model
.
UpdateDate
},
};
custom_FormRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Custom_Form_Extend
.
Id
),
model
.
Id
));
}
else
{
var
newId
=
custom_FormRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
flag
=
newId
>
0
;
}
return
flag
;
}
/// <summary>
/// 根据编号获取自定义表单
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
RB_Custom_Form_Extend
GetCustomFormModule
(
object
Id
)
{
var
extModel
=
custom_FormRepository
.
GetEntity
<
RB_Custom_Form_Extend
>(
Id
);
return
extModel
;
}
/// <summary>
/// 根据编号删除自定义表单
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
bool
RemoveCustomFormModule
(
int
Id
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Custom_Form_Extend
.
Status
),(
int
)
DateStateEnum
.
Delete
}
};
return
custom_FormRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Custom_Form_Extend
.
Id
),
Id
));
}
}
}
Mall.Repository/TradePavilion/RB_Custom_FormRepository.cs
0 → 100644
View file @
c687a920
using
Mall.Common.Enum
;
using
Mall.Model.Entity.TradePavilion
;
using
Mall.Model.Extend.TradePavilion
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Mall.Repository.TradePavilion
{
/// <summary>
/// 自定义表单仓储层
/// </summary>
public
class
RB_Custom_FormRepository
:
BaseRepository
<
RB_Custom_Form
>
{
/// <summary>
/// 获取自定义表单分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Custom_Form_Extend
>
GetCustomFormPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Custom_Form_Extend
query
)
{
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Custom_Form AS A
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Custom_Form_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Custom_Form_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Custom_Form_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
FormName
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @FormName "
,
nameof
(
RB_Custom_Form_Extend
.
FormName
));
parameters
.
Add
(
"FormName"
,
"%"
+
query
.
FormName
.
Trim
()
+
"%"
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Custom_Form_Extend
.
Id
),
query
.
Id
);
}
}
return
GetPage
<
RB_Custom_Form_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
/// 获取自定义表单列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Custom_Form_Extend
>
GetCustomFormListRepository
(
RB_Custom_Form_Extend
query
)
{
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Custom_Form AS A
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Custom_Form_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Custom_Form_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Custom_Form_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
FormName
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @FormName "
,
nameof
(
RB_Custom_Form_Extend
.
FormName
));
parameters
.
Add
(
"FormName"
,
"%"
+
query
.
FormName
.
Trim
()
+
"%"
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Custom_Form_Extend
.
Id
),
query
.
Id
);
}
if
(
query
.
FormType
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Custom_Form_Extend
.
FormType
),
(
int
)
query
.
FormType
);
}
}
return
Get
<
RB_Custom_Form_Extend
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
Mall.Repository/User/RB_PlugInRepository.cs
View file @
c687a920
...
...
@@ -31,6 +31,10 @@ WHERE 1=1 AND A.Status=0 ");
{
builder
.
AppendFormat
(
@" AND A.PlugId IN(SELECT PlugId FROM rb_tenant_plug WHERE TenantId={0}) "
,
query
.
TenantId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QPlugTypeStr
))
{
builder
.
AppendFormat
(
@" AND A.{0} IN({1}) "
,
nameof
(
RB_PlugIn_Extend
.
PlugType
),
query
.
QPlugTypeStr
);
}
}
return
Get
<
RB_PlugIn_Extend
>(
builder
.
ToString
()).
ToList
();
}
...
...
@@ -67,6 +71,10 @@ WHERE 1=1 AND A.Status=0 ");
{
builder
.
AppendFormat
(
@" AND {0}={1} "
,
nameof
(
RB_PlugIn_Extend
.
PlugId
),
query
.
PlugId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QPlugTypeStr
))
{
builder
.
AppendFormat
(
@" AND {0} IN({1}) "
,
nameof
(
RB_PlugIn_Extend
.
PlugType
),
query
.
QPlugTypeStr
);
}
}
return
GetPage
<
RB_PlugIn_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
...
...
Mall.WebApi/Controllers/MallBase/CustomFormController.cs
0 → 100644
View file @
c687a920
using
Mall.Common.API
;
using
Mall.Common.Plugin
;
using
Mall.Model.Extend.TradePavilion
;
using
Mall.Module.TradePavilion
;
using
Mall.WebApi.Filter
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Mvc
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
Mall.WebApi.Controllers.MallBase
{
[
Route
(
"api/[controller]/[action]"
)]
[
ApiExceptionFilter
]
[
ApiController
]
[
EnableCors
(
"AllowCors"
)]
public
class
CustomFormController
:
BaseController
{
/// <summary>
/// 自定义表单处理类对象
/// </summary>
private
readonly
CustomFormModule
customFormModule
=
new
CustomFormModule
();
/// <summary>
/// 获取自定义表单分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetCustomFormPage
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Custom_Form_Extend
()
{
FormName
=
parms
.
GetStringValue
(
"FormName"
),
FormType
=
(
Common
.
Enum
.
TradePavilion
.
CustomFormTypeEnum
)
parms
.
GetInt
(
"FormType"
)
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
customFormModule
.
GetCustomFormPageModule
(
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>
[
HttpPost
]
public
ApiResult
GetCustomFormList
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Custom_Form_Extend
()
{
FormName
=
parms
.
GetStringValue
(
"FormName"
),
FormType
=
(
Common
.
Enum
.
TradePavilion
.
CustomFormTypeEnum
)
parms
.
GetInt
(
"FormType"
)
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
customFormModule
.
GetCustomFormListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 新增修改自定义表单
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetCustomForm
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
model
=
new
RB_Custom_Form_Extend
()
{
Id
=
parms
.
GetInt
(
"Id"
),
FormName
=
parms
.
GetStringValue
(
"FormName"
),
FormType
=
(
Common
.
Enum
.
TradePavilion
.
CustomFormTypeEnum
)
parms
.
GetInt
(
"FormType"
)
};
var
formData
=
parms
.
GetStringValue
(
"FormData"
);
model
.
MallBaseId
=
RequestParm
.
MallBaseId
;
model
.
TenantId
=
RequestParm
.
TenantId
;
model
.
CreateBy
=
base
.
UserInfo
.
TenantId
;
model
.
UpdateBy
=
base
.
UserInfo
.
TenantId
;
model
.
CreateDate
=
DateTime
.
Now
;
model
.
UpdateDate
=
DateTime
.
Now
;
model
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
var
flag
=
customFormModule
.
SetCustomFormModule
(
model
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 根据编号编号获取自定义表单
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetCustomForm
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
Id
=
parms
.
GetInt
(
"Id"
);
var
extModel
=
customFormModule
.
GetCustomFormModule
(
Id
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 根据编号删除自定义表单
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveCustomeForm
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
Id
=
parms
.
GetInt
(
"Id"
);
var
flag
=
customFormModule
.
RemoveCustomFormModule
(
Id
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取自定义表单类型
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetCustomType
()
{
var
list
=
EnumHelper
.
EnumToList
(
typeof
(
Common
.
Enum
.
TradePavilion
.
CustomFormTypeEnum
));
return
ApiResult
.
Success
(
data
:
list
);
}
}
}
Mall.WebApi/Controllers/Product/ProductController.cs
View file @
c687a920
...
...
@@ -3090,6 +3090,7 @@ namespace Mall.WebApi.Controllers.MallBase
demodel
.
SourceMallBaseId
=
parms
.
MallBaseId
;
demodel
.
SourceTenantId
=
parms
.
TenantId
;
demodel
.
CreateBy
=
-
1
;
decimal
MinProfitRate
=
0
;
if
(
demodel
.
TenantId
==
1
)
{
...
...
@@ -3214,7 +3215,7 @@ namespace Mall.WebApi.Controllers.MallBase
item
.
SpecificationPriceList
.
ForEach
(
x
=>
x
.
CreateDate
=
System
.
DateTime
.
Now
);
item
.
SpecificationPriceList
.
ForEach
(
x
=>
x
.
MallBaseId
=
RequestParm
.
MallBaseId
);
model
=
item
;
model
.
SourceTenantId
=
TenantId
;
model
.
SourceMallBaseId
=
MallBaseId
;
model
.
TenantId
=
RequestParm
.
TenantId
;
...
...
Mall.WebApi/Controllers/User/MContentController.cs
View file @
c687a920
...
...
@@ -682,7 +682,9 @@ namespace Mall.WebApi.Controllers.User
public
ApiResult
GetTenantPlugList
()
{
List
<
object
>
result
=
new
List
<
object
>();
var
plugList
=
plugInModule
.
GetPlugInListModule
(
new
RB_PlugIn_Extend
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
QPlugTypeStr
=
parms
.
GetStringValue
(
"QPlugTypeStr"
);
var
plugList
=
plugInModule
.
GetPlugInListModule
(
new
RB_PlugIn_Extend
()
{
QPlugTypeStr
=
QPlugTypeStr
});
if
(
plugList
!=
null
&&
plugList
.
Count
>
0
)
{
var
tenantPlugList
=
tenantPlugModule
.
GetTenantPlugListModule
(
new
RB_Tenant_Plug_Extend
{
TenantId
=
RequestParm
.
TenantId
});
...
...
@@ -751,7 +753,16 @@ namespace Mall.WebApi.Controllers.User
/// <returns></returns>
public
ApiResult
SetPlugIn
()
{
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_PlugIn_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
jobj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
extModel
=
new
RB_PlugIn_Extend
()
{
PlugId
=
jobj
.
GetInt
(
"PlugId"
),
PlugType
=
jobj
.
GetInt
(
"PlugType"
),
Id
=
jobj
.
GetStringValue
(
"Id"
),
Name
=
jobj
.
GetStringValue
(
"Name"
),
Icon
=
jobj
.
GetStringValue
(
"Icon"
),
QPlugTypeStr
=
""
,
};
extModel
.
Status
=
0
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
var
flag
=
plugInModule
.
SetPlugInModule
(
extModel
);
...
...
Mall.WebApi/Controllers/User/TenantController.cs
View file @
c687a920
...
...
@@ -1825,9 +1825,11 @@ namespace Mall.WebApi.Controllers.User
/// <returns></returns>
public
ApiResult
GetPlugInList
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
extModel
=
new
RB_PlugIn_Extend
()
{
TenantId
=
RequestParm
.
TenantId
TenantId
=
RequestParm
.
TenantId
,
QPlugTypeStr
=
parms
.
GetStringValue
(
"QPlugTypeStr"
),
};
var
list
=
plugInModule
.
GetPlugInListModule
(
extModel
);
var
distinctList
=
list
.
GroupBy
(
qitem
=>
new
{
qitem
.
PlugType
,
qitem
.
GroupName
}).
Select
(
qitem
=>
new
{
qitem
.
Key
.
PlugType
,
qitem
.
Key
.
GroupName
});
...
...
Mall.WebApi/Mall.WebApi.csproj.user
View file @
c687a920
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"Current"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<Controller_SelectedScaffolderID>
Api
ControllerEmptyScaffolder
</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>
root/Controller
</Controller_SelectedScaffolderCategoryPath>
<Controller_SelectedScaffolderID>
Mvc
ControllerEmptyScaffolder
</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>
root/Co
mmon/MVC/Co
ntroller
</Controller_SelectedScaffolderCategoryPath>
<WebStackScaffolding_ControllerDialogWidth>
600
</WebStackScaffolding_ControllerDialogWidth>
<WebStackScaffolding_IsLayoutPageSelected>
True
</WebStackScaffolding_IsLayoutPageSelected>
<WebStackScaffolding_IsPartialViewSelected>
False
</WebStackScaffolding_IsPartialViewSelected>
<WebStackScaffolding_IsReferencingScriptLibrariesSelected>
True
</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
<WebStackScaffolding_LayoutPageFile
/>
<WebStackScaffolding_IsAsyncSelected>
False
</WebStackScaffolding_IsAsyncSelected>
<NameOfLastUsedPublishProfile>
FolderProfile
</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>
E:\Work\Git_Project\Mall_Api\Mall.WebApi\Properties\PublishProfiles\FolderProfile.pubxml
</NameOfLastUsedPublishProfile>
<ShowAllFiles>
false
</ShowAllFiles>
</PropertyGroup>
</Project>
\ 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