Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
Overview
Overview
Details
Activity
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
bltdc
DataCenter_Core2.1_20190520
Commits
3d83286f
Commit
3d83286f
authored
Dec 20, 2019
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加接口调用日志
parent
ecf4fd9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
ApiController.cs
Bailun.DC.Web/Controllers/ApiController.cs
+33
-1
No files found.
Bailun.DC.Web/Controllers/ApiController.cs
View file @
3d83286f
...
...
@@ -36,6 +36,8 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
JsonResult
GetListSkuGroup
([
FromBody
]
Models
.
SkuGroup
.
mSkuGroupCondition
m
)
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/GetListSkuGroup"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
var
total
=
0
;
var
pagesize
=
1000
;
var
result
=
new
Services
.
SkuMonitorServices
().
ListSkuGroup
(
m
.
page
,
pagesize
,
m
.
sku
,
m
.
warehousecode
,
m
.
country
,
m
.
groupname
,
ref
total
);
...
...
@@ -56,6 +58,8 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
JsonResult
GetListGroup
(
string
name
,
string
country
,
string
warehousetype
,
string
warehousecode
)
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/GetListGroup"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
var
result
=
new
Services
.
SkuMonitorServices
().
ListGroupName
(
name
,
country
,
warehousetype
,
warehousecode
);
return
Json
(
result
);
...
...
@@ -68,6 +72,8 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
string
SkuWarehouseRedundancy1
()
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/SkuWarehouseRedundancy1"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
var
filename
=
_hostingEnvironment
.
WebRootPath
+
"\\Files\\turnfile\\"
;
var
result
=
new
Services
.
InventoryServices
().
SaveSkuWarehouseRedundancy
(
filename
);
...
...
@@ -82,6 +88,8 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
string
SkuWarehouseSales1
()
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/SkuWarehouseSales1"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
var
filename
=
_hostingEnvironment
.
WebRootPath
+
"\\Files\\turnfile\\skusales.csv"
;
var
result
=
new
Services
.
InventoryServices
().
SaveSkuWarehouseSales
(
filename
);
...
...
@@ -99,6 +107,8 @@ namespace Bailun.DC.Web.Controllers
/// <returns></returns>
public
JsonResult
ListWeekOutSku
(
int
page
,
int
pagesize
,
DateTime
?
start
,
DateTime
?
end
)
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/ListWeekOutSku"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
var
total
=
0
;
var
list
=
new
Services
.
SkuMonitorServices
().
ListWeedOut
(
page
,
pagesize
,
start
,
end
,
ref
total
);
...
...
@@ -121,6 +131,8 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
JsonResult
ListPlatformSkuSales
(
int
page
,
int
pagesize
,
DateTime
?
start
,
DateTime
?
end
,
string
platform
,
int
companyid
)
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/ListPlatformSkuSales"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
var
total
=
0
;
var
obj
=
new
Services
.
OrdersServices
().
ListOrderPlatformSku
(
page
,
pagesize
,
start
,
end
,
platform
,
companyid
,
ref
total
);
...
...
@@ -155,6 +167,9 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
JsonResult
SaveSkuDeliverWeighDiff
(
DateTime
?
day
)
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/SaveSkuDeliverWeighDiff"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
var
result
=
new
Services
.
OrdersServices
().
SaveWeighDiff
(
day
);
return
Json
(
new
{
...
...
@@ -172,6 +187,8 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
JsonResult
ListSalerProfit
(
DateTime
?
start
,
DateTime
?
end
,
int
companyid
)
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/ListSalerProfit"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
var
list
=
new
Services
.
OrdersServices
().
ListSalerProfit
(
start
,
end
,
companyid
);
return
Json
(
list
);
}
...
...
@@ -186,6 +203,8 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
JsonResult
ListItemIdOrderCount
([
FromBody
]
Models
.
Orders
.
mItemIdOrderCount_Input
m
)
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/ListItemIdOrderCount"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
if
(
m
.
itemid
.
Length
>
1000
||
m
.
itemid
.
Length
==
0
)
{
return
Json
(
new
{
...
...
@@ -221,6 +240,8 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
JsonResult
ListOrderSkuProfit
([
FromBody
]
Models
.
Orders
.
mShipSkuProfitInput
m
)
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/ListOrderSkuProfit"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
var
pagesize
=
1000
;
var
obj
=
new
Services
.
OrdersServices
().
ListOrderSkuProfit
(
m
.
page
,
pagesize
,
m
.
start
,
m
.
end
,
m
.
bailun_order_id
);
...
...
@@ -264,6 +285,8 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
JsonResult
ListFBASkuProfit
([
FromBody
]
Models
.
Orders
.
mShipSkuProfitInput
m
)
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/ListFBASkuProfit"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
var
pagesize
=
1000
;
var
obj
=
new
Services
.
OrdersServices
().
ListFBASkuProfit
(
m
.
page
,
pagesize
,
m
.
start
,
m
.
end
,
m
.
bailun_order_id
);
...
...
@@ -312,6 +335,7 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
JsonResult
ListEbayFee
([
FromBody
]
mEbayFeeInput
m
)
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/ListEbayFee"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
try
{
var
pagesize
=
1000
;
...
...
@@ -391,6 +415,7 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
JsonResult
ListInterceptItemid
(
int
page
,
DateTime
?
start
,
DateTime
?
end
,
string
platform
=
"Aliexpress"
)
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/ListInterceptItemid"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
var
pagesize
=
1000
;
var
total
=
0
;
...
...
@@ -429,6 +454,8 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
JsonResult
GetProfit
(
DateTime
start
,
DateTime
end
)
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/GetProfit"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
try
{
var
obj
=
new
Services
.
OrdersServices
().
GetProfitTotal
(
start
,
end
);
...
...
@@ -469,6 +496,8 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
JsonResult
EbaySkuSales
(
int
page
,
DateTime
start
,
DateTime
end
,
string
skus
,
string
platform
=
"Ebay"
)
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/EbaySkuSales"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
int
pagesize
=
1000
;
try
...
...
@@ -510,6 +539,7 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
JsonResult
SkuSales
(
int
page
,
DateTime
start
,
DateTime
end
,
string
skus
,
string
platform
=
"Ebay"
)
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/SkuSales"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
int
pagesize
=
1000
;
try
...
...
@@ -552,6 +582,7 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
JsonResult
ListPuchaseDetail
(
int
page
,
DateTime
start
,
DateTime
end
,
string
suppliername
)
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/ListPuchaseDetail"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
var
pagesize
=
1000
;
try
...
...
@@ -582,6 +613,7 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
JsonResult
DailyExchangeRate
(
DateTime
date
)
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/DailyExchangeRate"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
LocalIpAddress
.
ToString
());
var
obj
=
new
Services
.
CommonServices
().
ListDateExchangeRate
(
date
);
return
Json
(
new
{
...
...
@@ -607,7 +639,7 @@ namespace Bailun.DC.Web.Controllers
[
HttpPost
]
public
JsonResult
ListSkuSaleAndReturn
(
int
page
,
DateTime
start
,
DateTime
end
,
string
platform
,
string
bailunsku
)
{
Services
.
ApiServices
.
SaveApiLog
(
"Api/ListSkuSaleAndReturn"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
Remote
IpAddress
.
ToString
());
Services
.
ApiServices
.
SaveApiLog
(
"Api/ListSkuSaleAndReturn"
,
_httpContextAccessor
.
HttpContext
.
Connection
.
Local
IpAddress
.
ToString
());
var
pagesize
=
1000
;
...
...
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