Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zhupu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sugar
zhupu
Commits
f56842d0
Commit
f56842d0
authored
Nov 21, 2023
by
wuxiaoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的激活码
parent
293194b3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletion
+29
-1
application/api/controller/Family.php
application/api/controller/Family.php
+1
-1
application/api/controller/FamilyTree.php
application/api/controller/FamilyTree.php
+13
-0
application/lib/model/FamilyTreeModel.php
application/lib/model/FamilyTreeModel.php
+15
-0
No files found.
application/api/controller/Family.php
View file @
f56842d0
...
@@ -68,7 +68,7 @@ class Family extends Api
...
@@ -68,7 +68,7 @@ class Family extends Api
$data
=
FamilyTreeModel
::
claimFamilyPeople
([
'ft1.name'
=>
$name
,
'ft2.name'
=>
$parent_name
,
'ft3.name'
=>
$grandpa_name
]);
$data
=
FamilyTreeModel
::
claimFamilyPeople
([
'ft1.name'
=>
$name
,
'ft2.name'
=>
$parent_name
,
'ft3.name'
=>
$grandpa_name
]);
$list
=
[];
$list
=
[];
if
(
$type
==
2
){
if
(
$type
==
2
){
$family_id
=
NameCardModel
::
where
([
'activation_code'
=>
$activation_code
,
'user_id'
=>
0
])
->
column
(
"family_id"
);
$family_id
=
NameCardModel
::
where
([
'activation_code'
=>
$activation_code
,
'user_id'
=>
0
])
->
value
(
"family_id"
);
foreach
(
$data
as
$key
=>
$val
){
foreach
(
$data
as
$key
=>
$val
){
if
(
$val
[
'family_id'
]
==
$family_id
){
if
(
$val
[
'family_id'
]
==
$family_id
){
array_push
(
$list
,
$val
);
array_push
(
$list
,
$val
);
...
...
application/api/controller/FamilyTree.php
View file @
f56842d0
...
@@ -701,6 +701,19 @@ class FamilyTree extends Api
...
@@ -701,6 +701,19 @@ class FamilyTree extends Api
$this
->
success
(
"审核成功"
);
$this
->
success
(
"审核成功"
);
}
}
/**
* 我创建的族员
*/
public
function
myCreateFamilyPeople
(){
$page
=
$this
->
request
->
param
(
"page"
,
1
);
$skeyword
=
$this
->
request
->
param
(
"skeyword"
);
$map
[
"ft.create_user_id"
]
=
$this
->
auth
->
id
;
if
(
!
empty
(
$skeyword
)){
$map
[
"ft.name"
]
=
[
"like"
,
"%"
.
$skeyword
.
"%"
];
}
$list
=
FamilyTreeModel
::
myCreateFamilyPeople
(
$map
,
$page
,
$this
->
pageSize
);
$this
->
success
(
""
,
$list
);
}
...
...
application/lib/model/FamilyTreeModel.php
View file @
f56842d0
...
@@ -206,4 +206,19 @@ ORDER BY
...
@@ -206,4 +206,19 @@ ORDER BY
return $data;
return $data;
}*/
}*/
/**
* 查询我创建的族员
*/
public
static
function
myCreateFamilyPeople
(
$where
,
$page
,
$pageSize
=
10
){
$data
=
self
::
alias
(
"ft"
)
->
join
(
"family_people fp"
,
"ft.people_id=fp.id"
,
"LEFT"
)
->
field
(
"ft.id,ft.name,ft.photo,ft.sex,ft.people_id,fp.activation_code"
)
->
where
(
$where
)
->
page
(
$page
)
->
limit
(
$pageSize
)
->
order
(
"ft.parent_id asc,ft.id asc"
)
->
select
();
return
$data
;
}
}
}
\ 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