Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
services
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tencent
services
Commits
10e2e3cb
Commit
10e2e3cb
authored
Aug 01, 2018
by
zhufx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.买家hasUser接口
2.公共实体优化
parent
8017aa78
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
src/Buyer/Lib/BuyerInterface.php
+3
-1
src/Common/Entity/CommonEntity.php
+6
-7
No files found.
src/Buyer/BuyerInterface.php
→
src/Buyer/
Lib/
BuyerInterface.php
View file @
10e2e3cb
...
...
@@ -5,7 +5,7 @@
* Date: 2018/7/5
* Time: 15:47
*/
namespace
Hdll\Services\Buyer
;
namespace
Hdll\Services\Buyer
\Lib
;
use
Swoft\Core\ResultInterface
;
...
...
@@ -21,4 +21,5 @@ interface BuyerInterface
public
function
updateProfile
(
string
$token
,
array
$data
);
public
function
hasUser
(
$storeId
,
$unionid
);
}
\ No newline at end of file
src/Common/Entity/CommonEntity.php
View file @
10e2e3cb
...
...
@@ -59,14 +59,12 @@ class CommonEntity extends Model
*/
protected
function
split
()
{
$request
=
RequestContext
::
getRequest
();
if
(
empty
(
$request
)
)
{
//初始化不做处理
if
(
empty
(
RequestContext
::
getContextData
())
)
{
//初始化不做处理
return
;
}
$testFlag
=
$request
->
query
(
'flag'
);
if
(
false
===
strpos
(
self
::
$commentString
,
"
{
split
}
"
)
||
$testFlag
==
'hdllTest'
)
{
if
(
false
===
strpos
(
self
::
$commentString
,
"
{
split
}
"
)
||
App
::
$isInTest
)
{
return
;
}
...
...
@@ -86,18 +84,19 @@ class CommonEntity extends Model
*/
public
static
function
tableName
()
{
$request
=
RequestContext
::
getRequest
();
if
(
empty
(
$request
)
)
{
//初始化不做处理
if
(
empty
(
RequestContext
::
getContextData
()
)
)
{
//初始化不做处理
return
;
}
$request
=
RequestContext
::
getRequest
();
$testFlag
=
$request
->
query
(
'flag'
);
//获取注解里的table
$res
=
new
\ReflectionClass
(
static
::
class
);
self
::
$commentString
=
$res
->
getDocComment
();
if
(
false
!==
strpos
(
self
::
$commentString
,
"
{
split
}
"
)
&&
$testFlag
!=
'hdllTest'
)
{
if
(
false
!==
strpos
(
self
::
$commentString
,
"
{
split
}
"
)
&&
App
::
$isInTest
)
{
$dbNum
=
self
::
getDbNum
();
$tableName
=
self
::
getTableName
()
.
'_'
.
$dbNum
;
self
::
setTableName
(
$tableName
);
...
...
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