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
5939ba83
Commit
5939ba83
authored
Feb 04, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增接口
parent
37b761d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
128 additions
and
10 deletions
+128
-10
JsonHelper.cs
Mall.Common/Plugin/JsonHelper.cs
+12
-0
TradeController.cs
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
+116
-10
No files found.
Mall.Common/Plugin/JsonHelper.cs
View file @
5939ba83
...
@@ -37,6 +37,18 @@ namespace Mall.Common.Plugin
...
@@ -37,6 +37,18 @@ namespace Mall.Common.Plugin
return
result
;
return
result
;
}
}
/// <summary>
/// 获取日期时间
/// </summary>
/// <param name="jObject"></param>
/// <param name="key"></param>
/// <returns></returns>
public
static
DateTime
GetDateTime
(
this
JObject
jObject
,
string
key
)
{
DateTime
.
TryParse
(
jObject
[
key
]
==
null
?
""
:
jObject
[
key
].
ToString
(),
out
DateTime
result
);
return
result
;
}
/// <summary>
/// <summary>
/// 获取Int
/// 获取Int
/// </summary>
/// </summary>
...
...
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
View file @
5939ba83
...
@@ -52,7 +52,11 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -52,7 +52,11 @@ namespace Mall.WebApi.Controllers.TradePavilion
public
ApiResult
GetContractPageList
()
public
ApiResult
GetContractPageList
()
{
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Contract_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Contract_Extend
()
{
Name
=
parms
.
GetStringValue
(
"Name"
)
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
module
.
GetContractPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
var
list
=
module
.
GetContractPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
...
@@ -77,7 +81,17 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -77,7 +81,17 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
/// <returns></returns>
public
ApiResult
SetContract
()
public
ApiResult
SetContract
()
{
{
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_Contract_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
extModel
=
new
RB_Contract_Extend
()
{
Id
=
parms
.
GetInt
(
"Id"
),
Name
=
parms
.
GetStringValue
(
"Name"
),
Tel
=
parms
.
GetStringValue
(
"Tel"
),
HeadIcon
=
parms
.
GetStringValue
(
"HeadIcon"
),
BgImg
=
parms
.
GetStringValue
(
"BgImg"
),
Position
=
parms
.
GetStringValue
(
"Position"
),
Intro
=
parms
.
GetStringValue
(
"Intro"
)
};
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
...
@@ -124,7 +138,11 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -124,7 +138,11 @@ namespace Mall.WebApi.Controllers.TradePavilion
public
ApiResult
GetInvestmentProcurementPage
()
public
ApiResult
GetInvestmentProcurementPage
()
{
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_InvestmentProcurement_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_InvestmentProcurement_Extend
()
{
CompanyName
=
parms
.
GetStringValue
(
"CompanyName"
)
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
procurementModule
.
GetInvestmentProcurementPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
var
list
=
procurementModule
.
GetInvestmentProcurementPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
...
@@ -139,7 +157,36 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -139,7 +157,36 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
/// <returns></returns>
public
ApiResult
SetInvestmentProcurement
()
public
ApiResult
SetInvestmentProcurement
()
{
{
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_InvestmentProcurement_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
extModel
=
new
RB_InvestmentProcurement_Extend
()
{
Id
=
parms
.
GetInt
(
"Id"
),
Type
=
parms
.
GetInt
(
"Type"
),
GoodsCategory
=
parms
.
GetStringValue
(
"GoodsCategory"
),
Investment
=
parms
.
GetStringValue
(
"Investment"
),
ImportNum
=
parms
.
GetInt
(
"ImportNum"
),
Describe
=
parms
.
GetStringValue
(
"Describe"
),
CompanyName
=
parms
.
GetStringValue
(
"CompanyName"
),
CompanyEnName
=
parms
.
GetStringValue
(
"CompanyEnName"
),
Mobile
=
parms
.
GetStringValue
(
"Mobile"
),
EMail
=
parms
.
GetStringValue
(
"EMail"
),
LegalPerson
=
parms
.
GetStringValue
(
"LegalPerson"
),
Principal
=
parms
.
GetStringValue
(
"Principal"
),
WechatNo
=
parms
.
GetStringValue
(
"WechatNo"
),
DomainUrl
=
parms
.
GetStringValue
(
"DomainUrl"
),
Industry
=
parms
.
GetStringValue
(
"Industry"
),
FoundingTime
=
parms
.
GetDateTime
(
"FoundingTime"
),
EmployeeNum
=
parms
.
GetInt
(
"EmployeeNum"
),
AnnualSales
=
parms
.
GetDecimal
(
"AnnualSales"
),
Address
=
parms
.
GetStringValue
(
"Address"
),
EnAddress
=
parms
.
GetStringValue
(
"EnAddress"
),
AnnualImport
=
parms
.
GetDecimal
(
"AnnualImport"
),
ImportCategory
=
parms
.
GetStringValue
(
"ImportCategory"
),
ImportCountry
=
parms
.
GetStringValue
(
"ImportCountry"
),
ExportCountry
=
parms
.
GetStringValue
(
"ExportCountry"
),
CompanyIntro
=
parms
.
GetStringValue
(
"CompanyIntro"
),
OtherInfo
=
parms
.
GetStringValue
(
"OtherInfo"
),
};
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
...
@@ -187,7 +234,11 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -187,7 +234,11 @@ namespace Mall.WebApi.Controllers.TradePavilion
public
ApiResult
GetCompanyPageList
()
public
ApiResult
GetCompanyPageList
()
{
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Company_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Company_Extend
()
{
CompanyName
=
parms
.
GetStringValue
(
"CompanyName"
)
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
companyModule
.
GetCompanyPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
var
list
=
companyModule
.
GetCompanyPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
...
@@ -202,7 +253,31 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -202,7 +253,31 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
/// <returns></returns>
public
ApiResult
SetCompany
()
public
ApiResult
SetCompany
()
{
{
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_Company_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
extModel
=
new
RB_Company_Extend
()
{
CompanyId
=
parms
.
GetInt
(
"CompanyId"
),
CompanyName
=
parms
.
GetStringValue
(
"CompanyName"
),
CompanyEnName
=
parms
.
GetStringValue
(
"CompanyEnName"
),
Principal
=
parms
.
GetStringValue
(
"Principal"
),
Mobile
=
parms
.
GetStringValue
(
"Mobile"
),
EMail
=
parms
.
GetStringValue
(
"EMail"
),
LegalPerson
=
parms
.
GetStringValue
(
"LegalPerson"
),
WechatNo
=
parms
.
GetStringValue
(
"WechatNo"
),
CompanyIntro
=
parms
.
GetStringValue
(
"CompanyIntro"
),
DomainUrl
=
parms
.
GetStringValue
(
"DomainUrl"
),
FoundingTime
=
parms
.
GetDateTime
(
"FoundingTime"
),
EmployeeNum
=
parms
.
GetInt
(
"EmployeeNum"
),
AnnualSales
=
parms
.
GetDecimal
(
"AnnualSales"
),
AnnualImport
=
parms
.
GetDecimal
(
"AnnualImport"
),
Address
=
parms
.
GetStringValue
(
"Address"
),
EnAddress
=
parms
.
GetStringValue
(
"EnAddress"
),
Industry
=
parms
.
GetStringValue
(
"Industry"
),
ExportCountry
=
parms
.
GetStringValue
(
"ExportCountry"
),
ImportCountry
=
parms
.
GetStringValue
(
"ImportCountry"
),
ImportCategory
=
parms
.
GetStringValue
(
"ImportCategory"
),
OtherInfo
=
parms
.
GetStringValue
(
"OtherInfo"
),
};
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
...
@@ -250,7 +325,11 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -250,7 +325,11 @@ namespace Mall.WebApi.Controllers.TradePavilion
public
ApiResult
GetCommerceActivityPage
()
public
ApiResult
GetCommerceActivityPage
()
{
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Commerce_Activity_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Commerce_Activity_Extend
()
{
ActivityName
=
jObj
.
GetStringValue
(
"ActivityName"
)
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
activityModule
.
GetCommerceActivityPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
var
list
=
activityModule
.
GetCommerceActivityPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
...
@@ -265,7 +344,25 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -265,7 +344,25 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
/// <returns></returns>
public
ApiResult
SetCommerceActivity
()
public
ApiResult
SetCommerceActivity
()
{
{
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_Commerce_Activity_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
extModel
=
new
RB_Commerce_Activity_Extend
()
{
Id
=
jObj
.
GetInt
(
"Id"
),
ActivityName
=
jObj
.
GetStringValue
(
"ActivityName"
),
StartTime
=
jObj
.
GetDateTime
(
"StartTime"
),
EndTime
=
jObj
.
GetDateTime
(
"EndTime"
),
CoverImg
=
jObj
.
GetStringValue
(
"CoverImg"
),
ActivityType
=
jObj
.
GetInt
(
"ActivityType"
),
ActivityInfo
=
jObj
.
GetStringValue
(
"ActivityInfo"
),
};
try
{
extModel
.
CommerceDetailsList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
RB_Commerce_Details_Extend
>>(
jObj
.
GetStringValue
(
"CommerceDetailsList"
));
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetCommerceActivity_CommerceDetailsList"
);
}
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
...
@@ -310,7 +407,11 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -310,7 +407,11 @@ namespace Mall.WebApi.Controllers.TradePavilion
public
ApiResult
GetCommerceActivityTypePage
()
public
ApiResult
GetCommerceActivityTypePage
()
{
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Commerce_ActivityType_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Commerce_ActivityType_Extend
()
{
TypeName
=
jObj
.
GetStringValue
(
"TypeName"
)
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
activityModule
.
GetCommerceActivityTypePageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
var
list
=
activityModule
.
GetCommerceActivityTypePageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
...
@@ -325,7 +426,12 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -325,7 +426,12 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
/// <returns></returns>
public
ApiResult
SetCommerceActivityType
()
public
ApiResult
SetCommerceActivityType
()
{
{
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_Commerce_ActivityType_Extend
>(
RequestParm
.
msg
.
ToString
());
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
extModel
=
new
RB_Commerce_ActivityType_Extend
()
{
Id
=
jObj
.
GetInt
(
"Id"
),
TypeName
=
jObj
.
GetStringValue
(
"TypeName"
)
};
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
...
...
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