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
f1b81fcd
Commit
f1b81fcd
authored
Oct 09, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增关联商品
parent
8db879f8
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
175 additions
and
36 deletions
+175
-36
.editorconfig
.editorconfig
+4
-0
Mall.AOP.csproj
Mall.AOP/Mall.AOP.csproj
+1
-1
Mall.CacheManager.csproj
Mall.CacheManager/Mall.CacheManager.csproj
+1
-1
Mall.Common.csproj
Mall.Common/Mall.Common.csproj
+1
-1
Mall.DataHelper.csproj
Mall.DataHelper/Mall.DataHelper.csproj
+2
-2
Mall.IM.csproj
Mall.IM/Mall.IM.csproj
+1
-1
RB_Goods_Relevance.cs
Mall.Model/Entity/Product/RB_Goods_Relevance.cs
+63
-0
RB_Goods_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Extend.cs
+5
-0
RB_Goods_Relevance_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Relevance_Extend.cs
+14
-0
Mall.Model.csproj
Mall.Model/Mall.Model.csproj
+1
-1
Mall.Module.BaseSetUp.csproj
Mall.Module.BaseSetUp/Mall.Module.BaseSetUp.csproj
+1
-1
Mall.Module.Education.csproj
Mall.Module.Education/Mall.Module.Education.csproj
+1
-1
Mall.Module.MarketingCenter.csproj
...Module.MarketingCenter/Mall.Module.MarketingCenter.csproj
+2
-2
Mall.Module.Miai.csproj
Mall.Module.Miai/Mall.Module.Miai.csproj
+1
-1
Mall.Module.Product.csproj
Mall.Module.Product/Mall.Module.Product.csproj
+1
-1
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+19
-10
Mall.Module.Property.csproj
Mall.Module.Property/Mall.Module.Property.csproj
+2
-2
Mall.Module.Reserve.csproj
Mall.Module.Reserve/Mall.Module.Reserve.csproj
+2
-2
Mall.Module.TradePavilion.csproj
Mall.Module.TradePavilion/Mall.Module.TradePavilion.csproj
+2
-2
Mall.Module.User.csproj
Mall.Module.User/Mall.Module.User.csproj
+2
-2
Mall.Repository.csproj
Mall.Repository/Mall.Repository.csproj
+1
-1
RB_Goods_RelevanceRepository.cs
Mall.Repository/Product/RB_Goods_RelevanceRepository.cs
+43
-0
Mall.ThirdCore.csproj
Mall.ThirdCore/Mall.ThirdCore.csproj
+2
-2
ProductController.cs
Mall.WebApi/Controllers/Product/ProductController.cs
+2
-1
Mall.WebApi.csproj
Mall.WebApi/Mall.WebApi.csproj
+1
-1
No files found.
.editorconfig
0 → 100644
View file @
f1b81fcd
[*.cs]
# IDE1006: 命名样式
dotnet_diagnostic.IDE1006.severity = none
Mall.AOP/Mall.AOP.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
Mall.CacheManager/Mall.CacheManager.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
Mall.Common/Mall.Common.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
Mall.DataHelper/Mall.DataHelper.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
Mall.IM/Mall.IM.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
Mall.Model/Entity/Product/RB_Goods_Relevance.cs
0 → 100644
View file @
f1b81fcd
using
System
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.Product
{
/// <summary>
/// 商品关联表信息
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_Relevance
{
/// <summary>
/// 关联商品主键编号
/// </summary>
public
int
RelevanceId
{
get
;
set
;
}
/// <summary>
/// 商品编号
/// </summary>
public
int
GoodsId
{
get
;
set
;
}
/// <summary>
/// 关联商品名称
/// </summary>
public
string
RelevanceName
{
get
;
set
;
}
/// <summary>
/// 关联商品价格
/// </summary>
public
decimal
RelevancePrice
{
get
;
set
;
}
/// <summary>
/// 关联商品状态
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 规格
/// </summary>
public
string
Unit
{
get
;
set
;
}
/// <summary>
/// 商户编号
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序编号
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
/// <summary>
/// 关联物品Id
/// </summary>
public
int
RelationId
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_Extend.cs
View file @
f1b81fcd
...
@@ -307,6 +307,11 @@ namespace Mall.Model.Extend.Product
...
@@ -307,6 +307,11 @@ namespace Mall.Model.Extend.Product
/// </summary>
/// </summary>
public
List
<
RB_Goods_MemberPrice_Extend
>
MemberPriceTreeList
{
get
;
set
;
}
public
List
<
RB_Goods_MemberPrice_Extend
>
MemberPriceTreeList
{
get
;
set
;
}
/// <summary>
/// 关联商品列表
/// </summary>
public
List
<
RB_Goods_Relevance_Extend
>
RelevanceList
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 是否收藏 true/false
/// 是否收藏 true/false
/// </summary>
/// </summary>
...
...
Mall.Model/Extend/Product/RB_Goods_Relevance_Extend.cs
0 → 100644
View file @
f1b81fcd
using
Mall.Model.Entity.Product
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Extend.Product
{
/// <summary>
/// 商品关联表扩展实体信息
/// </summary>
public
class
RB_Goods_Relevance_Extend
:
RB_Goods_Relevance
{
}
}
Mall.Model/Mall.Model.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
Mall.Module.BaseSetUp/Mall.Module.BaseSetUp.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
Mall.Module.Education/Mall.Module.Education.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
Mall.Module.MarketingCenter/Mall.Module.MarketingCenter.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
Mall.Module.Miai/Mall.Module.Miai.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
Mall.Module.Product/Mall.Module.Product.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
Mall.Module.Product/ProductModule.cs
View file @
f1b81fcd
using
System
;
using
Mall.Common
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Text.RegularExpressions
;
using
Mall.AOP.CustomerAttribute
;
using
Mall.Common
;
using
Mall.Common.API
;
using
Mall.Common.API
;
using
Mall.Common.Plugin
;
using
Mall.Common.Plugin
;
using
Mall.Model.Entity.Product
;
using
Mall.Model.Entity.Product
;
...
@@ -14,15 +8,17 @@ using Mall.Model.Extend.Product;
...
@@ -14,15 +8,17 @@ using Mall.Model.Extend.Product;
using
Mall.Model.Extend.Reserve
;
using
Mall.Model.Extend.Reserve
;
using
Mall.Model.Extend.User
;
using
Mall.Model.Extend.User
;
using
Mall.Model.Query
;
using
Mall.Model.Query
;
using
Mall.Repository
;
using
Mall.Repository.BaseSetUp
;
using
Mall.Repository.BaseSetUp
;
using
Mall.Repository.MarketingCenter
;
using
Mall.Repository.MarketingCenter
;
using
Mall.Repository.Product
;
using
Mall.Repository.Product
;
using
Mall.Repository.Reserve
;
using
Mall.Repository.Reserve
;
using
Mall.Repository.User
;
using
Mall.Repository.User
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
using
System
;
using
NPOI.SS.Formula.Functions
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Text.RegularExpressions
;
using
VT.FW.DB
;
using
VT.FW.DB
;
namespace
Mall.Module.Product
namespace
Mall.Module.Product
...
@@ -217,6 +213,12 @@ namespace Mall.Module.Product
...
@@ -217,6 +213,12 @@ namespace Mall.Module.Product
/// 分享仓储层对象
/// 分享仓储层对象
/// </summary>
/// </summary>
private
readonly
RB_Share_FriendRepository
share_FriendRepository
=
new
RB_Share_FriendRepository
();
private
readonly
RB_Share_FriendRepository
share_FriendRepository
=
new
RB_Share_FriendRepository
();
/// <summary>
/// 关联商品仓储层对象
/// </summary>
private
readonly
RB_Goods_RelevanceRepository
goods_RelevanceRepository
=
new
RB_Goods_RelevanceRepository
();
#
region
教育咖啡劵
#
region
教育咖啡劵
/// <summary>
/// <summary>
/// 教育商品
/// 教育商品
...
@@ -8002,6 +8004,7 @@ namespace Mall.Module.Product
...
@@ -8002,6 +8004,7 @@ namespace Mall.Module.Product
/// <returns></returns>
/// <returns></returns>
public
RB_Goods_Extend
GetProductGoodsInfo
(
int
goodsId
,
int
TenantId
,
int
MallBaseId
)
public
RB_Goods_Extend
GetProductGoodsInfo
(
int
goodsId
,
int
TenantId
,
int
MallBaseId
)
{
{
var
model
=
goodsRepository
.
GetEntity
(
goodsId
).
RefMapperTo
<
RB_Goods_Extend
>();
var
model
=
goodsRepository
.
GetEntity
(
goodsId
).
RefMapperTo
<
RB_Goods_Extend
>();
if
(
model
==
null
||
model
.
TenantId
!=
TenantId
||
model
.
MallBaseId
!=
MallBaseId
)
if
(
model
==
null
||
model
.
TenantId
!=
TenantId
||
model
.
MallBaseId
!=
MallBaseId
)
{
{
...
@@ -8333,6 +8336,12 @@ namespace Mall.Module.Product
...
@@ -8333,6 +8336,12 @@ namespace Mall.Module.Product
{
{
model
.
FormsName
=
"默认表单"
;
model
.
FormsName
=
"默认表单"
;
}
}
model
.
RelevanceList
=
goods_RelevanceRepository
.
GetGoodsRelevanceListRepository
(
new
RB_Goods_Relevance_Extend
()
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
GoodsId
=
model
.
Id
});
return
model
;
return
model
;
}
}
...
...
Mall.Module.Property/Mall.Module.Property.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
Mall.Module.Reserve/Mall.Module.Reserve.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
Mall.Module.TradePavilion/Mall.Module.TradePavilion.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
Mall.Module.User/Mall.Module.User.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
Mall.Repository/Mall.Repository.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
Mall.Repository/Product/RB_Goods_RelevanceRepository.cs
0 → 100644
View file @
f1b81fcd
using
Mall.Model.Entity.Product
;
using
Mall.Model.Extend.Product
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Mall.Repository.Product
{
/// <summary>
/// 商品关联表仓储层
/// </summary>
public
class
RB_Goods_RelevanceRepository
:
BaseRepository
<
RB_Goods_Relevance
>
{
/// <summary>
/// 获取关联商品列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Goods_Relevance_Extend
>
GetGoodsRelevanceListRepository
(
RB_Goods_Relevance_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Goods_Relevance AS A
WHERE 1=1
"
);
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Goods_Relevance_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Goods_Relevance_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
GoodsId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Goods_Relevance_Extend
.
GoodsId
),
query
.
GoodsId
);
}
return
Get
<
RB_Goods_Relevance_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
Mall.ThirdCore/Mall.ThirdCore.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
...
...
Mall.WebApi/Controllers/Product/ProductController.cs
View file @
f1b81fcd
...
@@ -1829,7 +1829,8 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -1829,7 +1829,8 @@ namespace Mall.WebApi.Controllers.MallBase
model
?.
GoodsUrl
,
model
?.
GoodsUrl
,
model
?.
goodsLogo
,
model
?.
goodsLogo
,
model
?.
GoodsEduType
,
model
?.
GoodsEduType
,
model
?.
MaterialId
model
?.
MaterialId
,
RelevanceList
=
model
?.
RelevanceList
.
Select
(
qitem
=>
new
{
qitem
.
RelevanceId
,
qitem
.
RelevanceName
,
qitem
.
RelevancePrice
,
qitem
.
Unit
})
};
};
}
}
return
ApiResult
.
Success
(
""
,
obj
);
return
ApiResult
.
Success
(
""
,
obj
);
...
...
Mall.WebApi/Mall.WebApi.csproj
View file @
f1b81fcd
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.
1
</TargetFramework>
<TargetFramework>netcoreapp3.
0
</TargetFramework>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup>
<PropertyGroup>
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
...
...
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