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
053360e3
Commit
053360e3
authored
Oct 19, 2018
by
zhz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into master_dev
parents
89e0eb5d
5bcc397c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
6 deletions
+40
-6
MessageService.php
application/models/Business/Message/MessageService.php
+7
-2
MemberService.php
application/models/Business/User/MemberService.php
+8
-3
Member.php
application/models/DAO/Member.php
+7
-1
get1.php
public/test/message/get1.php
+18
-0
No files found.
application/models/Business/Message/MessageService.php
View file @
053360e3
...
...
@@ -144,10 +144,15 @@ class MessageServiceModel extends \Business\AbstractModel
if
(
$type
==
ApiConst
::
storeMessageType
)
{
$store
=
\DAO\StoreModel
::
getInstance
();
// $storeData = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$store, 'getInfoById'), array($userid, $store->detailField), \Our\ApiConst::oneDaySecond,array($userid));
$storeData
=
$store
->
get
(
$userid
);
$storeData
=
$store
->
get
StoreInfoCache
(
$userid
);
$avatar
=
$storeData
[
'store_label'
];
if
(
$avatar
)
{
$avatar
=
\Our\Common
::
getStaticFile
(
$avatar
,
\Our\ImageConst
::
storeLabel
,
'ossHost'
);
}
else
{
$avatar
=
\Our\Common
::
getStaticFile
(
ImageConst
::
defaultStoreLabelName
,
ImageConst
::
defaultPath
);
}
// $avatar = $store->getInfoById($userid, 'store_label', 'store_label');
$avatar
=
$storeData
[
ApiConst
::
one
];
//
$avatar = $storeData[ApiConst::one];
}
if
(
$type
==
ApiConst
::
memberMessageType
||
$type
==
ApiConst
::
serviceMessageType
)
{
...
...
application/models/Business/User/MemberService.php
View file @
053360e3
...
...
@@ -85,8 +85,8 @@ class MemberServiceModel extends \Business\AbstractModel
}
public
function
getOneByMobileAndPassword
(
$mobile
,
$password
)
{
$password
=
$this
->
getPassAddKey
(
$password
);
$password
=
Common
::
format
(
'md5({0})'
);
//
$password=$this->getPassAddKey($password);
//
$password = Common::format('md5({0})');
$member
=
$this
->
memberDao
->
getOneByMobileAndPassword
(
$mobile
,
$password
);
return
$member
?
$member
:
false
;
}
...
...
@@ -275,7 +275,12 @@ class MemberServiceModel extends \Business\AbstractModel
private
function
saveRegisterMemberInfo
(
$where
){
$memberDao
=
\DAO\MemberModel
::
getInstance
(
\Our\DbNameConst
::
masterDBConnectName
);
$addKey
=
Common
::
getConfig
(
'password.key'
);
$md5Str
=
TIMESTAMP
.
$addKey
.
$where
[
'password'
];
if
(
!
empty
(
$addKey
)){
$md5Str
=
TIMESTAMP
.
$addKey
.
$where
[
'password'
];
}
else
{
$md5Str
=
$where
[
'password'
];
}
//构造需要保存的会员信息
$member
[
'member_name'
]
=
\Our\CommonExtension
::
createNewMemberName
();
$member
[
'member_mobile'
]
=
$where
[
'mobile'
];
...
...
application/models/DAO/Member.php
View file @
053360e3
...
...
@@ -4,6 +4,7 @@ namespace DAO;
use
Error\CodeConfigModel
;
use
Error\ErrorModel
;
use
Our\Common
;
use
Our\ImageConst
;
use
Our\NameConst
;
use
Our\ApiConst
;
...
...
@@ -68,7 +69,12 @@ class MemberModel extends \DAO\AbstractModel
{
$this
->
setDb
(
\Our\DbNameConst
::
masterDBConnectName
);
$where
[
NameConst
::
memberMobile
]
=
$mobile
;
$where
[
NameConst
::
memberPasswd
]
=
$password
;
$addKey
=
Common
::
getConfig
(
'password.key'
);
if
(
!
empty
(
$addKey
)){
$where
[
NameConst
::
memberPasswd
]
=
Common
::
format
(
"MD5(CONCAT(member_time,member_passwd,'
{
0
}
'))"
,
$addKey
);
}
else
{
$where
[
NameConst
::
memberPasswd
]
=
md5
(
$password
);
}
$result
=
$this
->
db
->
select
(
$this
->
availMemberColumn
)
->
from
(
$this
->
_tableName
)
->
where
(
$where
)
->
fetchOne
();
if
(
$result
)
{
$memberAvatarUrl
=
$this
->
getMemberAvatarUrl
(
$result
[
'member_id'
],
$result
[
'member_avatar'
]);
...
...
public/test/message/get1.php
0 → 100644
View file @
053360e3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>
获得已发送消息的用户列表和(系统消息,订单消息,快递用户消息最后一条消息)
</title>
<style>
</style>
</head>
<body>
<form
action=
"/message/get"
method=
"post"
>
用户登录状态key:
<input
name=
"data[key]"
value=
"fd4b739c4815297044191451eabf0eb5"
/><br
/>
<input
type=
"submit"
value=
"提交"
>
</form>
</body>
</html>
\ No newline at end of file
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