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
26736e77
Commit
26736e77
authored
Sep 07, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
e5295f14
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
33 deletions
+90
-33
RB_Miniprogram_Template_Extend.cs
.../Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
+15
-4
MiniprogramTemplateModule.cs
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
+16
-6
MallHelper.cs
Mall.WebApi/Controllers/Mall/MallHelper.cs
+59
-23
No files found.
Mall.Model/Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
View file @
26736e77
...
@@ -3997,14 +3997,25 @@ namespace Mall.Model.Extend.MarketingCenter
...
@@ -3997,14 +3997,25 @@ namespace Mall.Model.Extend.MarketingCenter
/// </summary>
/// </summary>
public
class
TradeActivityItem
public
class
TradeActivityItem
{
{
/// <summary>
/// <summary>
///
活动编号
///
分组名称
/// </summary>
/// </summary>
public
string
ActivityIds
{
get
;
set
;
}
public
string
GroupName
{
get
;
set
;
}
/// <summary>
/// <summary>
///
默认活动编号
///
时间
/// </summary>
/// </summary>
public
string
DefaultActivityId
{
get
;
set
;
}
public
string
DateStr
{
get
;
set
;
}
/// <summary>
/// 是否默认活动(1-是)
/// </summary>
public
int
IsDefaultActivity
{
get
;
set
;
}
/// <summary>
/// 新活动编号
/// </summary>
public
string
NewActivitys
{
get
;
set
;
}
}
}
}
}
\ No newline at end of file
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
View file @
26736e77
...
@@ -966,20 +966,30 @@ namespace Mall.Module.MarketingCenter
...
@@ -966,20 +966,30 @@ namespace Mall.Module.MarketingCenter
break
;
break
;
//首店活动
//首店活动
case
"tradeActivity"
:
case
"tradeActivity"
:
TradeActivityItem
tradeActivityItem
=
new
TradeActivityItem
();
List
<
TradeActivityItem
>
tradeActivityItemList
=
new
List
<
TradeActivityItem
>
();
try
try
{
{
var
tradeActivity
=
JsonHelper
.
DeserializeObject
<
TradeActivityItem
>(
item
.
data
.
ToString
());
var
tradeActivity
List
=
JsonHelper
.
DeserializeObject
<
List
<
TradeActivityItem
>
>(
item
.
data
.
ToString
());
if
(
tradeActivity
!=
null
)
if
(
tradeActivity
List
!=
null
&&
tradeActivityList
.
Count
>
0
)
{
{
tradeActivityItem
.
ActivityIds
=
tradeActivity
?.
ActivityIds
??
""
;
foreach
(
var
tItem
in
tradeActivityList
)
tradeActivityItem
.
DefaultActivityId
=
tradeActivity
?.
DefaultActivityId
??
""
;
{
var
tradeActivityModel
=
new
TradeActivityItem
()
{
GroupName
=
tItem
?.
GroupName
??
""
,
DateStr
=
tItem
?.
DateStr
??
""
,
IsDefaultActivity
=
tItem
?.
IsDefaultActivity
??
0
,
NewActivitys
=
tItem
?.
NewActivitys
??
""
};
tradeActivityItemList
.
Add
(
tradeActivityModel
);
}
}
}
}
}
catch
catch
{
{
}
}
item
.
data
=
tradeActivityItem
;
item
.
data
=
tradeActivityItem
List
;
break
;
break
;
}
}
}
}
...
...
Mall.WebApi/Controllers/Mall/MallHelper.cs
View file @
26736e77
...
@@ -1999,33 +1999,69 @@ namespace Mall.WebApi.Controllers
...
@@ -1999,33 +1999,69 @@ namespace Mall.WebApi.Controllers
break
;
break
;
//首店活动组件
//首店活动组件
case
"tradeActivity"
:
case
"tradeActivity"
:
var
tradeActivityData
=
subItem
.
data
as
TradeActivityItem
;
var
tradeActivityData
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
TradeActivityItem
>>(
Common
.
Plugin
.
JsonHelper
.
Serialize
(
subItem
.
data
));
var
activityList
=
commerceActivityModule
.
GetCommerceActivityListModule
(
new
RB_Commerce_Activity_Extend
()
{
TenantId
=
TenantId
,
ActivityIds
=
tradeActivityData
.
ActivityIds
},
isGetSignUp
:
true
);
List
<
object
>
activityDataList
=
new
List
<
object
>();
List
<
object
>
activityDataList
=
new
List
<
object
>();
if
(
activityList
!=
null
&&
activityList
.
Count
>
0
)
if
(
tradeActivityData
!=
null
&&
tradeActivityData
.
Count
>
0
)
{
{
foreach
(
var
aItem
in
activityList
)
string
ActivityIds
=
string
.
Join
(
","
,
tradeActivityData
.
Where
(
qitem
=>!
string
.
IsNullOrEmpty
(
qitem
.
NewActivitys
)).
Select
(
qitem
=>
qitem
.
NewActivitys
.
Replace
(
","
,
","
)));
var
activityList
=
commerceActivityModule
.
GetCommerceActivityListModule
(
new
RB_Commerce_Activity_Extend
()
{
TenantId
=
TenantId
,
ActivityIds
=
ActivityIds
},
isGetSignUp
:
true
);
if
(
activityList
!=
null
&&
activityList
.
Count
>
0
)
{
{
var
aObj
=
new
foreach
(
var
tItem
in
tradeActivityData
.
Where
(
qitem
=>
qitem
.
IsDefaultActivity
==
1
))
{
{
aItem
.
Id
,
var
aItem
=
activityList
?.
Where
(
qitem
=>
qitem
.
Id
.
ToString
()
==
tItem
.
NewActivitys
)?.
FirstOrDefault
();
aItem
.
ActivityName
,
var
defatltData
=
new
StartTime
=
Common
.
ConvertHelper
.
FormatTime
(
aItem
.
StartTime
),
{
EndTime
=
Common
.
ConvertHelper
.
FormatTime
(
aItem
.
EndTime
),
aItem
.
Id
,
aItem
.
CoverImg
,
aItem
.
ActivityName
,
aItem
.
ActivityType
,
StartTime
=
Common
.
ConvertHelper
.
FormatTime
(
aItem
.
StartTime
),
aItem
.
ActivityTypeName
,
EndTime
=
Common
.
ConvertHelper
.
FormatTime
(
aItem
.
EndTime
),
SignStartTime
=
Common
.
ConvertHelper
.
FormatTime
(
aItem
.
SignStartTime
),
aItem
.
CoverImg
,
SignEndTime
=
Common
.
ConvertHelper
.
FormatTime
(
aItem
.
SignEndTime
),
aItem
.
ActivityType
,
IsDefault
=
aItem
.
Id
.
ToString
().
Equals
(
tradeActivityData
.
DefaultActivityId
),
aItem
.
ActivityTypeName
,
IsCheck
=
aItem
.
Id
.
ToString
().
Equals
(
tradeActivityData
.
DefaultActivityId
),
SignStartTime
=
Common
.
ConvertHelper
.
FormatTime
(
aItem
.
SignStartTime
),
IsSign
=
aItem
.
CommerceConsultList
!=
null
&&
aItem
.
CommerceConsultList
.
Count
>
0
,
SignEndTime
=
Common
.
ConvertHelper
.
FormatTime
(
aItem
.
SignEndTime
),
};
IsDefault
=
aItem
.
Id
.
ToString
().
Equals
(
tItem
.
NewActivitys
),
activityDataList
.
Add
(
aObj
);
IsCheck
=
aItem
.
Id
.
ToString
().
Equals
(
tItem
.
NewActivitys
),
IsSign
=
aItem
.
CommerceConsultList
!=
null
&&
aItem
.
CommerceConsultList
.
Count
>
0
,
};
var
aObj
=
new
{
GroupName
=
tItem
.
GroupName
,
tItem
.
DateStr
,
DataList
=
new
List
<
object
>()
{
defatltData
}
};
activityDataList
.
Add
(
aObj
);
}
foreach
(
var
tItem
in
tradeActivityData
.
Where
(
qitem
=>
qitem
.
IsDefaultActivity
!=
1
))
{
var
aList
=
activityList
?.
Where
(
qitem
=>
tItem
.
NewActivitys
.
Contains
(
qitem
.
Id
.
ToString
()))?.
ToList
();
var
aObj
=
new
{
GroupName
=
tItem
.
GroupName
,
tItem
.
DateStr
,
DataList
=
aList
?.
Select
(
aItem
=>
new
{
aItem
.
Id
,
aItem
.
ActivityName
,
StartTime
=
Common
.
ConvertHelper
.
FormatTime
(
aItem
.
StartTime
),
EndTime
=
Common
.
ConvertHelper
.
FormatTime
(
aItem
.
EndTime
),
aItem
.
CoverImg
,
aItem
.
ActivityType
,
aItem
.
ActivityTypeName
,
SignStartTime
=
Common
.
ConvertHelper
.
FormatTime
(
aItem
.
SignStartTime
),
SignEndTime
=
Common
.
ConvertHelper
.
FormatTime
(
aItem
.
SignEndTime
),
IsDefault
=
false
,
IsCheck
=
false
,
IsSign
=
aItem
.
CommerceConsultList
!=
null
&&
aItem
.
CommerceConsultList
.
Count
>
0
,
})
};
activityDataList
.
Add
(
aObj
);
}
}
}
}
}
obj
=
new
obj
=
new
...
...
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