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
2ef5972d
Commit
2ef5972d
authored
Aug 17, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
eddebdbe
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
213 additions
and
78 deletions
+213
-78
RB_Goods_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Extend.cs
+12
-1
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+2
-0
RB_GoodsRepository.cs
Mall.Repository/Product/RB_GoodsRepository.cs
+10
-1
ProductController.cs
Mall.WebApi/Controllers/Product/ProductController.cs
+189
-76
No files found.
Mall.Model/Extend/Product/RB_Goods_Extend.cs
View file @
2ef5972d
...
...
@@ -58,7 +58,7 @@ namespace Mall.Model.Extend.Product
/// 教师id
/// </summary>
public
int
TeacherId
{
get
;
set
;
}
#
region
司导信息
/// <summary>
...
...
@@ -218,6 +218,12 @@ namespace Mall.Model.Extend.Product
/// 商品ids
/// </summary>
public
string
GoodsIds
{
get
;
set
;
}
/// <summary>
/// 分享来源商品ids
/// </summary>
public
string
SourceGoodsIdIds
{
get
;
set
;
}
/// <summary>
/// 商品str
/// </summary>
...
...
@@ -359,6 +365,11 @@ namespace Mall.Model.Extend.Product
/// 门店名称
/// </summary>
public
List
<
string
>
StoreNameList
{
get
;
set
;
}
/// <summary>
/// 供应商名称
/// </summary>
public
string
SupplierName
{
get
;
set
;
}
}
/// <summary>
...
...
Mall.Module.Product/ProductModule.cs
View file @
2ef5972d
...
...
@@ -7214,6 +7214,7 @@ namespace Mall.Module.Product
{
nameof
(
RB_Goods
.
FatCode
),
demodel
.
FatCode
},
{
nameof
(
RB_Goods
.
GoodsUrl
),
demodel
.
GoodsUrl
},
{
nameof
(
RB_Goods
.
goodsLogo
),
demodel
.
goodsLogo
},
{
nameof
(
RB_Goods
.
RetailStore
),
demodel
.
RetailStore
},
};
if
(
goodsModel
.
IsProcurement
==
1
)
{
...
...
@@ -7251,6 +7252,7 @@ namespace Mall.Module.Product
{
nameof
(
RB_Goods
.
EnjoyMember
),
demodel
.
EnjoyMember
},
{
nameof
(
RB_Goods
.
SeparateSetMember
),
demodel
.
SeparateSetMember
},
{
nameof
(
RB_Goods
.
IsQuickBuy
),
demodel
.
IsQuickBuy
},
{
nameof
(
RB_Goods
.
RetailStore
),
demodel
.
RetailStore
},
};
}
...
...
Mall.Repository/Product/RB_GoodsRepository.cs
View file @
2ef5972d
...
...
@@ -103,6 +103,10 @@ namespace Mall.Repository.Product
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
SupplierId
)}
=
{
dmodel
.
SupplierId
}
"
;
}
if
(
dmodel
.
CreateBy
>
-
1
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
CreateBy
)}
=
{
dmodel
.
CreateBy
}
"
;
}
if
(
dmodel
.
MinProfitRate
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
MinProfitRate
)}
<
{
dmodel
.
MinProfitRate
}
"
;
...
...
@@ -160,8 +164,9 @@ namespace Mall.Repository.Product
orderBy
=
" g.InventoryNum desc"
;
}
string
sql
=
$@"select g.* from RB_Goods g
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
();
}
...
...
@@ -579,6 +584,10 @@ where {where} group by g.Id order by {orderBy}";
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
Id
)}
in(
{
dmodel
.
GoodsIds
}
)"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
SourceGoodsIdIds
))
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
SourceGoodsId
)}
in(
{
dmodel
.
SourceGoodsIdIds
}
)"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
StoresIds
))
{
where
+=
$@" and locate(',
{
dmodel
.
StoresIds
}
,', CONCAT(',',g.
{
nameof
(
RB_Goods_Extend
.
StoresIds
)}
,',') )"
;
...
...
Mall.WebApi/Controllers/Product/ProductController.cs
View file @
2ef5972d
This diff is collapsed.
Click to expand it.
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