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
ead1308c
Commit
ead1308c
authored
Aug 31, 2021
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
19c88040
fa3bc33e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
959 additions
and
278 deletions
+959
-278
RB_Miniprogram_Template_Extend.cs
.../Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
+723
-266
RB_Brand_Extend.cs
Mall.Model/Extend/TradePavilion/RB_Brand_Extend.cs
+8
-5
RB_Carrier_Extend.cs
Mall.Model/Extend/TradePavilion/RB_Carrier_Extend.cs
+5
-1
RB_Custom_Form_Extend.cs
Mall.Model/Extend/TradePavilion/RB_Custom_Form_Extend.cs
+46
-0
MiniprogramTemplateModule.cs
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
+27
-0
CarrierModule.cs
Mall.Module.TradePavilion/CarrierModule.cs
+3
-0
CustomFormModule.cs
Mall.Module.TradePavilion/CustomFormModule.cs
+55
-5
RB_BrandRepository.cs
Mall.Repository/TradePavilion/RB_BrandRepository.cs
+10
-0
RB_CarrierRepository.cs
Mall.Repository/TradePavilion/RB_CarrierRepository.cs
+5
-0
MallHelper.cs
Mall.WebApi/Controllers/Mall/MallHelper.cs
+77
-1
No files found.
Mall.Model/Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
View file @
ead1308c
This diff is collapsed.
Click to expand it.
Mall.Model/Extend/TradePavilion/RB_Brand_Extend.cs
View file @
ead1308c
...
...
@@ -28,11 +28,6 @@ namespace Mall.Model.Extend.TradePavilion
public
string
QBrandIds
{
get
;
set
;
}
public
List
<
string
>
BannerList
{
get
;
set
;
}
/// <summary>
/// 商铺性质
/// </summary>
//public string ProjectName { get { return Common.Plugin.EnumHelper.GetEnumName(this.ProjectType); } }
/// <summary>
...
...
@@ -84,5 +79,13 @@ namespace Mall.Model.Extend.TradePavilion
/// </summary>
public
List
<
RB_FirstShop_ListEnroll_Extend
>
ListEnroll
{
get
;
set
;
}
/// 排序(1-默认,2主键倒序)
/// </summary>
public
int
QOrderBy
{
get
;
set
;
}
/// <summary>
/// 取几天数据
/// </summary>
public
int
QTop
{
get
;
set
;
}
}
}
Mall.Model/Extend/TradePavilion/RB_Carrier_Extend.cs
View file @
ead1308c
...
...
@@ -30,7 +30,7 @@ namespace Mall.Model.Extend.TradePavilion
public
List
<
string
>
BannerList
{
get
;
set
;
}
/// <summary>
/// 排序
/// 排序
(1-创建时间倒序,2-开业时间倒序)
/// </summary>
public
int
OrderBy
{
get
;
set
;
}
...
...
@@ -74,6 +74,10 @@ namespace Mall.Model.Extend.TradePavilion
public
string
UserIcon
{
get
;
set
;
}
/// <summary>
/// 查询多少条数据
/// </summary>
public
int
QTop
{
get
;
set
;
}
/// 载体ids
/// </summary>
public
string
QCarrierIds
{
get
;
set
;
}
...
...
Mall.Model/Extend/TradePavilion/RB_Custom_Form_Extend.cs
View file @
ead1308c
...
...
@@ -59,6 +59,16 @@ namespace Mall.Model.Extend.TradePavilion
/// 是否必填
/// </summary>
public
bool
IsRequire
{
get
;
set
;
}
/// <summary>
/// 文本值
/// </summary>
public
string
TextValue
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
public
string
Remark
{
get
;
set
;
}
}
/// <summary>
...
...
@@ -85,6 +95,32 @@ namespace Mall.Model.Extend.TradePavilion
/// 是否必填
/// </summary>
public
bool
IsRequire
{
get
;
set
;
}
/// <summary>
/// 选项列表
/// </summary>
public
List
<
SelectOption
>
OptionList
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
public
string
Remark
{
get
;
set
;
}
}
/// <summary>
/// 选项列表
/// </summary>
public
class
SelectOption
{
/// <summary>
/// 编号
/// </summary>
public
string
Id
{
get
;
set
;
}
/// <summary>
/// 名称
/// </summary>
public
string
Name
{
get
;
set
;
}
}
/// <summary>
...
...
@@ -106,6 +142,16 @@ namespace Mall.Model.Extend.TradePavilion
/// 上传文件大小M
/// </summary>
public
int
FileSizeLimit
{
get
;
set
;
}
/// <summary>
/// 上传文件列表
/// </summary>
public
List
<
string
>
FileList
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
public
string
Remark
{
get
;
set
;
}
}
}
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
View file @
ead1308c
...
...
@@ -937,6 +937,33 @@ namespace Mall.Module.MarketingCenter
//导航-页面
case
"nav-page"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
navPageItem
>(
item
.
data
.
ToString
());
break
;
//首店-自定义列表
case
"tradePavilionCustom"
:
educationCustomItem
tradePavilionCustomModel
=
new
educationCustomItem
();
try
{
var
tradeData
=
JsonHelper
.
DeserializeObject
<
educationCustomItem
>(
item
.
data
.
ToString
());
if
(
tradeData
!=
null
)
{
tradePavilionCustomModel
.
goodsLength
=
tradeData
?.
goodsLength
??
1
;
tradePavilionCustomModel
.
addGoodsType
=
tradeData
?.
addGoodsType
??
1
;
tradePavilionCustomModel
.
goodType
=
tradeData
?.
goodType
??
1
;
tradePavilionCustomModel
.
listStyle
=
tradeData
?.
listStyle
??
1
;
tradePavilionCustomModel
.
backgroundColor
=
tradeData
?.
backgroundColor
??
""
;
tradePavilionCustomModel
.
PaddingTop
=
tradeData
?.
PaddingTop
??
"0"
;
tradePavilionCustomModel
.
PaddingBottom
=
tradeData
?.
PaddingBottom
??
"0"
;
tradePavilionCustomModel
.
PaddingLeft
=
tradeData
?.
PaddingLeft
??
"0"
;
tradePavilionCustomModel
.
PaddingRight
=
tradeData
?.
PaddingRight
??
"0"
;
tradePavilionCustomModel
.
SearchFilletPX
=
tradeData
?.
SearchFilletPX
??
0
;
tradePavilionCustomModel
.
list
=
new
List
<
CustomDetailsItem2
>();
tradePavilionCustomModel
.
list
=
tradeData
.
list
;
}
}
catch
{
}
item
.
data
=
tradePavilionCustomModel
;
break
;
}
}
...
...
Mall.Module.TradePavilion/CarrierModule.cs
View file @
ead1308c
...
...
@@ -10,6 +10,9 @@ using Mall.Common.Plugin;
namespace
Mall.Module.TradePavilion
{
/// <summary>
/// 载体处理类
/// </summary>
public
class
CarrierModule
{
/// <summary>
...
...
Mall.Module.TradePavilion/CustomFormModule.cs
View file @
ead1308c
...
...
@@ -62,7 +62,6 @@ namespace Mall.Module.TradePavilion
list
.
Add
(
new
WhereHelper
(
nameof
(
RB_Custom_Form_Extend
.
Id
),
model
.
Id
,
OperatorEnum
.
NotEqual
));
}
return
custom_FormRepository
.
Exists
(
list
);
}
/// <summary>
...
...
@@ -105,7 +104,7 @@ namespace Mall.Module.TradePavilion
var
extModel
=
custom_FormRepository
.
GetEntity
<
RB_Custom_Form_Extend
>(
Id
);
if
(
extModel
!=
null
)
{
extModel
.
FormDataList
=
AnalyzeFormComponent
(
extModel
.
FormData
);
extModel
.
FormDataList
=
AnalyzeFormComponent
(
extModel
.
FormData
,
isGetAnswer
:
true
);
}
return
extModel
;
}
...
...
@@ -114,13 +113,13 @@ namespace Mall.Module.TradePavilion
/// 解析表单组件
/// </summary>
/// <param name="formData"></param>
/// <param name="isGetAnswer"></param>
/// <returns></returns>
public
List
<
FormDataItem
>
AnalyzeFormComponent
(
string
formData
)
public
List
<
FormDataItem
>
AnalyzeFormComponent
(
string
formData
,
bool
isGetAnswer
=
false
)
{
List
<
FormDataItem
>
dataList
=
new
List
<
FormDataItem
>();
if
(!
string
.
IsNullOrEmpty
(
formData
))
{
JArray
jArray
=
JArray
.
Parse
(
formData
);
if
(
jArray
!=
null
&&
jArray
.
Count
>
0
)
{
...
...
@@ -145,6 +144,8 @@ namespace Mall.Module.TradePavilion
Name
=
singleObj
.
GetStringValue
(
"Name"
),
WordsLength
=
singleObj
.
GetInt
(
"WordsLength"
),
IsRequire
=
singleObj
.
GetBoolValue
(
"IsRequire"
),
Remark
=
singleObj
.
GetStringValue
(
"Remark"
),
TextValue
=
isGetAnswer
?
singleObj
.
GetStringValue
(
"TextValue"
)
:
""
,
};
dataItem
.
CompData
=
txtItem
;
break
;
...
...
@@ -156,6 +157,8 @@ namespace Mall.Module.TradePavilion
Name
=
multiObj
.
GetStringValue
(
"Name"
),
WordsLength
=
multiObj
.
GetInt
(
"WordsLength"
),
IsRequire
=
multiObj
.
GetBoolValue
(
"IsRequire"
),
Remark
=
multiObj
.
GetStringValue
(
"Remark"
),
TextValue
=
isGetAnswer
?
multiObj
.
GetStringValue
(
"TextValue"
)
:
""
,
};
dataItem
.
CompData
=
multiItem
;
break
;
...
...
@@ -167,8 +170,24 @@ namespace Mall.Module.TradePavilion
Name
=
dropdownObj
.
GetStringValue
(
"Name"
),
IsMultiple
=
dropdownObj
.
GetBoolValue
(
"IsMultiple"
),
IsRequire
=
dropdownObj
.
GetBoolValue
(
"IsRequire"
),
OptionValue
=
""
,
OptionValue
=
isGetAnswer
?
dropdownObj
.
GetStringValue
(
"OptionValue"
)
:
""
,
OptionList
=
new
List
<
SelectOption
>(),
Remark
=
dropdownObj
.
GetStringValue
(
"Remark"
),
};
var
optionList
=
JArray
.
Parse
(
dropdownObj
.
GetStringValue
(
"OptionList"
));
if
(
optionList
!=
null
&&
optionList
.
Count
>
0
)
{
foreach
(
var
oItem
in
optionList
)
{
JObject
optionObj
=
JObject
.
Parse
(
oItem
.
ToString
());
SelectOption
option
=
new
SelectOption
()
{
Id
=
optionObj
.
GetStringValue
(
"Id"
),
Name
=
optionObj
.
GetStringValue
(
"Name"
),
};
selectItem
.
OptionList
.
Add
(
option
);
}
}
dataItem
.
CompData
=
selectItem
;
break
;
//图片上传组件
...
...
@@ -179,7 +198,24 @@ namespace Mall.Module.TradePavilion
Name
=
imgObj
.
GetStringValue
(
"Name"
),
FileCount
=
imgObj
.
GetInt
(
"FileCount"
),
FileSizeLimit
=
imgObj
.
GetInt
(
"FileSizeLimit"
),
Remark
=
imgObj
.
GetStringValue
(
"Remark"
),
FileList
=
new
List
<
string
>(),
};
if
(!
string
.
IsNullOrEmpty
(
imgObj
.
GetStringValue
(
"FileList"
)))
{
try
{
imgItem
.
FileList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
imgObj
.
GetStringValue
(
"FileList"
));
}
catch
{
}
}
if
(!
isGetAnswer
)
{
imgItem
.
FileList
=
new
List
<
string
>();
}
dataItem
.
CompData
=
imgItem
;
break
;
//视频上传组件
...
...
@@ -190,7 +226,21 @@ namespace Mall.Module.TradePavilion
Name
=
videoObj
.
GetStringValue
(
"Name"
),
FileCount
=
videoObj
.
GetInt
(
"FileCount"
),
FileSizeLimit
=
videoObj
.
GetInt
(
"FileSizeLimit"
),
Remark
=
videoObj
.
GetStringValue
(
"Remark"
),
FileList
=
new
List
<
string
>(),
};
try
{
videoItem
.
FileList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
videoObj
.
GetStringValue
(
"FileList"
));
}
catch
{
}
if
(!
isGetAnswer
)
{
videoItem
.
FileList
=
new
List
<
string
>();
}
dataItem
.
CompData
=
videoItem
;
break
;
}
...
...
Mall.Repository/TradePavilion/RB_BrandRepository.cs
View file @
ead1308c
...
...
@@ -300,6 +300,16 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Brand_Extend
.
ProjectType
),
(
int
)
query
.
ProjectType
);
}
}
if
(
query
.
QOrderBy
==
2
)
{
builder
.
AppendFormat
(
" ORDER BY a.{0} DESC "
,
nameof
(
RB_Brand_Extend
.
ID
));
}
if
(
query
.
QTop
>
0
)
{
builder
.
AppendFormat
(
" LIMIT {0} "
,
query
.
QTop
);
}
return
Get
<
RB_Brand_Extend
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
...
...
Mall.Repository/TradePavilion/RB_CarrierRepository.cs
View file @
ead1308c
...
...
@@ -174,6 +174,11 @@ namespace Mall.Repository.TradePavilion
{
builder
.
Append
(
$" order by
{
nameof
(
RB_Carrier_Extend
.
OpenTime
)}
desc"
);
}
if
(
query
.
QTop
>
0
)
{
builder
.
Append
(
$" LIMIT
{
query
.
QTop
}
"
);
}
}
return
Get
<
RB_Carrier_Extend
>(
builder
.
ToString
()).
ToList
();
}
...
...
Mall.WebApi/Controllers/Mall/MallHelper.cs
View file @
ead1308c
using
Mall.Common.Enum.MallBase
;
using
Mall.Common.Plugin
;
using
Mall.Model.Entity.BaseSetUp
;
using
Mall.Model.Entity.MarketingCenter
;
using
Mall.Model.Extend.BaseSetUp
;
using
Mall.Model.Extend.MarketingCenter
;
using
Mall.Model.Extend.Miai
;
using
Mall.Model.Extend.Product
;
using
Mall.Model.Extend.TradePavilion
;
using
Mall.Model.Extend.User
;
using
Mall.Module.BaseSetUp
;
using
Mall.Module.MarketingCenter
;
using
Mall.Module.Product
;
using
Mall.Module.Reserve
;
using
Mall.Module.TradePavilion
;
using
Mall.Module.User
;
using
Mall.Repository.Miai
;
using
Mall.Repository.Product
;
...
...
@@ -101,7 +104,12 @@ namespace Mall.WebApi.Controllers
private
static
Module
.
Miai
.
MiaiModule
miaiModule
=
new
Module
.
Miai
.
MiaiModule
();
private
static
Module
.
TradePavilion
.
CommerceActivityModule
commerceActivityModule
=
new
Module
.
TradePavilion
.
CommerceActivityModule
();
private
static
CommerceActivityModule
commerceActivityModule
=
new
CommerceActivityModule
();
/// <summary>
/// 载体处理类对象
/// </summary>
private
static
CarrierModule
carrierModule
=
new
CarrierModule
();
...
...
@@ -1922,6 +1930,74 @@ namespace Mall.WebApi.Controllers
data
=
blindDatePPPlusData
};
break
;
//首店-自定义列表插件
case
"tradePavilionCustom"
:
var
tradeData
=
subItem
.
data
as
educationCustomItem
;
if
(
tradeData
!=
null
)
{
//自动添加
if
(
tradeData
.
addGoodsType
==
0
)
{
tradeData
.
list
=
new
List
<
CustomDetailsItem2
>();
//载体
if
(
tradeData
.
goodType
==
1
)
{
var
carrierList
=
carrierModule
.
GetCarrierList
(
new
RB_Carrier_Extend
()
{
TenantId
=
TenantId
,
OrderBy
=
1
,
QTop
=
tradeData
.
goodsLength
});
foreach
(
var
cItem
in
carrierList
)
{
var
dModel
=
new
CustomDetailsItem2
()
{
id
=
cItem
.
ID
,
name
=
cItem
.
CarrierName
,
picUrl
=
cItem
.
Logo
,
lableName
=
cItem
.
CarrierPlan
,
lableNameList
=
new
List
<
string
>(),
linkUrl
=
string
.
Format
(
"/pages/kotra/carrier/detail?id={0}&&type={1}"
,
cItem
.
ID
,
cItem
.
ProjectType
.
GetEnumName
())
};
tradeData
.
list
.
Add
(
dModel
);
}
}
//品牌
else
if
(
tradeData
.
goodType
==
2
)
{
var
brandList
=
carrierModule
.
GetBrandList_V2
(
new
RB_Brand_Extend
()
{
TenantId
=
TenantId
,
QOrderBy
=
2
,
QTop
=
tradeData
.
goodsLength
});
foreach
(
var
cItem
in
brandList
)
{
var
dModel
=
new
CustomDetailsItem2
()
{
id
=
cItem
.
ID
,
name
=
cItem
.
BrandName
,
picUrl
=
cItem
.
Logo
,
lableName
=
cItem
.
BrandType
,
lableNameList
=
new
List
<
string
>(),
linkUrl
=
string
.
Format
(
"/pages/kotra/brand/detail?id={0}"
,
cItem
.
ID
),
};
tradeData
.
list
.
Add
(
dModel
);
}
}
}
//手动添加
else
{
}
}
obj
=
new
{
id
=
subItem
.
Id
,
data
=
tradeData
};
break
;
}
return
obj
;
}
...
...
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