Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
Project
Project
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
chenchuanwen
my-yaf-project
Commits
f990374c
Commit
f990374c
authored
Sep 26, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into ccw
parents
20dcfe2e
31eb0c7b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
19 deletions
+12
-19
Member.php
application/controllers/Member.php
+0
-1
MemberService.php
application/models/Business/User/MemberService.php
+5
-15
MemberMapping.php
application/models/DAO/MemberMapping.php
+7
-3
No files found.
application/controllers/Member.php
View file @
f990374c
...
...
@@ -146,5 +146,4 @@ class MemberController extends \Our\Controller_AbstractApi {
$this
->
success
(
new
stdClass
(),
\Our\DescribeConst
::
bindMobileForWxSuccess
,
\Our\DescribeConst
::
bindMobileForWxSuccess
);
}
}
application/models/Business/User/MemberService.php
View file @
f990374c
...
...
@@ -146,6 +146,10 @@ class MemberServiceModel extends \Business\AbstractModel
'sellerId'
=>
$member
[
'sellerId'
],
'diliverymanId'
=>
$member
[
'diliverymanId'
],
);
$returnMember
[
'isWeiboBind'
]
=
\Our\ApiConst
::
zero
;
$returnMember
[
'isQqBind'
]
=
\Our\ApiConst
::
zero
;
$returnMember
[
'isWeiboBind'
]
=
\Our\ApiConst
::
zero
;
$memberMappingDao
=
\DAO\MemberMappingModel
::
getInstance
(
\Our\DbNameConst
::
masterDBConnectName
);
$memberMappingList
=
$memberMappingDao
->
getAvailableMemberMappingList
(
$memberId
);
foreach
(
$memberMappingList
as
$memberMapping
){
...
...
@@ -154,25 +158,11 @@ class MemberServiceModel extends \Business\AbstractModel
}
else
if
(
$memberMapping
[
'user_type'
]
==
\Our\ApiConst
::
userFromQQ
){
$returnMember
[
'isQqBind'
]
=
\Our\ApiConst
::
one
;
}
else
if
(
$memberMapping
[
'user_type'
]
==
\Our\ApiConst
::
wechatUserType
){
//$returnMember['isWechatBind'] = \Our\ApiConst::one;
$returnMember
[
'isWxBind'
]
=
\Our\ApiConst
::
one
;
}
else
if
(
$memberMapping
[
'user_type'
]
==
\Our\ApiConst
::
userFromWx
){
$returnMember
[
'isWxBind'
]
=
\Our\ApiConst
::
one
;
}
}
if
(
!
isset
(
$returnMember
[
'isWeiboBind'
])){
$returnMember
[
'isWeiboBind'
]
=
\Our\ApiConst
::
zero
;
}
if
(
!
isset
(
$returnMember
[
'isQqBind'
])){
$returnMember
[
'isQqBind'
]
=
\Our\ApiConst
::
zero
;
}
/*if(!isset($returnMember['isWechatBind'])){
$returnMember['isWechatBind'] = \Our\ApiConst::zero;
}*/
if
(
!
isset
(
$returnMember
[
'isWxBind'
])){
$returnMember
[
'isWxBind'
]
=
\Our\ApiConst
::
zero
;
}
return
$returnMember
;
}
...
...
@@ -603,7 +593,7 @@ class MemberServiceModel extends \Business\AbstractModel
$memberMappingDao
=
\DAO\MemberMappingModel
::
getInstance
(
\Our\DbNameConst
::
masterDBConnectName
);
$memberMappingDao
->
validCancelMapping
(
$data
,
$memberId
);
$where
[
'member_id'
]
=
$memberId
;
$where
[
'user_type'
]
=
(
$data
[
'userType'
]
==
\Our\ApiConst
::
userFromWx
)
?
array
(
'in'
,
array
(
\Our\ApiConst
::
userFromWx
,
\Our\ApiConst
::
wechatUserType
))
:
$data
[
'userType'
];
$where
[
'user_type'
]
=
(
$data
[
'userType'
]
==
\Our\ApiConst
::
userFromWx
||
$data
[
'userType'
]
==
\Our\ApiConst
::
wechatUserType
)
?
array
(
'in'
,
array
(
\Our\ApiConst
::
userFromWx
,
\Our\ApiConst
::
wechatUserType
))
:
$data
[
'userType'
];
$result
=
$memberMappingDao
->
del
(
$where
);
if
(
!
$result
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
cancelBindingUserFailed
);
...
...
application/models/DAO/MemberMapping.php
100755 → 100644
View file @
f990374c
...
...
@@ -113,8 +113,11 @@ class MemberMappingModel extends \DAO\AbstractModel{
if
(
!
$where
[
'userType'
]){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyUserType
);
}
if
(
!
in_array
(
$where
[
'userType'
],
array_keys
(
\Our\ArrayConst
::
userType
))){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
wrongUserType
);
}
$condition
[
'member_id'
]
=
$memberId
;
$condition
[
'user_type'
]
=
(
$where
[
'userType'
]
==
\Our\ApiConst
::
userFromWx
)
?
array
(
'in'
,
array
(
\Our\ApiConst
::
userFromWx
,
\Our\ApiConst
::
wechatUserType
))
:
$where
[
'userType'
];
$condition
[
'user_type'
]
=
(
$where
[
'userType'
]
==
\Our\ApiConst
::
userFromWx
||
$where
[
'userType'
]
==
\Our\ApiConst
::
wechatUserType
)
?
array
(
'in'
,
array
(
\Our\ApiConst
::
userFromWx
,
\Our\ApiConst
::
wechatUserType
))
:
$where
[
'userType'
];
$result
=
$this
->
find
(
$condition
,
'member_id'
);
if
(
!
$result
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
bindingUserNotExist
);
...
...
@@ -125,10 +128,11 @@ class MemberMappingModel extends \DAO\AbstractModel{
public
function
del
(
$where
){
$this
->
setDb
(
\Our\DbNameConst
::
masterDBConnectName
);
$condition
=
$where
;
if
(
is_array
(
$where
)){
$
where
=
$this
->
db
->
getSqlWhereByArray
(
$where
);
$
condition
=
$this
->
db
->
getSqlWhereByArray
(
$where
);
}
$result
=
$this
->
db
->
delete
(
$this
->
_tableName
)
->
where
(
$
where
)
->
execute
();
$result
=
$this
->
db
->
delete
(
$this
->
_tableName
)
->
where
(
$
condition
)
->
execute
();
if
(
$result
&&
isset
(
$where
[
'member_id'
])){
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db0\MemberMappingRedisModel
::
getInstance
(),
array
(
&
$this
,
'getList'
),
array
(),
array
(
$where
[
'member_id'
]));
}
...
...
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