Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
9a29fa00
Commit
9a29fa00
authored
Oct 17, 2016
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
orders 增加 courseWithTeachers
parent
1cf69a22
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
Income.php
src/common/models/Income.php
+1
-1
Orders.php
src/common/models/Orders.php
+5
-0
index.php
src/frontend/views/my-income/index.php
+2
-2
No files found.
src/common/models/Income.php
View file @
9a29fa00
...
@@ -76,7 +76,7 @@ class Income extends \yii\db\ActiveRecord
...
@@ -76,7 +76,7 @@ class Income extends \yii\db\ActiveRecord
public
function
getOrder
()
public
function
getOrder
()
{
{
return
$this
->
hasOne
(
Orders
::
className
(),
[
'id'
=>
'orders_id'
])
->
with
(
'user'
)
->
with
(
'course'
);
return
$this
->
hasOne
(
Orders
::
className
(),
[
'id'
=>
'orders_id'
])
->
with
(
'user'
)
->
with
(
'course
WithTeachers
'
);
}
}
//public function getUser()
//public function getUser()
...
...
src/common/models/Orders.php
View file @
9a29fa00
...
@@ -130,4 +130,9 @@ class Orders extends \yii\db\ActiveRecord
...
@@ -130,4 +130,9 @@ class Orders extends \yii\db\ActiveRecord
return
$this
->
hasOne
(
Course
::
className
(),
[
'id'
=>
'course_id'
])
->
select
(
'id,user_id,name,price,preview_pic'
);
return
$this
->
hasOne
(
Course
::
className
(),
[
'id'
=>
'course_id'
])
->
select
(
'id,user_id,name,price,preview_pic'
);
}
}
public
function
getCourseWithTeachers
()
{
return
$this
->
hasOne
(
Course
::
className
(),
[
'id'
=>
'course_id'
])
->
select
(
'id,user_id,name,price,preview_pic'
)
->
with
(
'teachers'
);
}
}
}
src/frontend/views/my-income/index.php
View file @
9a29fa00
...
@@ -37,8 +37,8 @@ $this->title = '知识有价';
...
@@ -37,8 +37,8 @@ $this->title = '知识有价';
20012313131
<br/>
20012313131
<br/>
2016-12-11
2016-12-11
</td>
</td>
<td>
<?=
$row
[
'order'
][
'user'
][
'
'
]
?>
/ 百丐洪七公
</td>
<td>
<?=
$row
[
'order'
][
'user'
][
'
telephone'
]
?>
/
<?=
$row
[
'order'
][
'user'
][
'username'
]
?>
</td>
<td>
《
中国为什么这么久还没有进入社会主义社会
》
</td>
<td>
《
<?=
$row
[
'order'
][
'courseWithTeachers'
][
'name'
]
?>
》
</td>
<td>
¥123.00
</td>
<td>
¥123.00
</td>
<td>
审核中
</td>
<td>
审核中
</td>
</tr>
</tr>
...
...
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