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
5bcbe1cd
Commit
5bcbe1cd
authored
Mar 23, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
072b2696
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
181 additions
and
2 deletions
+181
-2
RB_Brand_Extend.cs
Mall.Model/Extend/TradePavilion/RB_Brand_Extend.cs
+2
-0
CompanyModule.cs
Mall.Module.TradePavilion/CompanyModule.cs
+26
-1
AppletTradeController.cs
...WebApi/Controllers/TradePavilion/AppletTradeController.cs
+115
-1
TradeController.cs
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
+38
-0
No files found.
Mall.Model/Extend/TradePavilion/RB_Brand_Extend.cs
View file @
5bcbe1cd
...
...
@@ -14,5 +14,7 @@ namespace Mall.Model.Extend.TradePavilion
public
List
<
string
>
BannerList
{
get
;
set
;
}
public
string
ProjectName
{
get
;
set
;
}
}
}
Mall.Module.TradePavilion/CompanyModule.cs
View file @
5bcbe1cd
...
...
@@ -116,7 +116,32 @@ namespace Mall.Module.TradePavilion
/// <returns></returns>
public
RB_Company_Extend
GetCompanyByUserIdModule
(
int
userId
)
{
return
companyRepository
.
GetCompanyRepository
(
new
RB_Company_Extend
()
{
CreateBy
=
userId
});
var
model
=
companyRepository
.
GetCompanyRepository
(
new
RB_Company_Extend
()
{
CreateBy
=
userId
});
if
(
model
!=
null
&&
model
.
CompanyId
>
0
)
{
var
metroList
=
brandRepository
.
GetBrandList
(
new
RB_CompanyBrand_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
if
(
metroList
!=
null
&&
metroList
.
Any
())
{
model
.
BrandModel
=
new
RB_CompanyBrand_Extend
();
model
.
BrandModel
=
metroList
.
FirstOrDefault
();
if
(
model
.
BrandModel
!=
null
&&
!
string
.
IsNullOrWhiteSpace
(
model
.
BrandModel
.
CustomerType
))
{
model
.
BrandModel
.
CustomerTypeInfo
=
new
List
<
string
>();
foreach
(
var
itemCustomerType
in
model
.
BrandModel
.
CustomerType
.
Split
(
","
))
{
if
(
itemCustomerType
!=
"5"
)
{
model
.
BrandModel
.
CustomerTypeInfo
.
Add
(
Common
.
Plugin
.
EnumHelper
.
GetEnumName
(
itemCustomerType
));
}
else
{
model
.
BrandModel
.
CustomerTypeInfo
.
Add
(
model
.
BrandModel
.
CustomerOtherType
);
}
}
}
}
}
return
model
;
}
/// <summary>
...
...
Mall.WebApi/Controllers/TradePavilion/AppletTradeController.cs
View file @
5bcbe1cd
...
...
@@ -77,6 +77,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// 新增修改公司信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetCompany
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
...
...
@@ -131,6 +132,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// 获取当前用户的公司信息实体
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetUserCompany
()
{
var
userInfo
=
AppletUserInfo
;
...
...
@@ -552,11 +554,12 @@ namespace Mall.WebApi.Controllers.TradePavilion
#
endregion
#
region
品牌
#
region
公司
品牌
/// <summary>
/// 新增修改品牌信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetBrand
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
...
...
@@ -609,6 +612,20 @@ namespace Mall.WebApi.Controllers.TradePavilion
}
/// <summary>
/// 获取当前用户的公司品牌信息实体
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetUserCompanyBrand
()
{
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
CompanyId
=
parms
.
GetInt
(
"CompanyId"
,
0
);
var
model
=
carrierModule
.
GetBrandRepository
(
new
RB_CompanyBrand_Extend
{
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
,
CompanyId
=
CompanyId
});
return
ApiResult
.
Success
(
data
:
model
);
}
/// <summary>
/// 获取客户群体枚举
...
...
@@ -643,5 +660,102 @@ namespace Mall.WebApi.Controllers.TradePavilion
}
#
endregion
#
region
品牌
/// <summary>
/// 获取品牌分页列表
/// </summary>
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
GetBrandPageList
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Brand_Extend
()
{
BrandName
=
parms
.
GetStringValue
(
"BrandName"
),
ProjectType
=
(
Common
.
Enum
.
TradePavilion
.
ProjectTypeEnum
)
parms
.
GetInt
(
"ProjectType"
,
0
),
BrandClassId
=
parms
.
GetInt
(
"BrandClassId"
,
0
),
RanQi
=
parms
.
GetInt
(
"RanQi"
,
-
1
),
KongTiao
=
parms
.
GetInt
(
"KongTiao"
,
-
1
),
XinFeng
=
parms
.
GetInt
(
"XinFeng"
,
-
1
),
Plumbing
=
parms
.
GetInt
(
"Plumbing"
,
-
1
),
Caliber
=
parms
.
GetInt
(
"Caliber"
,
-
1
),
Sewage
=
parms
.
GetInt
(
"Sewage"
,
-
1
),
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
carrierModule
.
GetBrandPageList
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
foreach
(
var
item
in
list
)
{
if
(!
string
.
IsNullOrWhiteSpace
(
item
.
Banner
))
{
item
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
item
.
Banner
);
}
else
{
item
.
BannerList
=
new
List
<
string
>();
}
}
pageModel
.
count
=
Convert
.
ToInt32
(
rowsCount
);
pageModel
.
pageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取品牌实体
/// </summary>
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
GetBrandDetails
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Brand_Extend
()
{
ID
=
parms
.
GetInt
(
"ID"
,
0
),
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
extModel
=
carrierModule
.
GetBrand
(
query
);
if
(!
string
.
IsNullOrWhiteSpace
(
extModel
.
Banner
))
{
extModel
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
extModel
.
Banner
);
}
else
{
extModel
.
BannerList
=
new
List
<
string
>();
}
extModel
.
ProjectName
=
(
extModel
.
ProjectType
.
HasValue
&&
extModel
.
ProjectType
.
Value
>
0
)
?
EnumHelper
.
GetEnumName
(
extModel
.
ProjectType
):
""
;
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 获取品牌分类分页列表
/// </summary>
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
GetBrandClassList
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_BrandClass_Extend
();
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
carrierModule
.
GetBrandClassList
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
#
endregion
}
}
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
View file @
5bcbe1cd
...
...
@@ -840,6 +840,25 @@ namespace Mall.WebApi.Controllers.TradePavilion
#
region
品牌管理
/// <summary>
/// 获取商品性质枚举
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
GetProjectTypeEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
Common
.
Enum
.
TradePavilion
.
ProjectTypeEnum
));
return
ApiResult
.
Success
(
""
,
list
.
OrderBy
(
x
=>
Convert
.
ToInt32
(
x
.
Value
)).
Select
(
x
=>
new
{
Name
=
x
.
Key
,
Id
=
Convert
.
ToInt32
(
x
.
Value
)
}));
}
/// <summary>
/// 获取品牌分类分页列表
/// </summary>
...
...
@@ -863,6 +882,21 @@ namespace Mall.WebApi.Controllers.TradePavilion
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取品牌分类分页列表
/// </summary>
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
public
ApiResult
GetBrandClassList
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_BrandClass_Extend
()
;
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
carrierModule
.
GetBrandClassList
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 获取品牌分类实体
...
...
@@ -1058,6 +1092,10 @@ namespace Mall.WebApi.Controllers.TradePavilion
var
flag
=
carrierModule
.
RemoveBrandModule
(
CarrierId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
}
}
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