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
/// </summary>
public
class
TradeActivityItem
{
/// <summary>
///
活动编号
///
分组名称
/// </summary>
public
string
ActivityIds
{
get
;
set
;
}
public
string
GroupName
{
get
;
set
;
}
/// <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
break
;
//首店活动
case
"tradeActivity"
:
TradeActivityItem
tradeActivityItem
=
new
TradeActivityItem
();
List
<
TradeActivityItem
>
tradeActivityItemList
=
new
List
<
TradeActivityItem
>
();
try
{
var
tradeActivity
=
JsonHelper
.
DeserializeObject
<
TradeActivityItem
>(
item
.
data
.
ToString
());
if
(
tradeActivity
!=
null
)
var
tradeActivity
List
=
JsonHelper
.
DeserializeObject
<
List
<
TradeActivityItem
>
>(
item
.
data
.
ToString
());
if
(
tradeActivity
List
!=
null
&&
tradeActivityList
.
Count
>
0
)
{
tradeActivityItem
.
ActivityIds
=
tradeActivity
?.
ActivityIds
??
""
;
tradeActivityItem
.
DefaultActivityId
=
tradeActivity
?.
DefaultActivityId
??
""
;
foreach
(
var
tItem
in
tradeActivityList
)
{
var
tradeActivityModel
=
new
TradeActivityItem
()
{
GroupName
=
tItem
?.
GroupName
??
""
,
DateStr
=
tItem
?.
DateStr
??
""
,
IsDefaultActivity
=
tItem
?.
IsDefaultActivity
??
0
,
NewActivitys
=
tItem
?.
NewActivitys
??
""
};
tradeActivityItemList
.
Add
(
tradeActivityModel
);
}
}
}
catch
{
}
item
.
data
=
tradeActivityItem
;
item
.
data
=
tradeActivityItem
List
;
break
;
}
}
...
...
Mall.WebApi/Controllers/Mall/MallHelper.cs
View file @
26736e77
...
...
@@ -1999,33 +1999,69 @@ namespace Mall.WebApi.Controllers
break
;
//首店活动组件
case
"tradeActivity"
:
var
tradeActivityData
=
subItem
.
data
as
TradeActivityItem
;
var
activityList
=
commerceActivityModule
.
GetCommerceActivityListModule
(
new
RB_Commerce_Activity_Extend
()
{
TenantId
=
TenantId
,
ActivityIds
=
tradeActivityData
.
ActivityIds
},
isGetSignUp
:
true
);
var
tradeActivityData
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
TradeActivityItem
>>(
Common
.
Plugin
.
JsonHelper
.
Serialize
(
subItem
.
data
));
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
,
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
=
aItem
.
Id
.
ToString
().
Equals
(
tradeActivityData
.
DefaultActivityId
),
IsCheck
=
aItem
.
Id
.
ToString
().
Equals
(
tradeActivityData
.
DefaultActivityId
),
IsSign
=
aItem
.
CommerceConsultList
!=
null
&&
aItem
.
CommerceConsultList
.
Count
>
0
,
};
activityDataList
.
Add
(
aObj
);
var
aItem
=
activityList
?.
Where
(
qitem
=>
qitem
.
Id
.
ToString
()
==
tItem
.
NewActivitys
)?.
FirstOrDefault
();
var
defatltData
=
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
=
aItem
.
Id
.
ToString
().
Equals
(
tItem
.
NewActivitys
),
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
...
...
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