Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
weixiuhui
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
蒋林
weixiuhui
Commits
5f34ac6f
Commit
5f34ac6f
authored
Aug 23, 2016
by
蒋林
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
78b577b6
38adbe41
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
Galanz.php
application/controllers/api/Galanz.php
+1
-1
Galanz.php
application/controllers/task/Galanz.php
+13
-9
Order_log_model.php
application/models/Order_log_model.php
+0
-0
No files found.
application/controllers/api/Galanz.php
View file @
5f34ac6f
...
@@ -48,7 +48,7 @@ class Galanz extends BaseController
...
@@ -48,7 +48,7 @@ class Galanz extends BaseController
self
::
$receiveGalanzObj
->
CheckGetOrderDetailValues
();
self
::
$receiveGalanzObj
->
CheckGetOrderDetailValues
();
$values
=
self
::
$receiveGalanzObj
->
GetValues
();
$values
=
self
::
$receiveGalanzObj
->
GetValues
();
$this
->
saveLog
(
''
,
'getOrderDetail'
,
$param
);
$this
->
saveLog
(
$values
[
'out_trade_no'
]
,
'getOrderDetail'
,
$param
);
$this
->
load
->
model
(
'galanz_model'
);
$this
->
load
->
model
(
'galanz_model'
);
$info
=
$this
->
galanz_model
->
infoByNewName
(
$values
[
'out_trade_no'
]);
$info
=
$this
->
galanz_model
->
infoByNewName
(
$values
[
'out_trade_no'
]);
...
...
application/controllers/task/Galanz.php
View file @
5f34ac6f
...
@@ -20,6 +20,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
...
@@ -20,6 +20,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
class
Galanz
extends
BaseController
class
Galanz
extends
BaseController
{
{
public
function
__construct
()
{
parent
::
__construct
();
}
/**
/**
* 定时抓取订单数据
* 定时抓取订单数据
*/
*/
...
@@ -31,23 +36,19 @@ class Galanz extends BaseController
...
@@ -31,23 +36,19 @@ class Galanz extends BaseController
$account
=
$this
->
config
->
item
(
'account'
);
$account
=
$this
->
config
->
item
(
'account'
);
$galanzAccount
=
$account
[
'galanz'
];
$galanzAccount
=
$account
[
'galanz'
];
$
this
->
load
->
model
(
'order_log_model'
)
;
$
orders
=
[]
;
foreach
(
$galanzAccount
as
$v
)
{
foreach
(
$galanzAccount
as
$v
)
{
$orders
=
$this
->
galanzHandle
(
$v
);
$orders
[]
=
$this
->
galanzHandle
(
$v
);
//添加订单入库日志
if
(
$orders
)
{
foreach
(
$orders
as
$vv
)
{
$this
->
order_log_model
->
add
(
$vv
[
'new_name'
],
'galanz'
,
$vv
,
$v
[
'username'
]);
}
}
}
}
echo
"<br/>"
;
print_r
(
$orders
);
}
}
private
function
galanzHandle
(
$account
)
private
function
galanzHandle
(
$account
)
{
{
$this
->
load
->
model
(
'galanz_model'
);
$this
->
load
->
model
(
'galanz_model'
);
$this
->
load
->
model
(
'order_log_model'
);
$this
->
load
->
library
(
'Source/SourceGalanz'
,
$account
,
'SourceGalanz'
);
$this
->
load
->
library
(
'Source/SourceGalanz'
,
$account
,
'SourceGalanz'
);
//调取最近的数据
//调取最近的数据
...
@@ -82,6 +83,9 @@ class Galanz extends BaseController
...
@@ -82,6 +83,9 @@ class Galanz extends BaseController
//记录插入的订单
//记录插入的订单
$order
[
'id'
]
=
$id
;
$order
[
'id'
]
=
$id
;
$result
[]
=
$order
;
$result
[]
=
$order
;
//添加订单入库日志
$this
->
order_log_model
->
add
(
$order
[
'new_name'
],
'galanz'
,
$order
,
$order
[
'username'
]);
}
}
}
}
...
...
application/models/
o
rder_log_model.php
→
application/models/
O
rder_log_model.php
View file @
5f34ac6f
File moved
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