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
23c97c57
Commit
23c97c57
authored
Oct 29, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
6bce9490
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
253 additions
and
23 deletions
+253
-23
RB_Miniprogram_Template_Extend.cs
.../Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
+6
-1
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+43
-0
RB_GoodsRepository.cs
Mall.Repository/Product/RB_GoodsRepository.cs
+156
-9
MallHelper.cs
Mall.WebApi/Controllers/Mall/MallHelper.cs
+21
-13
ProductController.cs
Mall.WebApi/Controllers/Product/ProductController.cs
+27
-0
No files found.
Mall.Model/Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
View file @
23c97c57
...
...
@@ -2665,7 +2665,7 @@ namespace Mall.Model.Extend.MarketingCenter
/// <summary>
/// 商品列表
/// </summary>
public
List
<
GoodsDetailsItem2
>
goodsList
{
get
;
set
;
}
public
List
<
Store
GoodsDetailsItem2
>
goodsList
{
get
;
set
;
}
}
/// <summary>
...
...
@@ -2699,6 +2699,11 @@ namespace Mall.Model.Extend.MarketingCenter
/// </summary>
public
decimal
OriginalPrice
{
get
;
set
;
}
/// <summary>
/// 是否选择服务人员(0-不选,1-选择)前端使用
/// </summary>
public
int
IsChooseServicePerson
{
get
;
set
;
}
/// <summary>
/// 课程评分 2020-10-13 ld
/// </summary>
...
...
Mall.Module.Product/ProductModule.cs
View file @
23c97c57
...
...
@@ -4945,6 +4945,49 @@ namespace Mall.Module.Product
return
list
;
}
/// <summary>
/// 获取下拉列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_Extend
>
GetProductGoodsDialogList_V3
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_Extend
demodel
)
{
var
list
=
goodsRepository
.
GetProductGoodsDialogList_V3
(
pageIndex
,
pageSize
,
out
count
,
demodel
);
if
(
list
.
Any
())
{
//查询分类
string
ids
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Id
));
var
clist
=
goods_CategoryRepository
.
GetList
(
new
RB_Goods_Category_Extend
()
{
GoodsIds
=
ids
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
foreach
(
var
item
in
list
)
{
item
.
CategoryList
=
clist
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
ToList
();
//轮播图
item
.
CoverImage
=
""
;
item
.
CarouselImageList
=
new
List
<
RB_ImageCommonModel
>();
if
(!
string
.
IsNullOrEmpty
(
item
.
CarouselImage
)
&&
item
.
CarouselImage
!=
"[]"
)
{
List
<
string
>
CarouselIdList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
item
.
CarouselImage
);
//封面图
item
.
CoverImage
=
CarouselIdList
[
0
];
//轮播图
//轮播图
foreach
(
var
qitem
in
CarouselIdList
)
{
item
.
CarouselImageList
.
Add
(
new
RB_ImageCommonModel
()
{
Id
=
0
,
Name
=
""
,
Path
=
qitem
});
}
}
}
}
return
list
;
}
/// <summary>
/// 获取后台商品分页列表
...
...
Mall.Repository/Product/RB_GoodsRepository.cs
View file @
23c97c57
This diff is collapsed.
Click to expand it.
Mall.WebApi/Controllers/Mall/MallHelper.cs
View file @
23c97c57
...
...
@@ -88,7 +88,7 @@ namespace Mall.WebApi.Controllers
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
public
static
object
PlusDataToObject
(
ComponentItem
subItem
,
int
TenantId
,
int
MallBaseId
,
int
SmallShopsId
,
int
IsOpenSchool
)
public
static
object
PlusDataToObject
(
ComponentItem
subItem
,
int
TenantId
,
int
MallBaseId
,
int
SmallShopsId
,
int
IsOpenSchool
,
int
StoreId
)
{
var
obj
=
new
object
();
switch
(
subItem
.
Id
)
...
...
@@ -855,13 +855,14 @@ namespace Mall.WebApi.Controllers
GoodsIds
=
Ids
,
GoodsStatus
=
1
,
GoodsClassify
=
3
,
//查询非司导
GoodsPageType
=
IsOpenSchool
==
1
?
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
School
:
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
Mall
StoresIds
=
StoreId
.
ToString
()
// GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall
},
SmallShopsId
:
SmallShopsId
);
List
<
GoodsDetailsItem2
>
newGoodsList
=
new
List
<
GoodsDetailsItem2
>();
List
<
StoreGoodsDetailsItem2
>
newGoodsList
=
new
List
<
Store
GoodsDetailsItem2
>();
foreach
(
var
goodItem
in
childItem
.
goodsList
)
{
var
lastItem
=
new
GoodsDetailsItem2
();
var
lastItem
=
new
Store
GoodsDetailsItem2
();
var
tempGood
=
tempGoodsList
?.
Where
(
qitem
=>
qitem
.
Id
==
goodItem
.
id
)?.
FirstOrDefault
();
if
(
tempGood
!=
null
&&
tempGood
.
Id
>
0
)
{
...
...
@@ -871,6 +872,7 @@ namespace Mall.WebApi.Controllers
lastItem
.
picUrl
=
tempGood
?.
CoverImage
!=
null
?
Common
.
Config
.
GetFileUrl
(
tempGood
.
CoverImage
)
:
""
;
lastItem
.
OriginalPrice
=
Math
.
Round
((
tempGood
?.
OriginalPrice
??
0
),
2
);
lastItem
.
courseScore
=
(
tempGood
.
CourseScore
??
0
);
lastItem
.
IsChooseServicePerson
=
tempGood
.
IsChooseServicePerson
;
newGoodsList
.
Add
(
lastItem
);
}
}
...
...
@@ -880,7 +882,7 @@ namespace Mall.WebApi.Controllers
//自动添加商品
else
{
childItem
.
goodsList
=
new
List
<
GoodsDetailsItem2
>();
childItem
.
goodsList
=
new
List
<
Store
GoodsDetailsItem2
>();
var
catGoodsList
=
productModule
.
GetProductGoodsPageList_V2
(
1
,
childItem
.
goodsNum
,
out
long
rowsCount
,
new
Model
.
Extend
.
Product
.
RB_Goods_Extend
()
{
TenantId
=
TenantId
,
...
...
@@ -888,20 +890,22 @@ namespace Mall.WebApi.Controllers
CategoryIds
=
childItem
.
id
.
ToString
(),
GoodsStatus
=
1
,
GoodsClassify
=
3
,
//查询非司导
GoodsPageType
=
IsOpenSchool
==
1
?
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
School
:
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
Mall
StoresIds
=
StoreId
.
ToString
()
// GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall
},
SmallShopsId
:
SmallShopsId
);
if
(
catGoodsList
!=
null
&&
catGoodsList
.
Count
>
0
)
{
foreach
(
var
gItem
in
catGoodsList
)
{
childItem
.
goodsList
.
Add
(
new
GoodsDetailsItem2
()
childItem
.
goodsList
.
Add
(
new
Store
GoodsDetailsItem2
()
{
id
=
gItem
.
Id
,
price
=
Math
.
Round
((
gItem
?.
SellingPrice
??
0
),
2
),
name
=
gItem
.
Name
,
picUrl
=
Common
.
Config
.
GetFileUrl
(
gItem
.
CoverImage
),
OriginalPrice
=
Math
.
Round
((
gItem
?.
OriginalPrice
??
0
),
2
),
courseScore
=
gItem
.
CourseScore
??
0
courseScore
=
gItem
.
CourseScore
??
0
,
IsChooseServicePerson
=
gItem
.
IsChooseServicePerson
});
}
}
...
...
@@ -921,8 +925,9 @@ namespace Mall.WebApi.Controllers
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
,
GoodsStatus
=
1
,
GoodsClassify
=
3
,
//查询非司导
GoodsPageType
=
IsOpenSchool
==
1
?
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
School
:
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
Mall
GoodsClassify
=
3
,
//查询非司导
StoresIds
=
StoreId
.
ToString
()
// GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall
});
#
region
微店价格
RB_SmallShops_Info_Extend
smallModel
=
new
RB_SmallShops_Info_Extend
();
...
...
@@ -1027,8 +1032,9 @@ namespace Mall.WebApi.Controllers
name
=
gItem
.
Name
,
picUrl
=
Common
.
Config
.
GetFileUrl
(
gItem
.
CoverImage
),
OriginalPrice
=
Math
.
Round
((
gItem
?.
OriginalPrice
??
0
),
2
),
courseScore
=
gItem
.
CourseScore
??
0
});
courseScore
=
gItem
.
CourseScore
??
0
,
IsChooseServicePerson
=
gItem
.
IsChooseServicePerson
});
}
}
}
...
...
@@ -1045,7 +1051,8 @@ namespace Mall.WebApi.Controllers
GoodsIds
=
Ids
,
GoodsStatus
=
1
,
GoodsClassify
=
3
,
//查询非司导
GoodsPageType
=
IsOpenSchool
==
1
?
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
School
:
Common
.
Enum
.
Goods
.
GoodsPageTypeEnum
.
Mall
StoresIds
=
StoreId
.
ToString
()
// GoodsPageType = IsOpenSchool == 1 ? Common.Enum.Goods.GoodsPageTypeEnum.School : Common.Enum.Goods.GoodsPageTypeEnum.Mall
});
#
region
微店价格
RB_SmallShops_Info_Extend
smallModel
=
new
RB_SmallShops_Info_Extend
();
...
...
@@ -1152,6 +1159,7 @@ namespace Mall.WebApi.Controllers
childItem
.
picUrl
=
tempGood
?.
CoverImage
!=
null
?
Common
.
Config
.
GetFileUrl
(
tempGood
.
CoverImage
)
:
""
;
childItem
.
OriginalPrice
=
Math
.
Round
((
tempGood
?.
OriginalPrice
??
0
),
2
);
childItem
.
courseScore
=
(
tempGood
.
CourseScore
??
0
);
childItem
.
IsChooseServicePerson
=
tempGood
.
IsChooseServicePerson
;
newGoodsList
.
Add
(
childItem
);
}
}
...
...
Mall.WebApi/Controllers/Product/ProductController.cs
View file @
23c97c57
...
...
@@ -1472,6 +1472,33 @@ namespace Mall.WebApi.Controllers.MallBase
}
/// <summary>
/// 获取商品列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetProductGoodsDialogList_V3
()
{
var
parms
=
RequestParm
;
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
parms
.
msg
.
ToString
());
RB_Goods_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Extend
>(
parms
.
msg
.
ToString
());
demodel
.
TenantId
=
parms
.
TenantId
;
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
var
list
=
productModule
.
GetProductGoodsDialogList_V3
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
Name
,
x
.
CoverImage
,
x
.
CarouselImageList
,
x
.
SellingPrice
,
CategoryList
=
x
.
CategoryList
.
Select
(
y
=>
new
{
y
.
Id
,
y
.
CategoryName
})
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
/// <summary>
/// 获取商品列表
/// </summary>
...
...
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