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
e0dda873
Commit
e0dda873
authored
Aug 10, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品修改
parent
c220f5d9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
15 deletions
+81
-15
RB_Groupbuy_Activity.cs
Mall.Model/Entity/Product/RB_Groupbuy_Activity.cs
+31
-4
RB_Miniprogram_Template_Extend.cs
.../Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
+5
-0
RB_Groupbuy_Activity_Extend.cs
Mall.Model/Extend/Product/RB_Groupbuy_Activity_Extend.cs
+1
-5
GroupBuyConfigActivityModule.cs
Mall.Module.Product/GroupBuyConfigActivityModule.cs
+6
-1
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+24
-1
RB_Groupbuy_ActivityRepository.cs
Mall.Repository/Product/RB_Groupbuy_ActivityRepository.cs
+1
-1
ProductController.cs
Mall.WebApi/Controllers/Product/ProductController.cs
+13
-3
No files found.
Mall.Model/Entity/Product/RB_Groupbuy_Activity.cs
View file @
e0dda873
...
...
@@ -38,14 +38,41 @@ namespace Mall.Model.Entity.Product
public
int
GoodsStatus
{
get
;
set
;
}
/// <summary>
///
排序
///
售价
/// </summary>
public
int
Sort
{
get
;
set
;
}
public
decimal
SellingPrice
{
get
;
set
;
}
/// <summary>
///
售
价
///
原
价
/// </summary>
public
decimal
SellingPrice
{
get
;
set
;
}
public
decimal
Original_Price
{
get
;
set
;
}
/// <summary>
/// 商品总库存
/// </summary>
public
int
Goods_Stock
{
get
;
set
;
}
/// <summary>
/// 商品默认规格
/// </summary>
public
string
Goods_unit
{
get
;
set
;
}
/// <summary>
/// 商品货号
/// </summary>
public
string
Goods_no
{
get
;
set
;
}
/// <summary>
/// 商品重量
/// </summary>
public
string
Goods_weight
{
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
int
Sort
{
get
;
set
;
}
/// <summary>
/// 是否开启虚拟成团(1-开启)
...
...
Mall.Model/Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
View file @
e0dda873
...
...
@@ -295,6 +295,11 @@ namespace Mall.Model.Extend.MarketingCenter
/// 左右边距
/// </summary>
public
string
leftAndRight
{
get
;
set
;
}
/// <summary>
/// 背景颜色
/// </summary>
public
string
background
{
get
;
set
;
}
}
/// <summary>
...
...
Mall.Model/Extend/Product/RB_Groupbuy_Activity_Extend.cs
View file @
e0dda873
...
...
@@ -53,11 +53,7 @@ namespace Mall.Model.Extend.Product
}
}
/// <summary>
/// 商品库存
/// </summary>
public
decimal
Goods_stock
{
get
;
set
;
}
/// <summary>
/// 活动开始时间
/// </summary>
...
...
Mall.Module.Product/GroupBuyConfigActivityModule.cs
View file @
e0dda873
...
...
@@ -67,8 +67,13 @@ namespace Mall.Module.Product
{
nameof
(
RB_Groupbuy_Activity_Extend
.
EndTime
),
extModel
.
EndTime
},
{
nameof
(
RB_Groupbuy_Activity_Extend
.
GoodId
),
extModel
.
GoodId
},
{
nameof
(
RB_Groupbuy_Activity_Extend
.
GoodsStatus
),
extModel
.
GoodsStatus
},
{
nameof
(
RB_Groupbuy_Activity_Extend
.
Sort
),
extModel
.
Sort
},
{
nameof
(
RB_Groupbuy_Activity_Extend
.
SellingPrice
),
extModel
.
SellingPrice
},
{
nameof
(
RB_Groupbuy_Activity_Extend
.
Original_Price
),
extModel
.
Original_Price
},
{
nameof
(
RB_Groupbuy_Activity_Extend
.
Goods_Stock
),
extModel
.
Goods_Stock
},
{
nameof
(
RB_Groupbuy_Activity_Extend
.
Goods_unit
),
extModel
.
Goods_unit
},
{
nameof
(
RB_Groupbuy_Activity_Extend
.
Goods_no
),
extModel
.
Goods_no
},
{
nameof
(
RB_Groupbuy_Activity_Extend
.
Goods_weight
),
extModel
.
Goods_weight
},
{
nameof
(
RB_Groupbuy_Activity_Extend
.
Sort
),
extModel
.
Sort
},
{
nameof
(
RB_Groupbuy_Activity_Extend
.
Is_Auto_Add_Robot
),
extModel
.
Is_Auto_Add_Robot
},
{
nameof
(
RB_Groupbuy_Activity_Extend
.
Virtual_Sales
),
extModel
.
Virtual_Sales
},
{
nameof
(
RB_Groupbuy_Activity_Extend
.
Is_Alone_Buy
),
extModel
.
Is_Alone_Buy
},
...
...
Mall.Module.Product/ProductModule.cs
View file @
e0dda873
...
...
@@ -3405,8 +3405,9 @@ namespace Mall.Module.Product
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="demodel"></param>
/// <param name="IsGetSpec">是否获取规格</param>
/// <returns></returns>
public
List
<
RB_Goods_Extend
>
GetProductGoodsPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_Extend
demodel
)
public
List
<
RB_Goods_Extend
>
GetProductGoodsPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_Extend
demodel
,
int
IsGetSpec
=
0
)
{
var
list
=
goodsRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
count
,
demodel
);
if
(
list
.
Any
())
...
...
@@ -3415,6 +3416,16 @@ namespace Mall.Module.Product
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
});
var
olist
=
goods_OrderRepository
.
GetGoodsOrderNum
(
ids
);
//规格列表
List
<
RB_Goods_Specification_Extend
>
SpecificationList
=
new
List
<
RB_Goods_Specification_Extend
>();
//规格值
List
<
RB_Goods_SpecificationValue_Extend
>
svlist
=
new
List
<
RB_Goods_SpecificationValue_Extend
>();
if
(
IsGetSpec
==
1
)
{
SpecificationList
=
goods_SpecificationRepository
.
GetList
(
new
RB_Goods_Specification_Extend
()
{
GoodsIds
=
ids
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
svlist
=
goods_SpecificationValueRepository
.
GetList
(
new
RB_Goods_SpecificationValue_Extend
()
{
GoodsIds
=
ids
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
}
foreach
(
var
item
in
list
)
{
item
.
CategoryList
=
clist
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
ToList
();
...
...
@@ -3429,7 +3440,19 @@ namespace Mall.Module.Product
}
item
.
GoodsBuyNum
=
olist
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
FirstOrDefault
()?.
OrderNum
??
0
;
if
(
IsGetSpec
==
1
)
{
item
.
SpecificationList
=
SpecificationList
?.
Where
(
qitem
=>
qitem
.
GoodsId
==
item
.
Id
)?.
ToList
()??
new
List
<
RB_Goods_Specification_Extend
>();
if
(
item
.
SpecificationList
!=
null
&&
item
.
SpecificationList
.
Count
>
0
)
{
foreach
(
var
subItem
in
item
.
SpecificationList
)
{
subItem
.
SpecificationValueList
=
svlist
.
Where
(
x
=>
x
.
SpecificationId
==
subItem
.
Id
).
ToList
();
}
}
}
}
}
return
list
;
}
...
...
Mall.Repository/Product/RB_Groupbuy_ActivityRepository.cs
View file @
e0dda873
...
...
@@ -24,7 +24,7 @@ namespace Mall.Repository.Product
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,B.Name AS QGoodName,B.CarouselImage AS CarouselImage
,B.InventoryNum AS Goods_stock
SELECT A.*,B.Name AS QGoodName,B.CarouselImage AS CarouselImage
FROM RB_Groupbuy_Activity AS A LEFT JOIN rb_goods AS B ON A.GoodId=B.Id
WHERE 1=1
"
);
...
...
Mall.WebApi/Controllers/Product/ProductController.cs
View file @
e0dda873
...
...
@@ -1376,10 +1376,11 @@ namespace Mall.WebApi.Controllers.MallBase
var
parms
=
RequestParm
;
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
parms
.
msg
.
ToString
());
RB_Goods_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Extend
>(
parms
.
msg
.
ToString
());
JObject
parameters
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
int
IsGetSpec
=
parameters
.
GetInt
(
"IsGetSpec"
,
0
);
demodel
.
TenantId
=
parms
.
TenantId
;
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
var
list
=
productModule
.
GetProductGoodsPageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
var
list
=
productModule
.
GetProductGoodsPageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
,
IsGetSpec
:
IsGetSpec
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
x
=>
new
{
...
...
@@ -1388,7 +1389,16 @@ namespace Mall.WebApi.Controllers.MallBase
x
.
CoverImage
,
x
.
SellingPrice
,
x
.
SalesNum
,
CategoryList
=
x
.
CategoryList
.
Select
(
y
=>
new
{
y
.
Id
,
y
.
CategoryName
})
CategoryList
=
x
.
CategoryList
.
Select
(
y
=>
new
{
y
.
Id
,
y
.
CategoryName
}),
x
.
InventoryNum
,
x
.
Sort
,
x
.
OriginalPrice
,
x
.
DefaultSpecificationName
,
x
.
GoodsNumbers
,
x
.
GoodsWeight
,
x
.
IsDefaultService
,
x
.
GoodsService
,
x
.
SpecificationList
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
...
...
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