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
f85d553c
Commit
f85d553c
authored
Oct 17, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pc
parent
45d36dff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
MemberService.php
application/models/Business/User/MemberService.php
+2
-2
Member.php
application/models/DAO/Member.php
+13
-2
grow.php
scripts/crontab/growGoodsStores/grow.php
+1
-3
No files found.
application/models/Business/User/MemberService.php
View file @
f85d553c
...
...
@@ -947,8 +947,8 @@ class MemberServiceModel extends \Business\AbstractModel
public
function
growMembers
(){
$memberDao
=
\DAO\MemberModel
::
getInstance
();
$res
=
$memberDao
->
getAll
();
for
(
$i
=
0
;
$i
<
1000
000
;
$i
++
){
$memberId
=
50000
+
$i
;
for
(
$i
=
0
;
$i
<
367
000
;
$i
++
){
$memberId
=
632723
+
$i
;
$re
=
array_rand
(
$res
);
if
(
!
empty
(
$res
[
$re
])){
$data
=
$res
[
$re
];
...
...
application/models/DAO/Member.php
View file @
f85d553c
...
...
@@ -118,8 +118,9 @@ class MemberModel extends \DAO\AbstractModel
*/
public
function
addInfo
(
$data
)
{
$this
->
setDb
(
\Our\DbNameConst
::
masterDBConnectName
);
$result
=
$this
->
db
->
insert
(
$this
->
_tableName
)
->
rows
(
$data
)
->
execute
();
// $this->setDb(\Our\DbNameConst::masterDBConnectName);
// $result = $this->db->insert($this->_tableName)->rows($data)->execute();
$result
=
$this
->
add
(
$data
);
if
(
$result
)
{
$memberDb0Redis
=
\Redis\Db0\MemberRedisModel
::
getInstance
();
$memberAvatar
=
''
;
...
...
@@ -135,6 +136,16 @@ class MemberModel extends \DAO\AbstractModel
return
false
;
}
/**
* 保存用户信息
*/
public
function
add
(
$data
)
{
$this
->
setDb
(
\Our\DbNameConst
::
masterDBConnectName
);
$result
=
$this
->
db
->
insert
(
$this
->
_tableName
)
->
rows
(
$data
)
->
execute
();
return
$result
;
}
/**
* 类实例
...
...
scripts/crontab/growGoodsStores/grow.php
View file @
f85d553c
...
...
@@ -68,9 +68,7 @@ class cliGrow extends basecli
}
$this
->
bDoUnLock
=
true
;
file_put_contents
(
$this
->
lockFileName
,
"running"
);
// CLI 独占锁
$goodsCommonStrorageDao
=
\DAO\Storage\GoodsCommonStorageModel
::
getInstance
();
$goodsStorageDao
=
\DAO\Storage\GoodsStorageModel
::
getInstance
();
$goodsImagesStorageDao
=
\DAO\Storage\GoodsImagesStorageModel
::
getInstance
();
$memberService
=
\Business\User\MemberServiceModel
::
getInstance
();
try
{
$memberService
->
growMembers
();
...
...
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