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
e0efde1a
Commit
e0efde1a
authored
Oct 10, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增字段
parent
f1b81fcd
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
175 additions
and
16 deletions
+175
-16
RB_Goods.cs
Mall.Model/Entity/Product/RB_Goods.cs
+5
-0
RB_Miniprogram_Template_Extend.cs
.../Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
+15
-2
RB_Goods_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Extend.cs
+61
-0
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+34
-4
RB_GoodsRepository.cs
Mall.Repository/Product/RB_GoodsRepository.cs
+39
-3
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+2
-1
MallHelper.cs
Mall.WebApi/Controllers/Mall/MallHelper.cs
+19
-2
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+0
-4
No files found.
Mall.Model/Entity/Product/RB_Goods.cs
View file @
e0efde1a
...
...
@@ -658,5 +658,10 @@ namespace Mall.Model.Entity.Product
/// 耗材对应的ID
/// </summary>
public
int
MaterialId
{
get
;
set
;
}
/// <summary>
/// 教育扩展json对象
/// </summary>
public
string
EduJsonData
{
get
;
set
;
}
}
}
Mall.Model/Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
View file @
e0efde1a
...
...
@@ -1162,6 +1162,11 @@ namespace Mall.Model.Extend.MarketingCenter
/// </summary>
public
string
name
{
get
;
set
;
}
/// <summary>
/// 商品副标
/// </summary>
public
string
subname
{
get
;
set
;
}
/// <summary>
/// 商品图片
/// </summary>
...
...
@@ -1181,6 +1186,16 @@ namespace Mall.Model.Extend.MarketingCenter
/// 课程评分 2020-10-13 ld
/// </summary>
public
decimal
courseScore
{
get
;
set
;
}
/// <summary>
/// 老师头像
/// </summary>
public
string
eduteachericon
{
get
;
set
;
}
/// <summary>
/// 老师名称
/// </summary>
public
string
eduteachername
{
get
;
set
;
}
}
/// <summary>
...
...
@@ -3362,9 +3377,7 @@ namespace Mall.Model.Extend.MarketingCenter
/// <summary>
/// 购买按钮颜色
/// </summary>
#pragma warning disable IDE1006 // 命名样式
public
string
buttonColor
{
get
;
set
;
}
#pragma warning restore IDE1006 // 命名样式
/// <summary>
/// 显示评分 ld 2020-10-13
...
...
Mall.Model/Extend/Product/RB_Goods_Extend.cs
View file @
e0efde1a
...
...
@@ -417,4 +417,65 @@ namespace Mall.Model.Extend.Product
/// </summary>
public
string
ico
{
get
;
set
;
}
}
/// <summary>
/// 商品附加属性
/// </summary>
public
class
GoodsJsonItem
{
/// <summary>
/// 班级编号
/// </summary>
public
int
ClassId
{
get
;
set
;
}
/// <summary>
/// 上课次数
/// </summary>
public
decimal
ClassNum
{
get
;
set
;
}
/// <summary>
/// 上课地址
/// </summary>
public
string
ClassAddress
{
get
;
set
;
}
/// <summary>
/// 上课时间
/// </summary>
public
string
ClassTime
{
get
;
set
;
}
/// <summary>
/// 开班日期
/// </summary>
public
string
OpenTime
{
get
;
set
;
}
/// <summary>
/// 节课日期
/// </summary>
public
string
EndClassDate
{
get
;
set
;
}
/// <summary>
/// 教师名称
/// </summary>
public
string
TeacherName
{
get
;
set
;
}
/// <summary>
/// 教师头像
/// </summary>
public
string
TeacherIcon
{
get
;
set
;
}
/// <summary>
/// 限招人数
/// </summary>
public
int
ClassPersion
{
get
;
set
;
}
/// <summary>
/// 教师介绍
/// </summary>
public
string
TeacherInfo
{
get
;
set
;
}
/// <summary>
/// 截止报名日期
/// </summary>
public
string
EndOrderTime
{
get
;
set
;
}
}
}
Mall.Module.Product/ProductModule.cs
View file @
e0efde1a
...
...
@@ -14,6 +14,7 @@ using Mall.Repository.Product;
using
Mall.Repository.Reserve
;
using
Mall.Repository.User
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
...
...
@@ -2477,9 +2478,16 @@ namespace Mall.Module.Product
}
}
var
goodsRelevanceList
=
goods_RelevanceRepository
.
GetGoodsRelevanceListRepository
(
new
RB_Goods_Relevance_Extend
()
{
MallBaseId
=
model
.
MallBaseId
,
TenantId
=
model
.
TenantId
,
GoodsId
=
model
.
Id
});
List
<
RB_Goods_Preferential_Extend
>
goodsPreferentialList
=
new
List
<
RB_Goods_Preferential_Extend
>();
goodsPreferentialList
=
RB_Goods_PreferentialRepository
.
GetGoodsPreferentialListRepostory
(
new
RB_Goods_Preferential_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
GoodsId
=
model
.
Id
});
//教育商品扩展对象属性
var
eduDataJson
=
ParsingEduJsonModule
(
model
.
EduJsonData
);
return
new
{
goods
=
new
...
...
@@ -2492,14 +2500,18 @@ namespace Mall.Module.Product
categoryIdList
=
model
?.
CategoryList
?.
Select
(
x
=>
x
.
CategoryId
??
0
).
ToList
(),
status
=
model
.
GoodsStatus
,
isAllowShare
=
IsAllowShare
,
//是否可以分享
advertising
=
model
?.
Advertising
??
""
,
//广告词
advertising
=
model
?.
Advertising
??
""
,
//广告词
price
=
model
.
SellingPrice
,
sendArea
=
model
?.
SendArea
??
""
,
sendArea
=
model
?.
SendArea
??
""
,
use_attr
=
model
.
IsCustomSpecification
,
remark
=
model
?.
Remark
??
""
,
edu_data
=
eduDataJson
,
attr_groups
=
model
.
SpecificationList
.
Select
(
x
=>
new
{
attr_group_id
=
x
.
Sort
,
attr_group_name
=
x
.
Name
,
//购买次数(进阶小课堂使用)
service_time
=
model
.
ServiceTime
,
attr_list
=
x
.
SpecificationValueList
.
Select
(
z
=>
new
{
attr_id
=
z
.
Sort
,
...
...
@@ -2507,6 +2519,13 @@ namespace Mall.Module.Product
pic_url
=
z
.
ImagePath
})
}),
goodsRelevanceList
=
goodsRelevanceList
?.
Select
(
qitem
=>
new
{
qitem
.
RelevanceId
,
qitem
.
RelevanceName
,
qitem
.
RelevancePrice
,
qitem
.
Unit
}),
goods_stock
=
model
.
InventoryNum
,
virtual_sales
=
(
model
.
SalesNum
??
0
),
confine_count
=
model
.
LimitBuyGoodsNum
,
...
...
@@ -2635,7 +2654,8 @@ namespace Mall.Module.Product
x
.
PriceMoney
})
},
delivery
=
""
delivery
=
""
,
};
#
endregion
#
endregion
...
...
@@ -6172,6 +6192,16 @@ namespace Mall.Module.Product
return
model
;
}
/// <summary>
/// 解析教育商品对象
/// </summary>
/// <param name="EduJsonData"></param>
/// <returns></returns>
public
GoodsJsonItem
ParsingEduJsonModule
(
string
eduJsonData
)
{
return
goodsRepository
.
ParsingEduJsonRepository
(
eduJsonData
);
}
/// <summary>
/// 保存推荐设置
/// </summary>
...
...
Mall.Repository/Product/RB_GoodsRepository.cs
View file @
e0efde1a
...
...
@@ -5,6 +5,8 @@ using Mall.Model.Entity.Product;
using
Mall.Model.Extend.Product
;
using
System.Linq
;
using
VT.FW.DB.Dapper
;
using
Newtonsoft.Json.Linq
;
using
Mall.Common.Plugin
;
namespace
Mall.Repository.Product
{
...
...
@@ -180,9 +182,10 @@ namespace Mall.Repository.Product
orderBy
=
" g.InventoryNum desc"
;
}
string
sql
=
$@"select g.*,s.`Name` as SupplierName from RB_Goods g
inner join rb_goods_category c on g.Id=c.GoodsId
LEFT JOIN rb_supplier as s on g.SupplierId=s.ID
string
sql
=
$@"
select g.*,s.`Name` as SupplierName
from RB_Goods g inner join rb_goods_category c on g.Id=c.GoodsId
LEFT JOIN rb_supplier as s on g.SupplierId=s.ID
where
{
where
}
group by g.Id order by
{
orderBy
}
"
;
return
GetPage
<
RB_Goods_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
sql
,
parameters
).
ToList
();
}
...
...
@@ -663,6 +666,39 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
return
Get
<
RB_Goods_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// 解析教育商品对象
/// </summary>
/// <param name="EduJsonData"></param>
/// <returns></returns>
public
GoodsJsonItem
ParsingEduJsonRepository
(
string
eduJsonData
)
{
GoodsJsonItem
jsonItem
=
new
GoodsJsonItem
();
try
{
if
(
eduJsonData
!=
null
&&
!
string
.
IsNullOrEmpty
(
eduJsonData
))
{
JObject
jObj
=
JObject
.
Parse
(
eduJsonData
);
jsonItem
.
ClassId
=
jObj
.
GetInt
(
"ClassId"
);
jsonItem
.
ClassNum
=
jObj
.
GetInt
(
"ClassNum"
);
jsonItem
.
ClassAddress
=
jObj
.
GetStringValue
(
"ClassAddress"
);
jsonItem
.
ClassTime
=
jObj
.
GetStringValue
(
"ClassTime"
);
jsonItem
.
OpenTime
=
jObj
.
GetStringValue
(
"OpenTime"
);
jsonItem
.
EndClassDate
=
jObj
.
GetStringValue
(
"EndClassDate"
);
jsonItem
.
TeacherName
=
jObj
.
GetStringValue
(
"TeacherName"
);
jsonItem
.
TeacherIcon
=
jObj
.
GetStringValue
(
"TeacherIcon"
);
jsonItem
.
ClassPersion
=
jObj
.
GetInt
(
"ClassPersion"
);
jsonItem
.
TeacherInfo
=
jObj
.
GetStringValue
(
"TeacherInfo"
);
jsonItem
.
EndOrderTime
=
jObj
.
GetStringValue
(
"EndOrderTime"
);
}
}
catch
{
}
return
jsonItem
;
}
/// <summary>
/// 获取列表
/// </summary>
...
...
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
e0efde1a
...
...
@@ -73,7 +73,8 @@ namespace Mall.WebApi.Controllers.MallBase
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetHome
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
...
...
Mall.WebApi/Controllers/Mall/MallHelper.cs
View file @
e0efde1a
...
...
@@ -1869,12 +1869,17 @@ namespace Mall.WebApi.Controllers
var
tempGood
=
tempGoodsList
?.
Where
(
qitem
=>
qitem
.
Id
==
goodItem
.
id
)?.
FirstOrDefault
();
if
(
tempGood
!=
null
&&
tempGood
.
Id
>
0
)
{
var
eduJson
=
productModule
.
ParsingEduJsonModule
(
tempGood
.
EduJsonData
);
lastItem
.
id
=
tempGood
.
Id
;
lastItem
.
name
=
tempGood
.
Name
;
lastItem
.
subname
=
tempGood
?.
SubName
??
""
;
lastItem
.
price
=
Math
.
Round
((
tempGood
?.
SellingPrice
??
0
),
2
);
lastItem
.
picUrl
=
tempGood
?.
CoverImage
!=
null
?
Common
.
Config
.
GetFileUrl
(
tempGood
.
CoverImage
)
:
""
;
lastItem
.
OriginalPrice
=
Math
.
Round
((
tempGood
?.
OriginalPrice
??
0
),
2
);
lastItem
.
courseScore
=
(
tempGood
.
CourseScore
??
0
);
//HK 2022-10-10新增字段
lastItem
.
eduteachericon
=
eduJson
?.
TeacherIcon
??
""
;
lastItem
.
eduteachername
=
eduJson
?.
TeacherName
??
""
;
newGoodsList
.
Add
(
lastItem
);
}
}
...
...
@@ -1900,14 +1905,18 @@ namespace Mall.WebApi.Controllers
{
foreach
(
var
gItem
in
catGoodsList
)
{
var
eduJson
=
productModule
.
ParsingEduJsonModule
(
gItem
.
EduJsonData
);
childItem
.
goodsList
.
Add
(
new
GoodsDetailsItem2
()
{
id
=
gItem
.
Id
,
price
=
Math
.
Round
((
gItem
?.
SellingPrice
??
0
),
2
),
name
=
gItem
.
Name
,
subname
=
gItem
.
SubName
,
picUrl
=
Common
.
Config
.
GetFileUrl
(
gItem
.
CoverImage
),
OriginalPrice
=
Math
.
Round
((
gItem
?.
OriginalPrice
??
0
),
2
),
courseScore
=
gItem
.
CourseScore
??
0
courseScore
=
gItem
.
CourseScore
??
0
,
eduteachericon
=
eduJson
?.
TeacherIcon
??
""
,
eduteachername
=
eduJson
?.
TeacherName
??
""
,
});
}
}
...
...
@@ -2028,14 +2037,18 @@ namespace Mall.WebApi.Controllers
{
foreach
(
var
gItem
in
goodsList
)
{
var
eduJson
=
productModule
.
ParsingEduJsonModule
(
gItem
.
EduJsonData
);
goodsData
.
list
.
Add
(
new
GoodsDetailsItem2
()
{
id
=
gItem
.
Id
,
price
=
Math
.
Round
((
gItem
?.
SellingPrice
??
0
),
2
),
name
=
gItem
.
Name
,
subname
=
gItem
.
SubName
,
picUrl
=
Common
.
Config
.
GetFileUrl
(
gItem
.
CoverImage
),
OriginalPrice
=
Math
.
Round
((
gItem
?.
OriginalPrice
??
0
),
2
),
courseScore
=
gItem
.
CourseScore
??
0
courseScore
=
gItem
.
CourseScore
??
0
,
eduteachericon
=
eduJson
?.
TeacherIcon
??
""
,
eduteachername
=
eduJson
?.
TeacherName
??
""
,
});
}
}
...
...
@@ -2155,12 +2168,16 @@ namespace Mall.WebApi.Controllers
var
tempGood
=
tempGoodsList
?.
Where
(
qitem
=>
qitem
.
Id
==
goodItem
.
id
)?.
FirstOrDefault
();
if
(
tempGood
!=
null
&&
tempGood
.
Id
>
0
)
{
var
eduJson
=
productModule
.
ParsingEduJsonModule
(
tempGood
.
EduJsonData
);
childItem
.
id
=
tempGood
.
Id
;
childItem
.
name
=
tempGood
?.
Name
??
""
;
childItem
.
subname
=
tempGood
?.
SubName
??
""
;
childItem
.
price
=
Math
.
Round
((
tempGood
?.
SellingPrice
??
0
),
2
);
childItem
.
picUrl
=
tempGood
?.
CoverImage
!=
null
?
Common
.
Config
.
GetFileUrl
(
tempGood
.
CoverImage
)
:
""
;
childItem
.
OriginalPrice
=
Math
.
Round
((
tempGood
?.
OriginalPrice
??
0
),
2
);
childItem
.
courseScore
=
(
tempGood
.
CourseScore
??
0
);
childItem
.
eduteachericon
=
eduJson
?.
TeacherIcon
??
""
;
childItem
.
eduteachername
=
eduJson
?.
TeacherName
??
""
;
newGoodsList
.
Add
(
childItem
);
}
}
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
e0efde1a
...
...
@@ -778,7 +778,6 @@ namespace Mall.WebApi.Controllers.MallBase
public
ApiResult
SetOfflineOrderServicepersion
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
OrderId
=
parms
.
GetInt
(
"OrderId"
);
int
ServicepersonalId
=
parms
.
GetInt
(
"ServicepersonalId"
);
...
...
@@ -1043,7 +1042,6 @@ namespace Mall.WebApi.Controllers.MallBase
public
ApiResult
GetAppletMyOrderAfterSaleInfo
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
OrderDetailId
=
parms
.
GetInt
(
"OrderDetailId"
,
0
);
if
(
OrderDetailId
<=
0
)
...
...
@@ -1148,14 +1146,12 @@ namespace Mall.WebApi.Controllers.MallBase
public
ApiResult
GetAppletOrderBuyerToDeliverInfo
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
ReOrderId
=
parms
.
GetInt
(
"ReOrderId"
,
0
);
if
(
ReOrderId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
return
orderModule
.
GetAppletOrderBuyerToDeliverInfo
(
ReOrderId
);
}
...
...
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