Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
services
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tencent
services
Commits
aa64d736
Commit
aa64d736
authored
Nov 30, 2018
by
feixiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生成Data模板增加创建方法
parent
873a86b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
src/Commands/ClassTemplate/Data/ClassTemplate
+13
-0
No files found.
src/Commands/ClassTemplate/Data/ClassTemplate
View file @
aa64d736
...
...
@@ -8,6 +8,7 @@
namespace App\Models\Data;
use App\Models\Dao\{daoName};
use App\Models\Entity\{entityName};
use Swoft\Bean\Annotation\Bean;
use Swoft\Bean\Annotation\Inject;
...
...
@@ -26,6 +27,18 @@ class {dataName}
private ${varDaoName};
/**
* 插入数据
*
* @param array $info
* @return {entityName}
* @throws \Hdll\Services\Common\Exception\CommonException
*/
public function create(array $info) : {entityName}
{
return $this->{varDaoName}->create($info);
}
/**
* 查询一条数据
*
* @param array $condition
...
...
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