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
4cc78c3c
Commit
4cc78c3c
authored
Mar 09, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
ac2d991d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
119 additions
and
13 deletions
+119
-13
RB_Miniprogram_Template_Extend.cs
.../Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
+37
-13
RB_Commerce_ActivityType_Extend.cs
...l/Extend/TradePavilion/RB_Commerce_ActivityType_Extend.cs
+5
-0
MiniprogramTemplateModule.cs
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
+25
-0
RB_Commerce_ActivityTypeRepository.cs
...itory/TradePavilion/RB_Commerce_ActivityTypeRepository.cs
+4
-0
MallHelper.cs
Mall.WebApi/Controllers/Mall/MallHelper.cs
+48
-0
No files found.
Mall.Model/Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
View file @
4cc78c3c
...
...
@@ -3175,18 +3175,6 @@ namespace Mall.Model.Extend.MarketingCenter
{
/// <summary>
/// 商品数量
/// </summary>
public
int
goodsLength
{
get
;
set
;
}
/// <summary>
/// 商品添加方式【0-自定义,1-最新】
/// </summary>
public
int
addGoodsType
{
get
;
set
;
}
/// <summary>
/// 列表样式[-1-列表模式,0-左右滑动,1-一行一个]
/// </summary>
...
...
@@ -3231,8 +3219,44 @@ namespace Mall.Model.Extend.MarketingCenter
/// <summary>
/// 自定义列表
/// </summary>
public
List
<
CustomDetailsItem2
>
list
{
get
;
set
;
}
public
List
<
MiAiActivityTypeModel
>
list
{
get
;
set
;
}
}
/// <summary>
/// 商品详情项
/// </summary>
public
class
MiAiActivityTypeModel
{
/// <summary>
/// 商品编号
/// </summary>
public
int
id
{
get
;
set
;
}
/// <summary>
/// 标题
/// </summary>
public
string
name
{
get
;
set
;
}
/// <summary>
/// 副标题
/// </summary>
public
string
lableName
{
get
;
set
;
}
/// <summary>
/// 副标题
/// </summary>
public
List
<
string
>
lableNameList
{
get
;
set
;
}
/// <summary>
/// 商品图片
/// </summary>
public
string
picUrl
{
get
;
set
;
}
}
#
endregion
}
\ No newline at end of file
Mall.Model/Extend/TradePavilion/RB_Commerce_ActivityType_Extend.cs
View file @
4cc78c3c
...
...
@@ -11,5 +11,10 @@ namespace Mall.Model.Extend.TradePavilion
public
class
RB_Commerce_ActivityType_Extend
:
RB_Commerce_ActivityType
{
public
List
<
string
>
LableNameList
{
get
;
set
;
}
/// <summary>
/// ids
/// </summary>
public
string
Ids
{
get
;
set
;
}
}
}
\ No newline at end of file
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
View file @
4cc78c3c
...
...
@@ -649,6 +649,31 @@ namespace Mall.Module.MarketingCenter
}
item
.
data
=
miaiUserItem
;
break
;
case
"miaiactivitytype"
:
MiAiActivityTypeItem
miAiActivityTypeItem
=
new
MiAiActivityTypeItem
();
try
{
var
driveData
=
JsonHelper
.
DeserializeObject
<
MiAiActivityTypeItem
>(
item
.
data
.
ToString
());
if
(
driveData
!=
null
)
{
miAiActivityTypeItem
.
listStyle
=
driveData
?.
listStyle
??
1
;
miAiActivityTypeItem
.
backgroundColor
=
driveData
?.
backgroundColor
??
""
;
miAiActivityTypeItem
.
PaddingTop
=
driveData
?.
PaddingTop
??
"0"
;
miAiActivityTypeItem
.
PaddingBottom
=
driveData
?.
PaddingBottom
??
"0"
;
miAiActivityTypeItem
.
PaddingLeft
=
driveData
?.
PaddingLeft
??
"0"
;
miAiActivityTypeItem
.
PaddingRight
=
driveData
?.
PaddingRight
??
"0"
;
miAiActivityTypeItem
.
SearchFilletPX
=
driveData
?.
SearchFilletPX
??
0
;
miAiActivityTypeItem
.
list
=
new
List
<
MiAiActivityTypeModel
>();
miAiActivityTypeItem
.
list
=
driveData
.
list
;
}
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"miaiuser"
);
}
item
.
data
=
miAiActivityTypeItem
;
break
;
//导航-页面
case
"nav-page"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
navPageItem
>(
item
.
data
.
ToString
());
break
;
...
...
Mall.Repository/TradePavilion/RB_Commerce_ActivityTypeRepository.cs
View file @
4cc78c3c
...
...
@@ -90,6 +90,10 @@ WHERE 1=1
builder
.
AppendFormat
(
" AND {0} LIKE @Name "
,
nameof
(
RB_Commerce_ActivityType_Extend
.
TypeName
));
parameters
.
Add
(
"Name"
,
"%"
+
query
.
TypeName
.
Trim
()
+
"%"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
Ids
))
{
builder
.
AppendFormat
(
$@" AND
{
nameof
(
RB_Commerce_ActivityType_Extend
.
Id
)}
in (
{
query
.
Ids
}
) "
);
}
}
return
Get
<
RB_Commerce_ActivityType_Extend
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
...
...
Mall.WebApi/Controllers/Mall/MallHelper.cs
View file @
4cc78c3c
...
...
@@ -97,6 +97,9 @@ namespace Mall.WebApi.Controllers
/// </summary>
private
static
Module
.
Miai
.
MiaiModule
miaiModule
=
new
Module
.
Miai
.
MiaiModule
();
private
static
Module
.
TradePavilion
.
CommerceActivityModule
commerceActivityModule
=
new
Module
.
TradePavilion
.
CommerceActivityModule
();
/// <summary>
/// 解析插件数据为对象
/// </summary>
...
...
@@ -1417,6 +1420,51 @@ namespace Mall.WebApi.Controllers
data
=
miAiUserItem
};
break
;
case
"miaiactivitytype"
:
var
miAiActivityTypeItemInfo
=
subItem
.
data
as
MiAiActivityTypeItem
;
if
(
miAiActivityTypeItemInfo
!=
null
)
{
//自定义商品
if
(
miAiActivityTypeItemInfo
.
list
!=
null
&&
miAiActivityTypeItemInfo
.
list
.
Count
>
0
)
{
var
Ids
=
"0,"
+
string
.
Join
(
","
,
miAiActivityTypeItemInfo
.
list
.
Select
(
qitem
=>
qitem
.
id
));
var
tempGoodsList
=
commerceActivityModule
.
GetCommerceActivityTypeListModule
(
new
Mall
.
Model
.
Extend
.
TradePavilion
.
RB_Commerce_ActivityType_Extend
()
{
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
,
Ids
=
Ids
});
List
<
MiAiActivityTypeModel
>
newTeacherList
=
new
List
<
MiAiActivityTypeModel
>();
foreach
(
var
goodItem
in
miAiActivityTypeItemInfo
.
list
)
{
var
lastItem
=
new
MiAiActivityTypeModel
();
var
tempGood
=
tempGoodsList
?.
Where
(
qitem
=>
qitem
.
Id
==
goodItem
.
id
)?.
FirstOrDefault
();
if
(
tempGood
!=
null
&&
tempGood
.
Id
>
0
)
{
lastItem
.
id
=
tempGood
.
Id
;
lastItem
.
name
=
tempGood
.
TypeName
;
lastItem
.
lableName
=
tempGood
.
LableName
;
lastItem
.
picUrl
=
tempGood
.
CoverImage
;
if
(!
string
.
IsNullOrWhiteSpace
(
lastItem
.
lableName
))
{
lastItem
.
lableNameList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
lastItem
.
lableName
);
}
newTeacherList
.
Add
(
lastItem
);
}
}
miAiActivityTypeItemInfo
.
list
=
newTeacherList
;
}
}
obj
=
new
{
id
=
subItem
.
Id
,
data
=
miAiActivityTypeItemInfo
};
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