Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • J jz-api-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • jizhi-backend
  • jz-api-core
  • Wiki
  • Home

Home · Changes

Page history
xigua created page: home authored Jul 06, 2017 by xigua's avatar xigua
Hide whitespace changes
Inline Side-by-side
Showing with 25 additions and 0 deletions
+25 -0
  • home.md home.md +25 -0
  • No files found.
home.md
View page @ 340e060e
...@@ -41,3 +41,28 @@ ...@@ -41,3 +41,28 @@
3. sort - 排序 3. sort - 排序
4. skip - 忽略多少条记录,用于mongo数据库查询分页时,返回指定页的数据时使用,比如页面大小limit=10,需要第三页时skip为20 4. skip - 忽略多少条记录,用于mongo数据库查询分页时,返回指定页的数据时使用,比如页面大小limit=10,需要第三页时skip为20
* isLogin(me: Me) - 当前用户是否已经登录 * isLogin(me: Me) - 当前用户是否已经登录
# DBService
```javascript
/**
* return entity given id
* @param entityType
* @param id
* @param fieldsToKeep
* @param me
* @param useCache
* @param context
*/
export function getEntityById(entityType: string, id: string, fieldsToHide: string[], fieldsToKeep: string[], context: Context, useCache: boolean = true, runHook: boolean = false): object
/**
* Return single entity from given query. query here represents a regular mongo search query object
* @param query
* @param fields
* @param me
* @param context
*/
export function getSingleEntity(entityType: string, query: any, fieldsToHide: string[], fieldsToKeep: string[], context: Context, runHook: boolean = false): object | null
```
\ No newline at end of file
Clone repository
  • Home
  • jz backend project skeleton