Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meibuyu-micro
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
without authentication
meibuyu-micro
Commits
4d9edd48
Commit
4d9edd48
authored
Apr 12, 2021
by
王源
🎧
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pull_fulfillmentOrders' into test
parents
24152e58
54f5d43f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
12 deletions
+11
-12
ExceptionLogProducer.php
src/Amqp/Producer/ExceptionLogProducer.php
+0
-10
ShopifyServiceInterface.php
src/Service/Interfaces/Product/ShopifyServiceInterface.php
+9
-0
InventoryItem.php
src/Shopify/lib/InventoryItem.php
+1
-1
InventoryLevel.php
src/Shopify/lib/InventoryLevel.php
+1
-1
No files found.
src/Amqp/Producer/ExceptionLogProducer.php
View file @
4d9edd48
...
@@ -26,33 +26,25 @@ class ExceptionLogProducer extends ProducerMessage
...
@@ -26,33 +26,25 @@ class ExceptionLogProducer extends ProducerMessage
// 获取trace中真实文件和行数
// 获取trace中真实文件和行数
if
(
!
empty
(
$data
[
'trace'
]))
{
if
(
!
empty
(
$data
[
'trace'
]))
{
preg_match
(
'/(\/var\/www\/html\/.+?\/app\/.+?\.php)(?=\()/'
,
$data
[
'trace'
],
$matchFiles
);
preg_match
(
'/(\/var\/www\/html\/.+?\/app\/.+?\.php)(?=\()/'
,
$data
[
'trace'
],
$matchFiles
);
put_log
(
'$matchFiles: '
.
json_encode
(
$matchFiles
),
'ExceptionLogProducerPreg.log'
);
if
(
!
empty
(
$matchFiles
[
0
]))
{
if
(
!
empty
(
$matchFiles
[
0
]))
{
$data
[
'file'
]
=
$matchFiles
[
0
];
$data
[
'file'
]
=
$matchFiles
[
0
];
$file
=
str_replace
(
'/'
,
'\/'
,
$matchFiles
[
0
]);
$file
=
str_replace
(
'/'
,
'\/'
,
$matchFiles
[
0
]);
$file
=
str_replace
(
'.'
,
'\.'
,
$file
);
$file
=
str_replace
(
'.'
,
'\.'
,
$file
);
$pattern
=
'/(?<='
.
$file
.
'\()[0-9]+(?=\))/'
;
$pattern
=
'/(?<='
.
$file
.
'\()[0-9]+(?=\))/'
;
put_log
(
'$pattern: '
.
$pattern
,
'ExceptionLogProducerPreg.log'
);
preg_match
(
$pattern
,
$data
[
'trace'
],
$matchLines
);
preg_match
(
$pattern
,
$data
[
'trace'
],
$matchLines
);
put_log
(
'$matchLines: '
.
json_encode
(
$matchLines
),
'ExceptionLogProducerPreg.log'
);
if
(
!
empty
(
$matchLines
[
0
]))
{
if
(
!
empty
(
$matchLines
[
0
]))
{
$data
[
'line'
]
=
$matchLines
[
0
];
$data
[
'line'
]
=
$matchLines
[
0
];
}
}
}
}
}
}
put_log
(
"file:
{
$data
[
'file'
]
}
"
,
'ExceptionLogProducerEcho.log'
);
if
(
!
empty
(
$data
[
'file'
]))
{
if
(
!
empty
(
$data
[
'file'
]))
{
// 只对项目app文件夹下的错误获取编码人
// 只对项目app文件夹下的错误获取编码人
preg_match
(
'/(\/var\/www\/html\/.+?\/app\/)/'
,
$data
[
'file'
],
$matchPaths
);
preg_match
(
'/(\/var\/www\/html\/.+?\/app\/)/'
,
$data
[
'file'
],
$matchPaths
);
put_log
(
'$matchPaths: '
.
json_encode
(
$matchPaths
),
'ExceptionLogProducerPreg.log'
);
if
(
!
empty
(
$matchPaths
[
0
]))
{
if
(
!
empty
(
$matchPaths
[
0
]))
{
try
{
try
{
put_log
(
"cd
{
$matchPaths
[
0
]
}
&& git blame -L
{
$data
[
'line'
]
}
,
{
$data
[
'line'
]
}
{
$data
[
'file'
]
}
"
,
'ExceptionLogProducerEcho.log'
);
exec
(
"cd
{
$matchPaths
[
0
]
}
&& git blame -L
{
$data
[
'line'
]
}
,
{
$data
[
'line'
]
}
{
$data
[
'file'
]
}
"
,
$output
);
exec
(
"cd
{
$matchPaths
[
0
]
}
&& git blame -L
{
$data
[
'line'
]
}
,
{
$data
[
'line'
]
}
{
$data
[
'file'
]
}
"
,
$output
);
put_log
(
"output: "
.
json_encode
(
$output
),
'ExceptionLogProducerEcho.log'
);
if
(
!
empty
(
$output
[
0
])
&&
is_string
(
$output
[
0
]))
{
if
(
!
empty
(
$output
[
0
])
&&
is_string
(
$output
[
0
]))
{
preg_match
(
'/(?<=\()[^ ]+/'
,
$output
[
0
],
$matchCoders
);
preg_match
(
'/(?<=\()[^ ]+/'
,
$output
[
0
],
$matchCoders
);
put_log
(
'$matchCoders: '
.
json_encode
(
$matchCoders
),
'ExceptionLogProducerPreg.log'
);
if
(
!
empty
(
$matchCoders
[
0
]))
{
if
(
!
empty
(
$matchCoders
[
0
]))
{
$data
[
'coder'
]
=
$matchCoders
[
0
];
$data
[
'coder'
]
=
$matchCoders
[
0
];
}
}
...
@@ -62,8 +54,6 @@ class ExceptionLogProducer extends ProducerMessage
...
@@ -62,8 +54,6 @@ class ExceptionLogProducer extends ProducerMessage
}
}
}
}
}
}
put_log
(
'----------'
,
'ExceptionLogProducerPreg.log'
);
put_log
(
'----------'
,
'ExceptionLogProducerEcho.log'
);
$this
->
payload
=
$data
;
$this
->
payload
=
$data
;
}
}
...
...
src/Service/Interfaces/Product/ShopifyServiceInterface.php
View file @
4d9edd48
...
@@ -86,4 +86,13 @@ interface ShopifyServiceInterface
...
@@ -86,4 +86,13 @@ interface ShopifyServiceInterface
*/
*/
public
function
updateFulfillmentTracking
(
$fulfillmentId
,
$params
,
$shopifySiteId
);
public
function
updateFulfillmentTracking
(
$fulfillmentId
,
$params
,
$shopifySiteId
);
/**
* 通过id数组获取shopify的location数据
* @param $ids
* @param string[] $columns
* @return array 默认keyBy('id')
* @author zero
*/
public
function
getLocationsByIds
(
$ids
,
$columns
=
[
'*'
]);
}
}
src/Shopify/lib/InventoryItem.php
View file @
4d9edd48
...
@@ -11,6 +11,6 @@ namespace Meibuyu\Micro\Shopify\lib;
...
@@ -11,6 +11,6 @@ namespace Meibuyu\Micro\Shopify\lib;
class
InventoryItem
extends
AbstractShopify
class
InventoryItem
extends
AbstractShopify
{
{
protected
$resourceKey
=
'inventory_item'
;
protected
$resourceKey
=
'inventory_item
_123
'
;
}
}
src/Shopify/lib/InventoryLevel.php
View file @
4d9edd48
...
@@ -19,7 +19,7 @@ namespace Meibuyu\Micro\Shopify\lib;
...
@@ -19,7 +19,7 @@ namespace Meibuyu\Micro\Shopify\lib;
class
InventoryLevel
extends
AbstractShopify
class
InventoryLevel
extends
AbstractShopify
{
{
protected
$resourceKey
=
'inventory_level'
;
protected
$resourceKey
=
'inventory_level
_123
'
;
protected
$customPostActions
=
[
protected
$customPostActions
=
[
'adjust'
,
'adjust'
,
...
...
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