houyaf 3 年之前
父节点
当前提交
f578ccfbc0

+ 18 - 18
pkg/system/datamodel/art.go

@@ -3,25 +3,25 @@ package datamodel
 import "time"
 
 type Art struct {
-    OcId       int64  `json:"ocId"         xorm:"'oc_id'         bigint     pk  comment('OC ID')    "`
-    ArtId      int64  `json:"artId"        xorm:"'art_id'        bigint     pk  comment('ArtId')    "`
-    ArtCatId   int64  `json:"artCatId"     xorm:"'art_cat_id'    bigint     pk  comment('ArtCatId') "`
-    ArtTitle   string `json:"artTitle"     xorm:"'art_title'     varchar(127)   comment('ArtTitle') "`
-    ArtContent string `json:"artContent"   xorm:"'art_content'   varchar(127)   comment('Content')  "`
-    ArtAuthor  string `json:"artAuthor"    xorm:"'art_author'    varchar(127)   comment('Content')  "`
-    ArtSource  string `json:"artSource"    xorm:"'art_source'    varchar(127)   comment('Content')  "`
+    OcId       int64        `json:"ocId"         xorm:"'oc_id'         bigint     pk  comment('OC ID')    "`
+    ArtId      int64        `json:"artId"        xorm:"'art_id'        bigint     pk  comment('ArtId')    "`
+    ArtCatId   int64        `json:"artCatId"     xorm:"'art_cat_id'    bigint     pk  comment('ArtCatId') "`
+    ArtTitle   string       `json:"artTitle"     xorm:"'art_title'     varchar(127)   comment('ArtTitle') "`
+    ArtContent string       `json:"artContent"   xorm:"'art_content'   varchar(127)   comment('Content')  "`
+    ArtAuthor  string       `json:"artAuthor"    xorm:"'art_author'    varchar(127)   comment('Content')  "`
+    ArtSource  string       `json:"artSource"    xorm:"'art_source'    varchar(127)   comment('Content')  "`
 
-    Status      int64     `json:"status"       xorm:"'status'        bigint         comment('Status')    "`
-    EditorId    int64     `json:"editorId"     xorm:"'editor_id'     bigint         comment('EditorId')  "`
-    IssuedAt    time.Time `json:"issuedAt"     xorm:"'issued_at'     datetime       comment('Datetime')  "`
-    IsFixed     int64     `json:"isFixed"      xorm:"'is_fixed'      bigint         comment('是否可修改')  "`
-    CreatedBy   int64     `json:"createdBy"    xorm:"'created_by'"`
-    CreatedAt   time.Time `json:"createdAt"    xorm:"'created_at'"`
-    UpdatedBy   int64     `json:"updatedBy"    xorm:"'updated_by'"`
-    UpdatedAt   time.Time `json:"updatedAt"    xorm:"'updated_at'"`
-    DeletedFlag int64     `json:"deletedFlag"  xorm:"'deleted_flag'"`
-    DeletedBy   int64     `json:"deletedBy"    xorm:"'deleted_by'"`
-    DeletedAt   time.Time `json:"deletedAt"    xorm:"'deleted_at'"`
+    Status      int64       `json:"status"       xorm:"'status'        bigint         comment('Status')    "`
+    EditorId    int64       `json:"editorId"     xorm:"'editor_id'     bigint         comment('EditorId')  "`
+    IssuedAt    time.Time   `json:"issuedAt"     xorm:"'issued_at'     datetime       comment('Datetime')  "`
+    IsFixed     int64       `json:"isFixed"      xorm:"'is_fixed'      bigint         comment('是否可修改')  "`
+    CreatedBy   int64       `json:"createdBy"    xorm:"'created_by'"`
+    CreatedAt   time.Time   `json:"createdAt"    xorm:"'created_at'"`
+    UpdatedBy   int64       `json:"updatedBy"    xorm:"'updated_by'"`
+    UpdatedAt   time.Time   `json:"updatedAt"    xorm:"'updated_at'"`
+    DeletedFlag int64       `json:"deletedFlag"  xorm:"'deleted_flag'"`
+    DeletedBy   int64       `json:"deletedBy"    xorm:"'deleted_by'"`
+    DeletedAt   time.Time   `json:"deletedAt"    xorm:"'deleted_at'"`
 }
 
 func (t *Art) TableName() string {

+ 10 - 10
pkg/system/datamodel/art_attach.go

@@ -3,17 +3,17 @@ package datamodel
 import "time"
 
 type ArtAttach struct {
-    OcId   int64 `json:"ocId"            xorm:"'oc_id'             bigint    pk comment('OC Id')       " `
-    ArtId  int64 `json:"artId"           xorm:"'art_id'            bigint    pk comment('主键ID')       " `
-    FileId int64 `json:"fileId"          xorm:"'file_id'           bigint    pk comment('主键ID')       " `
+    OcId        int64       `json:"ocId"            xorm:"'oc_id'             bigint    pk comment('OC Id')       " `
+    ArtId       int64       `json:"artId"           xorm:"'art_id'            bigint    pk comment('主键ID')       " `
+    FileId      int64       `json:"fileId"          xorm:"'file_id'           bigint    pk comment('主键ID')       " `
 
-    CreatedBy   int64     `json:"createdBy"       xorm:"'created_by'  " `
-    CreatedAt   time.Time `json:"createdAt"       xorm:"'created_at'  " `
-    UpdatedBy   int64     `json:"updatedBy"       xorm:"'updated_by'  " `
-    UpdatedAt   time.Time `json:"updatedAt"       xorm:"'updated_at'  " `
-    DeletedFlag int64     `json:"deletedFlag"     xorm:"'deleted_flag'" `
-    DeletedBy   int64     `json:"deletedBy"       xorm:"'deleted_by'  " `
-    DeletedAt   time.Time `json:"deletedAt"       xorm:"'deleted_at'  " `
+    CreatedBy   int64       `json:"createdBy"       xorm:"'created_by'  " `
+    CreatedAt   time.Time   `json:"createdAt"       xorm:"'created_at'  " `
+    UpdatedBy   int64       `json:"updatedBy"       xorm:"'updated_by'  " `
+    UpdatedAt   time.Time   `json:"updatedAt"       xorm:"'updated_at'  " `
+    DeletedFlag int64       `json:"deletedFlag"     xorm:"'deleted_flag'" `
+    DeletedBy   int64       `json:"deletedBy"       xorm:"'deleted_by'  " `
+    DeletedAt   time.Time   `json:"deletedAt"       xorm:"'deleted_at'  " `
 }
 
 func (m *ArtAttach) TableName() string {

+ 18 - 18
pkg/system/datamodel/art_cat.go

@@ -3,26 +3,26 @@ package datamodel
 import "time"
 
 type ArtCat struct {
-    OcId        int64  `json:"ocId"            xorm:"'oc_id'           bigint        pk  comment('OC ID')       "`
-    ArtCatId    int64  `json:"artCatId"        xorm:"'art_cat_id'      bigint        pk  comment('主键ID')       "`
-    ArtCatTitle string `json:"artCatTitle"     xorm:"'art_cat_title'   varchar(50)       comment('群组类型名称')  "`
-    ArtCatDesc  string `json:"artCatDesc"      xorm:"'art_cat_desc'    varchar(50)       comment('描述')         "`
+    OcId        int64       `json:"ocId"            xorm:"'oc_id'           bigint        pk  comment('OC ID')       "`
+    ArtCatId    int64       `json:"artCatId"        xorm:"'art_cat_id'      bigint        pk  comment('主键ID')       "`
+    ArtCatTitle string      `json:"artCatTitle"     xorm:"'art_cat_title'   varchar(50)       comment('群组类型名称')  "`
+    ArtCatDesc  string      `json:"artCatDesc"      xorm:"'art_cat_desc'    varchar(50)       comment('描述')         "`
 
-    RootId    int64 `json:"rootId"          xorm:"'root_id'         bigint not null   comment('Order')      " `
-    ParentId  int64 `json:"parentId"        xorm:"'parent_id'       bigint not null   comment('父群组ID')    " `
-    NodeLeft  int64 `json:"nodeLeft"        xorm:"'node_left'       bigint not null   comment('群组LEFT')    " `
-    NodeRight int64 `json:"nodeRight"       xorm:"'node_right'      bigint not null   comment('群组RIGHT')   " `
-    NodeLevel int64 `json:"nodeLevel"       xorm:"'node_level'      bigint not null   comment('群组LEVEL')   " `
-    IsLeaf    int64 `json:"isLeaf"          xorm:"'is_leaf'         bigint not null   comment('LEAF群组')    " `
-    IsFixed   int64 `json:"isFixed"         xorm:"'is_fixed'        bigint not null   comment('群组STATUS')  " `
+    RootId      int64       `json:"rootId"          xorm:"'root_id'         bigint not null   comment('Order')      " `
+    ParentId    int64       `json:"parentId"        xorm:"'parent_id'       bigint not null   comment('父群组ID')    " `
+    NodeLeft    int64       `json:"nodeLeft"        xorm:"'node_left'       bigint not null   comment('群组LEFT')    " `
+    NodeRight   int64       `json:"nodeRight"       xorm:"'node_right'      bigint not null   comment('群组RIGHT')   " `
+    NodeLevel   int64       `json:"nodeLevel"       xorm:"'node_level'      bigint not null   comment('群组LEVEL')   " `
+    IsLeaf      int64       `json:"isLeaf"          xorm:"'is_leaf'         bigint not null   comment('LEAF群组')    " `
+    IsFixed     int64       `json:"isFixed"         xorm:"'is_fixed'        bigint not null   comment('群组STATUS')  " `
 
-    CreatedBy   int64     `json:"createdBy"       xorm:"'created_by'"`
-    CreatedAt   time.Time `json:"createdAt"       xorm:"'created_at'"`
-    UpdatedBy   int64     `json:"updatedBy"       xorm:"'updated_by'"`
-    UpdatedAt   time.Time `json:"updatedAt"       xorm:"'updated_at'"`
-    DeletedFlag int64     `json:"deletedFlag"     xorm:"'deleted_flag'"`
-    DeletedBy   int64     `json:"deletedBy"       xorm:"'deleted_by'"`
-    DeletedAt   time.Time `json:"deletedAt"       xorm:"'deleted_at'"`
+    CreatedBy   int64       `json:"createdBy"       xorm:"'created_by'"`
+    CreatedAt   time.Time   `json:"createdAt"       xorm:"'created_at'"`
+    UpdatedBy   int64       `json:"updatedBy"       xorm:"'updated_by'"`
+    UpdatedAt   time.Time   `json:"updatedAt"       xorm:"'updated_at'"`
+    DeletedFlag int64       `json:"deletedFlag"     xorm:"'deleted_flag'"`
+    DeletedBy   int64       `json:"deletedBy"       xorm:"'deleted_by'"`
+    DeletedAt   time.Time   `json:"deletedAt"       xorm:"'deleted_at'"`
 }
 
 func (t *ArtCat) TableName() string {

+ 12 - 12
pkg/system/datamodel/doc_cat.go

@@ -3,18 +3,18 @@ package datamodel
 import "time"
 
 type DocCat struct {
-    OcId        int64     `json:"ocId"            xorm:"'oc_id'           bigint     pk comment('OC ID')          "`
-    DocCatId    int64     `json:"docCatId"        xorm:"'doc_cat_id'      bigint     pk comment('DOC CAT ID')     "`
-    DocCatTitle string    `json:"docCatTitle"     xorm:"'doc_cat_title'   varchar(127)  comment('群组类型名称')     "`
-    DocCatDesc  string    `json:"docCatDesc"      xorm:"'doc_cat_desc'    varchar(127)  comment('描述')            "`
-    IsFixed     int64     `json:"isFixed"         xorm:"'is_fixed'        int           comment('是否可修改')       "`
-    CreatedBy   int64     `json:"createdBy"       xorm:"'created_by'"`
-    CreatedAt   time.Time `json:"createdAt"       xorm:"'created_at'"`
-    UpdatedBy   int64     `json:"updatedBy"       xorm:"'updated_by'"`
-    UpdatedAt   time.Time `json:"updatedAt"       xorm:"'updated_at'"`
-    DeletedFlag int64     `json:"deletedFlag"     xorm:"'deleted_flag'"`
-    DeletedBy   int64     `json:"deletedBy"       xorm:"'deleted_by'"`
-    DeletedAt   time.Time `json:"deletedAt"       xorm:"'deleted_at'"`
+    OcId        int64       `json:"ocId"            xorm:"'oc_id'           bigint     pk comment('OC ID')          "`
+    DocCatId    int64       `json:"docCatId"        xorm:"'doc_cat_id'      bigint     pk comment('DOC CAT ID')     "`
+    DocCatTitle string      `json:"docCatTitle"     xorm:"'doc_cat_title'   varchar(127)  comment('群组类型名称')     "`
+    DocCatDesc  string      `json:"docCatDesc"      xorm:"'doc_cat_desc'    varchar(127)  comment('描述')            "`
+    IsFixed     int64       `json:"isFixed"         xorm:"'is_fixed'        int           comment('是否可修改')       "`
+    CreatedBy   int64       `json:"createdBy"       xorm:"'created_by'"`
+    CreatedAt   time.Time   `json:"createdAt"       xorm:"'created_at'"`
+    UpdatedBy   int64       `json:"updatedBy"       xorm:"'updated_by'"`
+    UpdatedAt   time.Time   `json:"updatedAt"       xorm:"'updated_at'"`
+    DeletedFlag int64       `json:"deletedFlag"     xorm:"'deleted_flag'"`
+    DeletedBy   int64       `json:"deletedBy"       xorm:"'deleted_by'"`
+    DeletedAt   time.Time   `json:"deletedAt"       xorm:"'deleted_at'"`
 }
 
 func (t *DocCat) TableName() string {

+ 18 - 19
pkg/system/datamodel/doc_dir.go

@@ -3,27 +3,26 @@ package datamodel
 import "time"
 
 type DocDir struct {
-    OcId int64 `json:"ocId"         xorm:"'oc_id'       bigint     pk  comment('OC ID')    "`
+    OcId        int64       `json:"ocId"         xorm:"'oc_id'       bigint         pk  comment('OC ID')        "`
+    DirId       int64       `json:"dirId"        xorm:"'dir_id'      bigint         pk  comment('主键ID')         "`
+    DirTitle    string      `json:"dirTitle"     xorm:"'dir_title'   varchar(50)        comment('群组类型名称')   "`
+    DirDesc     string      `json:"dirDesc"      xorm:"'dir_desc'    varchar(50)        comment('描述')           "`
 
-    DirId    int64  `json:"dirId"        xorm:"'dir_id'      bigint        pk  comment('主键ID')       "`
-    DirTitle string `json:"dirTitle"     xorm:"'dir_title'   varchar(50)       comment('群组类型名称')  "`
-    DirDesc  string `json:"dirDesc"      xorm:"'dir_desc'    varchar(50)       comment('描述')         "`
+    RootId      int64       `json:"rootId"       xorm:"'root_id'     bigint not null    comment('Order')       " `
+    ParentId    int64       `json:"parentId"     xorm:"'parent_id'   bigint not null    comment('父群组ID')     " `
+    NodeLeft    int64       `json:"nodeLeft"     xorm:"'node_left'   bigint not null    comment('群组LEFT')     " `
+    NodeRight   int64       `json:"nodeRight"    xorm:"'node_right'  bigint not null    comment('群组RIGHT')    " `
+    NodeLevel   int64       `json:"nodeLevel"    xorm:"'node_level'  bigint not null    comment('群组LEVEL')    " `
+    IsLeaf      int64       `json:"isLeaf"       xorm:"'is_leaf'     bigint not null    comment('LEAF群组')     " `
+    IsFixed     int64       `json:"isFixed"      xorm:"'is_fixed'    bigint not null    comment('群组STATUS')   " `
 
-    RootId    int64 `json:"rootId"       xorm:"'root_id'     bigint not null   comment('Order')      " `
-    ParentId  int64 `json:"parentId"     xorm:"'parent_id'   bigint not null   comment('父群组ID')    " `
-    NodeLeft  int64 `json:"nodeLeft"     xorm:"'node_left'   bigint not null   comment('群组LEFT')    " `
-    NodeRight int64 `json:"nodeRight"    xorm:"'node_right'  bigint not null   comment('群组RIGHT')   " `
-    NodeLevel int64 `json:"nodeLevel"    xorm:"'node_level'  bigint not null   comment('群组LEVEL')   " `
-    IsLeaf    int64 `json:"isLeaf"       xorm:"'is_leaf'     bigint not null   comment('LEAF群组')    " `
-    IsFixed   int64 `json:"isFixed"      xorm:"'is_fixed'    bigint not null   comment('群组STATUS')  " `
-
-    CreatedBy   int64     `json:"createdBy"    xorm:"'created_by'"`
-    CreatedAt   time.Time `json:"createdAt"    xorm:"'created_at'"`
-    UpdatedBy   int64     `json:"updatedBy"    xorm:"'updated_by'"`
-    UpdatedAt   time.Time `json:"updatedAt"    xorm:"'updated_at'"`
-    DeletedFlag int64     `json:"deletedFlag"  xorm:"'deleted_flag'"`
-    DeletedBy   int64     `json:"deletedBy"    xorm:"'deleted_by'"`
-    DeletedAt   time.Time `json:"deletedAt"    xorm:"'deleted_at'"`
+    CreatedBy   int64       `json:"createdBy"    xorm:"'created_by'"`
+    CreatedAt   time.Time   `json:"createdAt"    xorm:"'created_at'"`
+    UpdatedBy   int64       `json:"updatedBy"    xorm:"'updated_by'"`
+    UpdatedAt   time.Time   `json:"updatedAt"    xorm:"'updated_at'"`
+    DeletedFlag int64       `json:"deletedFlag"  xorm:"'deleted_flag'"`
+    DeletedBy   int64       `json:"deletedBy"    xorm:"'deleted_by'"`
+    DeletedAt   time.Time   `json:"deletedAt"    xorm:"'deleted_at'"`
 }
 
 func (t *DocDir) TableName() string {

+ 20 - 21
pkg/system/datamodel/doc_file.go

@@ -3,31 +3,30 @@ package datamodel
 import "time"
 
 type DocFile struct {
-    OcId int64 `json:"ocId"             xorm:"'oc_id'            bigint     pk comment('OC Id')       " `
+    OcId            int64       `json:"ocId"             xorm:"'oc_id'            bigint     pk comment('OC Id')       " `
+    DirId           int64       `json:"dirId"            xorm:"'dir_id'           bigint        comment('Dir ID')      "`
 
-    FileId    int64  `json:"fileId"           xorm:"'file_id'          bigint     pk comment('主键ID')       " `
-    FileTitle string `json:"fileTitle"        xorm:"'file_title'       varchar(50)   comment('File Title')  "`
-    FileIcon  string `json:"fileIcon"         xorm:"'file_icon'        varchar(50)   comment('File Url')    "`
-    FileExt   string `json:"fileExt"          xorm:"'file_ext'         varchar(50)   comment('File Url')    "`
+    FileId          int64       `json:"fileId"           xorm:"'file_id'          bigint     pk comment('主键ID')       " `
+    FileTitle       string      `json:"fileTitle"        xorm:"'file_title'       varchar(50)   comment('File Title')  "`
+    FileIcon        string      `json:"fileIcon"         xorm:"'file_icon'        varchar(50)   comment('File Url')    "`
+    FileExt         string      `json:"fileExt"          xorm:"'file_ext'         varchar(50)   comment('File Url')    "`
 
-    DirId int64 `json:"dirId"            xorm:"'dir_id'           bigint        comment('Dir ID')      "`
+    FileUrl         string      `json:"fileUrl"          xorm:"'file_url'         varchar(50)   comment('File Url')    "`
+    FileSize        int64       `json:"fileSize"         xorm:"'file_size'        bigint        comment('File Size')   "`
 
-    FileUrl  string `json:"fileUrl"          xorm:"'file_url'         varchar(50)   comment('File Url')    "`
-    FileSize int64  `json:"fileSize"         xorm:"'file_size'        bigint        comment('File Size')   "`
+    FileAuthor      string      `json:"fileAuthor"       xorm:"'file_author'      varchar(50)   comment('File Url')    "`
+    FileMimeType    string      `json:"fileMimeType"     xorm:"'file_mime_type'   varchar(50)   comment('File Url')    "`
 
-    FileAuthor   string `json:"fileAuthor"       xorm:"'file_author'      varchar(50)   comment('File Url')    "`
-    FileMimeType string `json:"fileMimeType"     xorm:"'file_mime_type'   varchar(50)   comment('File Url')    "`
+    FileDesc        string      `json:"fileDesc"         xorm:"'file_desc'        varchar(50)   comment('File Desc')   "`
 
-    FileDesc string `json:"fileDesc"         xorm:"'file_desc'        varchar(50)   comment('File Desc')   "`
+    UploadedAt      time.Time   `json:"uploadedAt"       xorm:"'uploaded_at'    "`
+    UploadedBy      int64       `json:"uploadedBy"       xorm:"'uploaded_by'    "`
 
-    UploadedAt time.Time `json:"uploadedAt"       xorm:"'uploaded_at'    "`
-    UploadedBy int64     `json:"uploadedBy"       xorm:"'uploaded_by'    "`
-
-    CreatedBy   int64     `json:"createdBy"        xorm:"'created_by'"`
-    CreatedAt   time.Time `json:"createdAt"        xorm:"'created_at'"`
-    UpdatedBy   int64     `json:"updatedBy"        xorm:"'updated_by'"`
-    UpdatedAt   time.Time `json:"updatedAt"        xorm:"'updated_at'"`
-    DeletedFlag int64     `json:"deletedFlag"      xorm:"'deleted_flag'"`
-    DeletedBy   int64     `json:"deletedBy"        xorm:"'deleted_by'"`
-    DeletedAt   time.Time `json:"deletedAt"        xorm:"'deleted_at'"`
+    CreatedBy       int64       `json:"createdBy"        xorm:"'created_by'"`
+    CreatedAt       time.Time   `json:"createdAt"        xorm:"'created_at'"`
+    UpdatedBy       int64       `json:"updatedBy"        xorm:"'updated_by'"`
+    UpdatedAt       time.Time   `json:"updatedAt"        xorm:"'updated_at'"`
+    DeletedFlag     int64       `json:"deletedFlag"      xorm:"'deleted_flag'"`
+    DeletedBy       int64       `json:"deletedBy"        xorm:"'deleted_by'"`
+    DeletedAt       time.Time   `json:"deletedAt"        xorm:"'deleted_at'"`
 }

+ 22 - 22
pkg/system/datamodel/group.go

@@ -4,32 +4,32 @@ import "time"
 
 // Group Account Data Model
 type Group struct {
-    OcId       int64  `json:"ocId"            xorm:"'oc_id'               bigint not null pk     comment('公司组织ID')  " `
-    GroupId    int64  `json:"groupId"         xorm:"'group_id'            bigint not null pk     comment('群组ID')     " `
-    GroupName  string `json:"groupName"       xorm:"'group_name'          varchar(127) not null  comment('群组名称')    " `
-    GroupCatId int64  `json:"groupCatId"      xorm:"'group_cat_id'        bigint not null        comment('群组类型ID')  " `
+    OcId        int64       `json:"ocId"            xorm:"'oc_id'               bigint not null pk     comment('公司组织ID')  " `
+    GroupId     int64       `json:"groupId"         xorm:"'group_id'            bigint not null pk     comment('群组ID')     " `
+    GroupName   string      `json:"groupName"       xorm:"'group_name'          varchar(127) not null  comment('群组名称')    " `
+    GroupCatId  int64       `json:"groupCatId"      xorm:"'group_cat_id'        bigint not null        comment('群组类型ID')  " `
 
-    GroupPath   string `json:"groupPath"       xorm:"'group_path'          varchar(255) not null  comment('群组PATH')    " `
-    GroupDesc   string `json:"groupDesc"       xorm:"'group_desc'          varchar(255) not null  comment('群组DESC')    " `
-    GroupCode   string `json:"groupCode"       xorm:"'group_code'          varchar(127) not null  comment('群组CODE')    " `
-    GroupSelect string `json:"groupSelect"     xorm:"'group_select'        varchar(255) not null  comment('群组PATH')    " `
+    GroupPath   string      `json:"groupPath"       xorm:"'group_path'          varchar(255) not null  comment('群组PATH')    " `
+    GroupDesc   string      `json:"groupDesc"       xorm:"'group_desc'          varchar(255) not null  comment('群组DESC')    " `
+    GroupCode   string      `json:"groupCode"       xorm:"'group_code'          varchar(127) not null  comment('群组CODE')    " `
+    GroupSelect string      `json:"groupSelect"     xorm:"'group_select'        varchar(255) not null  comment('群组PATH')    " `
 
-    RootId    int64 `json:"rootId"          xorm:"'root_id'             bigint not null        comment('Order')      " `
-    ParentId  int64 `json:"parentId"        xorm:"'parent_id'           bigint not null        comment('父群组ID')    " `
-    NodeLeft  int64 `json:"nodeLeft"        xorm:"'node_left'           bigint not null        comment('群组LEFT')    " `
-    NodeRight int64 `json:"nodeRight"       xorm:"'node_right'          bigint not null        comment('群组RIGHT')   " `
-    NodeLevel int64 `json:"nodeLevel"       xorm:"'node_level'          bigint not null        comment('群组LEVEL')   " `
+    RootId      int64       `json:"rootId"          xorm:"'root_id'             bigint not null        comment('Order')      " `
+    ParentId    int64       `json:"parentId"        xorm:"'parent_id'           bigint not null        comment('父群组ID')    " `
+    NodeLeft    int64       `json:"nodeLeft"        xorm:"'node_left'           bigint not null        comment('群组LEFT')    " `
+    NodeRight   int64       `json:"nodeRight"       xorm:"'node_right'          bigint not null        comment('群组RIGHT')   " `
+    NodeLevel   int64       `json:"nodeLevel"       xorm:"'node_level'          bigint not null        comment('群组LEVEL')   " `
 
-    IsLeaf  int64 `json:"isLeaf"          xorm:"'is_leaf'             bigint not null        comment('LEAF群组')    " `
-    IsFixed int64 `json:"isFixed"         xorm:"'is_fixed'            bigint not null        comment('群组STATUS')  " `
+    IsLeaf      int64       `json:"isLeaf"          xorm:"'is_leaf'             bigint not null        comment('LEAF群组')    " `
+    IsFixed     int64       `json:"isFixed"         xorm:"'is_fixed'            bigint not null        comment('群组STATUS')  " `
 
-    CreatedBy   int64     `json:"createdBy"       xorm:"'created_by'  " `
-    CreatedAt   time.Time `json:"createdAt"       xorm:"'created_at'  " `
-    UpdatedBy   int64     `json:"updatedBy"       xorm:"'updated_by'  " `
-    UpdatedAt   time.Time `json:"updatedAt"       xorm:"'updated_at'  " `
-    DeletedFlag int64     `json:"deletedFlag"     xorm:"'deleted_flag'" `
-    DeletedBy   int64     `json:"deletedBy"       xorm:"'deleted_by'  " `
-    DeletedAt   time.Time `json:"deletedAt"       xorm:"'deleted_at'  " `
+    CreatedBy   int64       `json:"createdBy"       xorm:"'created_by'  " `
+    CreatedAt   time.Time   `json:"createdAt"       xorm:"'created_at'  " `
+    UpdatedBy   int64       `json:"updatedBy"       xorm:"'updated_by'  " `
+    UpdatedAt   time.Time   `json:"updatedAt"       xorm:"'updated_at'  " `
+    DeletedFlag int64       `json:"deletedFlag"     xorm:"'deleted_flag'" `
+    DeletedBy   int64       `json:"deletedBy"       xorm:"'deleted_by'  " `
+    DeletedAt   time.Time   `json:"deletedAt"       xorm:"'deleted_at'  " `
 }
 
 func (t *Group) TableName() string {

+ 20 - 20
pkg/system/datamodel/msg.go

@@ -3,30 +3,30 @@ package datamodel
 import "time"
 
 type Msg struct {
-    OcId int64 `json:"ocId"            xorm:"'oc_id'         bigint     pk comment('OC ID')          "`
+    OcId        int64       `json:"ocId"            xorm:"'oc_id'         bigint     pk comment('OC ID')          "`
 
-    MsgId      int64  `json:"msgId"           xorm:"'msg_id'        bigint     pk comment('主键ID')          "`
-    MsgTitle   string `json:"msgTitle"        xorm:"'msg_title'     varchar(50)   comment('模型名称')         "`
-    MsgFrId    int64  `json:"msgFrId"         xorm:"'msg_fr_id'     bigint        comment('主键ID')          "`
-    MsgToGroup string `json:"msgToGroup"      xorm:"'msg_to_group'  varchar(255)  comment('描述')            "`
-    MsgTo      string `json:"msgTo"           xorm:"'msg_to'        varchar(255)  comment('描述')            "`
-    MsgCc      string `json:"msgCc"           xorm:"'msg_cc'        varchar(255)  comment('描述')            "`
+    MsgId       int64       `json:"msgId"           xorm:"'msg_id'        bigint     pk comment('主键ID')          "`
+    MsgTitle    string      `json:"msgTitle"        xorm:"'msg_title'     varchar(50)   comment('模型名称')         "`
+    MsgFrId     int64       `json:"msgFrId"         xorm:"'msg_fr_id'     bigint        comment('主键ID')          "`
+    MsgToGroup  string      `json:"msgToGroup"      xorm:"'msg_to_group'  varchar(255)  comment('描述')            "`
+    MsgTo       string      `json:"msgTo"           xorm:"'msg_to'        varchar(255)  comment('描述')            "`
+    MsgCc       string      `json:"msgCc"           xorm:"'msg_cc'        varchar(255)  comment('描述')            "`
 
-    MsgCatId   int64     `json:"msgCatId"        xorm:"'msg_cat_id'    bigint        comment('主键ID')          "`
-    MsgContent string    `json:"msgContent"      xorm:"'msg_content'   varchar(50)   comment('描述')            "`
-    MsgDetail  string    `json:"msgDetail"       xorm:"'msg_detail'    varchar(50)   comment('描述')            "`
-    MsgTime    time.Time `json:"msgTime"         xorm:"'msg_time'"`
+    MsgCatId    int64       `json:"msgCatId"        xorm:"'msg_cat_id'    bigint        comment('主键ID')          "`
+    MsgContent  string      `json:"msgContent"      xorm:"'msg_content'   varchar(50)   comment('描述')            "`
+    MsgDetail   string      `json:"msgDetail"       xorm:"'msg_detail'    varchar(50)   comment('描述')            "`
+    MsgTime     time.Time   `json:"msgTime"         xorm:"'msg_time'"`
 
-    Status    int64  `json:"status"          xorm:"'status'        bigint        comment('Status')         "`
-    MsgParams string `json:"msgParams"       xorm:"'msg_params'    varchar(50)   comment('Msg Params')     "`
+    Status      int64       `json:"status"          xorm:"'status'        bigint        comment('Status')         "`
+    MsgParams   string      `json:"msgParams"       xorm:"'msg_params'    varchar(50)   comment('Msg Params')     "`
 
-    CreatedBy   int64     `json:"createdBy"       xorm:"'created_by'"`
-    CreatedAt   time.Time `json:"createdAt"       xorm:"'created_at'"`
-    UpdatedBy   int64     `json:"updatedBy"       xorm:"'updated_by'"`
-    UpdatedAt   time.Time `json:"updatedAt"       xorm:"'updated_at'"`
-    DeletedFlag int64     `json:"deletedFlag"     xorm:"'deleted_flag'"`
-    DeletedBy   int64     `json:"deletedBy"       xorm:"'deleted_by'"`
-    DeletedAt   time.Time `json:"deletedAt"       xorm:"'deleted_at'"`
+    CreatedBy   int64       `json:"createdBy"       xorm:"'created_by'"`
+    CreatedAt   time.Time   `json:"createdAt"       xorm:"'created_at'"`
+    UpdatedBy   int64       `json:"updatedBy"       xorm:"'updated_by'"`
+    UpdatedAt   time.Time   `json:"updatedAt"       xorm:"'updated_at'"`
+    DeletedFlag int64       `json:"deletedFlag"     xorm:"'deleted_flag'"`
+    DeletedBy   int64       `json:"deletedBy"       xorm:"'deleted_by'"`
+    DeletedAt   time.Time   `json:"deletedAt"       xorm:"'deleted_at'"`
 }
 
 func (t *Msg) TableName() string {

+ 16 - 16
pkg/system/datamodel/msg_cat.go

@@ -3,24 +3,24 @@ package datamodel
 import "time"
 
 type MsgCat struct {
-    OcId        int64  `json:"-"                 xorm:"'oc_id'               bigint     pk comment('组织ID:公司或机构或单位ID')"`
-    MsgCatId    int64  `json:"msgCatId"          xorm:"'msg_cat_id'          bigint     pk comment('主键ID')                 "`
-    MsgCatTitle string `json:"msgCatTitle"       xorm:"'msg_cat_title'       varchar(50)   comment('群组类型名称')            "`
-    MsgCatDesc  string `json:"msgCatDesc"        xorm:"'msg_cat_desc'        varchar(50)   comment('描述')                   "`
-    IsLink      int64  `json:"isLink"            xorm:"'is_link'             bigint        comment('是否可修改')              "`
-    IsFixed     int64  `json:"isFixed"           xorm:"'is_fixed'            bigint        comment('是否可修改')              "`
-    IsDetailed  int64  `json:"isDetailed"        xorm:"'is_detailed'         bigint        comment('是否可修改')              "`
+    OcId                int64       `json:"-"                 xorm:"'oc_id'               bigint     pk comment('组织ID:公司或机构或单位ID')"`
+    MsgCatId            int64       `json:"msgCatId"          xorm:"'msg_cat_id'          bigint     pk comment('主键ID')                 "`
+    MsgCatTitle         string      `json:"msgCatTitle"       xorm:"'msg_cat_title'       varchar(50)   comment('群组类型名称')            "`
+    MsgCatDesc          string      `json:"msgCatDesc"        xorm:"'msg_cat_desc'        varchar(50)   comment('描述')                   "`
+    IsLink              int64       `json:"isLink"            xorm:"'is_link'             bigint        comment('是否可修改')              "`
+    IsFixed             int64       `json:"isFixed"           xorm:"'is_fixed'            bigint        comment('是否可修改')              "`
+    IsDetailed          int64       `json:"isDetailed"        xorm:"'is_detailed'         bigint        comment('是否可修改')              "`
 
-    MsgCatLink       string `json:"msgCatLink"        xorm:"'msg_cat_link'        varchar(50)   comment('描述')         "`
-    MsgCatLinkParams string `json:"msgCatLinkParams"  xorm:"'msg_cat_link_params' varchar(50)   comment('描述')         "`
+    MsgCatLink          string      `json:"msgCatLink"        xorm:"'msg_cat_link'        varchar(50)   comment('描述')         "`
+    MsgCatLinkParams    string      `json:"msgCatLinkParams"  xorm:"'msg_cat_link_params' varchar(50)   comment('描述')         "`
 
-    CreatedBy   int64     `json:"createdBy"         xorm:"'created_by'"`
-    CreatedAt   time.Time `json:"createdAt"         xorm:"'created_at'"`
-    UpdatedBy   int64     `json:"updatedBy"         xorm:"'updated_by'"`
-    UpdatedAt   time.Time `json:"updatedAt"         xorm:"'updated_at'"`
-    DeletedFlag int64     `json:"deletedFlag"       xorm:"'deleted_flag'"`
-    DeletedBy   int64     `json:"deletedBy"         xorm:"'deleted_by'"`
-    DeletedAt   time.Time `json:"deletedAt"         xorm:"'deleted_at'"`
+    CreatedBy           int64       `json:"createdBy"         xorm:"'created_by'"`
+    CreatedAt           time.Time   `json:"createdAt"         xorm:"'created_at'"`
+    UpdatedBy           int64       `json:"updatedBy"         xorm:"'updated_by'"`
+    UpdatedAt           time.Time   `json:"updatedAt"         xorm:"'updated_at'"`
+    DeletedFlag         int64       `json:"deletedFlag"       xorm:"'deleted_flag'"`
+    DeletedBy           int64       `json:"deletedBy"         xorm:"'deleted_by'"`
+    DeletedAt           time.Time   `json:"deletedAt"         xorm:"'deleted_at'"`
 }
 
 func (t *MsgCat) TableName() string {

+ 11 - 11
pkg/system/datamodel/msg_cc.go

@@ -3,18 +3,18 @@ package datamodel
 import "time"
 
 type MsgCc struct {
-    OcId    int64 `json:"-"               xorm:"'oc_id'             bigint     pk comment('组织ID:公司或机构或单位ID')"`
-    MsgId   int64 `json:"msgId"           xorm:"'msg_id'            bigint     pk comment('主键ID')                 "`
-    MsgCcId int64 `json:"msgCcId"         xorm:"'msg_cc_id'         bigint     pk comment('主键ID')                 "`
-    Status  int64 `json:"status"          xorm:"'status'            bigint     pk comment('主键ID')                 "`
+    OcId        int64       `json:"-"               xorm:"'oc_id'             bigint     pk comment('组织ID:公司或机构或单位ID')"`
+    MsgId       int64       `json:"msgId"           xorm:"'msg_id'            bigint     pk comment('主键ID')                 "`
+    MsgCcId     int64       `json:"msgCcId"         xorm:"'msg_cc_id'         bigint     pk comment('主键ID')                 "`
+    Status      int64       `json:"status"          xorm:"'status'            bigint     pk comment('主键ID')                 "`
 
-    CreatedBy   int64     `json:"createdBy"       xorm:"'created_by'"`
-    CreatedAt   time.Time `json:"createdAt"       xorm:"'created_at'"`
-    UpdatedBy   int64     `json:"updatedBy"       xorm:"'updated_by'"`
-    UpdatedAt   time.Time `json:"updatedAt"       xorm:"'updated_at'"`
-    DeletedFlag int64     `json:"deletedFlag"     xorm:"'deleted_flag'"`
-    DeletedBy   int64     `json:"deletedBy"       xorm:"'deleted_by'"`
-    DeletedAt   time.Time `json:"deletedAt"       xorm:"'deleted_at'"`
+    CreatedBy   int64       `json:"createdBy"       xorm:"'created_by'"`
+    CreatedAt   time.Time   `json:"createdAt"       xorm:"'created_at'"`
+    UpdatedBy   int64       `json:"updatedBy"       xorm:"'updated_by'"`
+    UpdatedAt   time.Time   `json:"updatedAt"       xorm:"'updated_at'"`
+    DeletedFlag int64       `json:"deletedFlag"     xorm:"'deleted_flag'"`
+    DeletedBy   int64       `json:"deletedBy"       xorm:"'deleted_by'"`
+    DeletedAt   time.Time   `json:"deletedAt"       xorm:"'deleted_at'"`
 }
 
 func (t *MsgCc) TableName() string {

+ 11 - 11
pkg/system/datamodel/msg_to.go

@@ -3,18 +3,18 @@ package datamodel
 import "time"
 
 type MsgTo struct {
-    OcId    int64 `json:"-"               xorm:"'oc_id'             bigint     pk comment('组织ID:公司或机构或单位ID')"`
-    MsgId   int64 `json:"msgId"           xorm:"'msg_id'            bigint     pk comment('主键ID')                 "`
-    MsgToId int64 `json:"msgToId"         xorm:"'msg_to_id'         bigint     pk comment('主键ID')                 "`
-    Status  int64 `json:"status"          xorm:"'status'            bigint     pk comment('主键ID')                 "`
+    OcId        int64       `json:"-"               xorm:"'oc_id'             bigint     pk comment('组织ID:公司或机构或单位ID')"`
+    MsgId       int64       `json:"msgId"           xorm:"'msg_id'            bigint     pk comment('主键ID')                 "`
+    MsgToId     int64       `json:"msgToId"         xorm:"'msg_to_id'         bigint     pk comment('主键ID')                 "`
+    Status      int64       `json:"status"          xorm:"'status'            bigint     pk comment('主键ID')                 "`
 
-    CreatedBy   int64     `json:"createdBy"       xorm:"'created_by'"`
-    CreatedAt   time.Time `json:"createdAt"       xorm:"'created_at'"`
-    UpdatedBy   int64     `json:"updatedBy"       xorm:"'updated_by'"`
-    UpdatedAt   time.Time `json:"updatedAt"       xorm:"'updated_at'"`
-    DeletedFlag int64     `json:"deletedFlag"     xorm:"'deleted_flag'"`
-    DeletedBy   int64     `json:"deletedBy"       xorm:"'deleted_by'"`
-    DeletedAt   time.Time `json:"deletedAt"       xorm:"'deleted_at'"`
+    CreatedBy   int64       `json:"createdBy"       xorm:"'created_by'"`
+    CreatedAt   time.Time   `json:"createdAt"       xorm:"'created_at'"`
+    UpdatedBy   int64       `json:"updatedBy"       xorm:"'updated_by'"`
+    UpdatedAt   time.Time   `json:"updatedAt"       xorm:"'updated_at'"`
+    DeletedFlag int64       `json:"deletedFlag"     xorm:"'deleted_flag'"`
+    DeletedBy   int64       `json:"deletedBy"       xorm:"'deleted_by'"`
+    DeletedAt   time.Time   `json:"deletedAt"       xorm:"'deleted_at'"`
 }
 
 func (t *MsgTo) TableName() string {

+ 22 - 22
pkg/system/datamodel/oc.go

@@ -3,29 +3,29 @@ package datamodel
 import "time"
 
 type Oc struct {
-    OcId     int64  `json:"ocId"          xorm:"'oc_id'       bigint    pk  comment('主键ID')       " `
-    OcName   string `json:"ocName"        xorm:"'oc_name'     varchar(127)  comment('ENT类型名称')   " `
-    OcTypeId int64  `json:"ocTypeId"      xorm:"'oc_type_id'  bigint        comment('Type ID')     " `
-    OcCatId  int64  `json:"ocCatId"       xorm:"'oc_cat_id'   bigint        comment('Cat ID')      " `
+    OcId        int64       `json:"ocId"          xorm:"'oc_id'       bigint    pk  comment('主键ID')       " `
+    OcName      string      `json:"ocName"        xorm:"'oc_name'     varchar(127)  comment('ENT类型名称')   " `
+    OcTypeId    int64       `json:"ocTypeId"      xorm:"'oc_type_id'  bigint        comment('Type ID')     " `
+    OcCatId     int64       `json:"ocCatId"       xorm:"'oc_cat_id'   bigint        comment('Cat ID')      " `
 
-    RootId   int64 `json:"rootId"        xorm:"'root_id'     bigint        comment('Root ID')     " `
-    ParentId int64 `json:"parentId"      xorm:"'parent_id'   bigint        comment('Parent ID')   " `
-    AdminId  int64 `json:"adminId"       xorm:"'admin_id'    bigint        comment('Admin ID')    " `
-    GroupId  int64 `json:"groupId"       xorm:"'group_id'    bigint        comment('Root Group Id')" `
-    IfLic    int64 `json:"ifLic"         xorm:"'if_lic'      int           comment('Admin ID')    " `
+    RootId      int64       `json:"rootId"        xorm:"'root_id'     bigint        comment('Root ID')     " `
+    ParentId    int64       `json:"parentId"      xorm:"'parent_id'   bigint        comment('Parent ID')   " `
+    AdminId     int64       `json:"adminId"       xorm:"'admin_id'    bigint        comment('Admin ID')    " `
+    GroupId     int64       `json:"groupId"       xorm:"'group_id'    bigint        comment('Root Group Id')" `
+    IfLic       int64       `json:"ifLic"         xorm:"'if_lic'      int           comment('Admin ID')    " `
 
-    NodeLeft  int   `json:"nodeLeft"      xorm:"'node_left'   int           comment('Admin ID')    " `
-    NodeRight int   `json:"nodeRight"     xorm:"'node_right'  int           comment('Admin ID')    " `
-    IsLeaf    int   `json:"isLeaf"        xorm:"'is_leaf'     int           comment('Admin ID')    " `
-    NodeLevel int   `json:"nodeLevel"     xorm:"'node_level'  int           comment('Admin ID')    " `
-    Status    int64 `json:"status"        xorm:"'status'      bigint        comment('OC Status')   " `
-    IsFixed   int64 `json:"isFixed"       xorm:"'is_fixed'    bigint        comment('Is Fixed')    " `
+    NodeLeft    int         `json:"nodeLeft"      xorm:"'node_left'   int           comment('Admin ID')    " `
+    NodeRight   int         `json:"nodeRight"     xorm:"'node_right'  int           comment('Admin ID')    " `
+    IsLeaf      int         `json:"isLeaf"        xorm:"'is_leaf'     int           comment('Admin ID')    " `
+    NodeLevel   int         `json:"nodeLevel"     xorm:"'node_level'  int           comment('Admin ID')    " `
+    Status      int64       `json:"status"        xorm:"'status'      bigint        comment('OC Status')   " `
+    IsFixed     int64       `json:"isFixed"       xorm:"'is_fixed'    bigint        comment('Is Fixed')    " `
 
-    CreatedBy   int64     `json:"createdBy"     xorm:"'created_by'"`
-    CreatedAt   time.Time `json:"createdAt"     xorm:"'created_at'"`
-    UpdatedBy   int64     `json:"updatedBy"     xorm:"'updated_by'"`
-    UpdatedAt   time.Time `json:"updatedAt"     xorm:"'updated_at'"`
-    DeletedFlag int64     `json:"deletedFlag"   xorm:"'deleted_flag'"`
-    DeletedBy   int64     `json:"deletedBy"     xorm:"'deleted_by'"`
-    DeletedAt   time.Time `json:"deletedAt"     xorm:"'deleted_at'"`
+    CreatedBy   int64       `json:"createdBy"     xorm:"'created_by'"`
+    CreatedAt   time.Time   `json:"createdAt"     xorm:"'created_at'"`
+    UpdatedBy   int64       `json:"updatedBy"     xorm:"'updated_by'"`
+    UpdatedAt   time.Time   `json:"updatedAt"     xorm:"'updated_at'"`
+    DeletedFlag int64       `json:"deletedFlag"   xorm:"'deleted_flag'"`
+    DeletedBy   int64       `json:"deletedBy"     xorm:"'deleted_by'"`
+    DeletedAt   time.Time   `json:"deletedAt"     xorm:"'deleted_at'"`
 }

+ 25 - 25
pkg/system/datamodel/partner.go

@@ -3,31 +3,31 @@ package datamodel
 import "time"
 
 type Partner struct {
-    OcId        int64  `json:"ocId"             xorm:"'oc_id'            bigint    pk  comment('主键ID')       " `
-    PartnerName string `json:"partnerName"      xorm:"'partner_name'     varchar(127)  comment('Partner名称')  " `
-
-    PartnerDesc string `json:"partnerDesc"      xorm:"'partner_desc'     varchar(127)  comment('PartnerDesc')  " `
-    PartnerLxr  string `json:"partnerLxr"       xorm:"'partner_lxr'      varchar(127)  comment('Partner ren')  " `
-    PartnerLxdh string `json:"partnerLxdh"      xorm:"'partner_lxdh'     varchar(127)  comment('Partner phone') " `
-
-    PartnerTyshxydm string `json:"partnerTyshxydm"  xorm:"'partner_tyshxydm' varchar(255)  comment('统一社会信用代码')" `
-    PartnerClrq     string `json:"partnerClrq"      xorm:"'partner_clrq'     date          comment('成立日期')" `
-    PartnerDzyx     string `json:"partnerDzyx"      xorm:"'partner_dzyx'     varchar(64)   comment('电子邮箱')" `
-    PartnerQywzjd   string `json:"partnerQywzjd"    xorm:"'partner_qywzjd'   decimal(9,6)  comment('企业位置经度')" `
-    PartnerQywzwd   string `json:"partnerQywzwd"    xorm:"'partner_qywzwd'   decimal(9,6)  comment('企业位置纬度')" `
-
-    PartnerScjydz string `json:"partnerScjydz"    xorm:"'partner_scjydz'   varchar(255)  comment('生产/经营地址')" `
-
-    PartnerXzqhdm string `json:"partnerXzqhdm"    xorm:"'partner_xzqhdm'   varchar(255)  comment('行政区划代码')" `
-    PartnerXzqhmc string `json:"partnerXzqhmc"    xorm:"'partner_xzqhmc'   varchar(255)  comment('行政区划名称')" `
-
-    CreatedBy   int64     `json:"createdBy"        xorm:"'created_by'  " `
-    CreatedAt   time.Time `json:"createdAt"        xorm:"'created_at'  " `
-    UpdatedBy   int64     `json:"updatedBy"        xorm:"'updated_by'  " `
-    UpdatedAt   time.Time `json:"updatedAt"        xorm:"'updated_at'  " `
-    DeletedFlag int64     `json:"deletedFlag"      xorm:"'deleted_flag'" `
-    DeletedBy   int64     `json:"deletedBy"        xorm:"'deleted_by'  " `
-    DeletedAt   time.Time `json:"deletedAt"        xorm:"'deleted_at'  " `
+    OcId            int64       `json:"ocId"             xorm:"'oc_id'            bigint    pk  comment('主键ID')       " `
+    PartnerName     string      `json:"partnerName"      xorm:"'partner_name'     varchar(127)  comment('Partner名称')  " `
+
+    PartnerDesc     string      `json:"partnerDesc"      xorm:"'partner_desc'     varchar(127)  comment('PartnerDesc')  " `
+    PartnerLxr      string      `json:"partnerLxr"       xorm:"'partner_lxr'      varchar(127)  comment('Partner ren')  " `
+    PartnerLxdh     string      `json:"partnerLxdh"      xorm:"'partner_lxdh'     varchar(127)  comment('Partner phone') " `
+
+    PartnerTyshxydm string      `json:"partnerTyshxydm"  xorm:"'partner_tyshxydm' varchar(255)  comment('统一社会信用代码')" `
+    PartnerClrq     string      `json:"partnerClrq"      xorm:"'partner_clrq'     date          comment('成立日期')" `
+    PartnerDzyx     string      `json:"partnerDzyx"      xorm:"'partner_dzyx'     varchar(64)   comment('电子邮箱')" `
+    PartnerQywzjd   string      `json:"partnerQywzjd"    xorm:"'partner_qywzjd'   decimal(9,6)  comment('企业位置经度')" `
+    PartnerQywzwd   string      `json:"partnerQywzwd"    xorm:"'partner_qywzwd'   decimal(9,6)  comment('企业位置纬度')" `
+
+    PartnerScjydz   string      `json:"partnerScjydz"    xorm:"'partner_scjydz'   varchar(255)  comment('生产/经营地址')" `
+
+    PartnerXzqhdm   string      `json:"partnerXzqhdm"    xorm:"'partner_xzqhdm'   varchar(255)  comment('行政区划代码')" `
+    PartnerXzqhmc   string      `json:"partnerXzqhmc"    xorm:"'partner_xzqhmc'   varchar(255)  comment('行政区划名称')" `
+
+    CreatedBy       int64       `json:"createdBy"        xorm:"'created_by'  " `
+    CreatedAt       time.Time   `json:"createdAt"        xorm:"'created_at'  " `
+    UpdatedBy       int64       `json:"updatedBy"        xorm:"'updated_by'  " `
+    UpdatedAt       time.Time   `json:"updatedAt"        xorm:"'updated_at'  " `
+    DeletedFlag     int64       `json:"deletedFlag"      xorm:"'deleted_flag'" `
+    DeletedBy       int64       `json:"deletedBy"        xorm:"'deleted_by'  " `
+    DeletedAt       time.Time   `json:"deletedAt"        xorm:"'deleted_at'  " `
 }
 
 func (t *Partner) TableName() string {

+ 24 - 24
pkg/system/datamodel/task.go

@@ -3,29 +3,29 @@ package datamodel
 import "time"
 
 type Task struct {
-    OcId              int64  `json:"ocId"                  xorm:"'oc_id'                bigint       comment('OC ID')       " `
-    TaskId            int64  `json:"taskId"                xorm:"'task_id'              bigint    pk comment('主键ID')       " `
-    TaskCode          string `json:"taskCode"              xorm:"'task_code'            varchar(127) comment('TASK编码')     " `
-    TaskTitle         string `json:"taskTitle"             xorm:"'task_title'           varchar(127) comment('TASK类型名称')  " `
-    TaskDesc          string `json:"taskDesc"              xorm:"'task_desc'            varchar(127) comment('描述')         " `
-    TaskCatId         int64  `json:"taskCatId"             xorm:"'task_cat_id'          bigint       comment('类别ID')       " `
-    TaskTypeId        int64  `json:"taskTypeId"            xorm:"'task_type_id'         bigint       comment('类别ID')       " `
-    ExpectedStartTime string `json:"expectedStartTime"     xorm:"'expected_start_time'  datetime     comment('TASK类型名称')  " `
-    ExpectedEndTime   string `json:"expectedEndTime"       xorm:"'expected_end_time'    datetime     comment('TASK类型名称')  " `
-    ActualStartTime   string `json:"actualStartTime"       xorm:"'actual_start_time'    datetime     comment('实际开始时间')  " `
-    ActualEndTime     string `json:"actualEndTime"         xorm:"'actual_end_time'      datetime     comment('实际结束时间')  " `
-    TaskPriority      int64  `json:"taskPriority"          xorm:"'task_priority'        bigint       comment('优先级')       " `
-    TaskUrgency       int64  `json:"taskUrgency"           xorm:"'task_urgency'         bigint       comment('紧急程序')     " `
-    Status            int64  `json:"status"                xorm:"'status'               bigint       comment('状态')        " `
-    TaskLevel         int64  `json:"taskLevel"             xorm:"'task_level'           bigint       comment('任务级别')     " `
-    ParentId          int64  `json:"parentId"              xorm:"'parent_id'            bigint       comment('父任务')       " `
-    TaskOrigin        int64  `json:"taskOrigin"            xorm:"'task_origin'          bigint       comment('任务来源')     " `
+    OcId                int64       `json:"ocId"                  xorm:"'oc_id'                bigint       comment('OC ID')       " `
+    TaskId              int64       `json:"taskId"                xorm:"'task_id'              bigint    pk comment('主键ID')       " `
+    TaskCode            string      `json:"taskCode"              xorm:"'task_code'            varchar(127) comment('TASK编码')     " `
+    TaskTitle           string      `json:"taskTitle"             xorm:"'task_title'           varchar(127) comment('TASK类型名称')  " `
+    TaskDesc            string      `json:"taskDesc"              xorm:"'task_desc'            varchar(127) comment('描述')         " `
+    TaskCatId           int64       `json:"taskCatId"             xorm:"'task_cat_id'          bigint       comment('类别ID')       " `
+    TaskTypeId          int64       `json:"taskTypeId"            xorm:"'task_type_id'         bigint       comment('类别ID')       " `
+    ExpectedStartTime   string      `json:"expectedStartTime"     xorm:"'expected_start_time'  datetime     comment('TASK类型名称')  " `
+    ExpectedEndTime     string      `json:"expectedEndTime"       xorm:"'expected_end_time'    datetime     comment('TASK类型名称')  " `
+    ActualStartTime     string      `json:"actualStartTime"       xorm:"'actual_start_time'    datetime     comment('实际开始时间')  " `
+    ActualEndTime       string      `json:"actualEndTime"         xorm:"'actual_end_time'      datetime     comment('实际结束时间')  " `
+    TaskPriority        int64       `json:"taskPriority"          xorm:"'task_priority'        bigint       comment('优先级')       " `
+    TaskUrgency         int64       `json:"taskUrgency"           xorm:"'task_urgency'         bigint       comment('紧急程序')     " `
+    Status              int64       `json:"status"                xorm:"'status'               bigint       comment('状态')        " `
+    TaskLevel           int64       `json:"taskLevel"             xorm:"'task_level'           bigint       comment('任务级别')     " `
+    ParentId            int64       `json:"parentId"              xorm:"'parent_id'            bigint       comment('父任务')       " `
+    TaskOrigin          int64       `json:"taskOrigin"            xorm:"'task_origin'          bigint       comment('任务来源')     " `
 
-    CreatedBy   int64     `json:"createdBy"             xorm:"'created_by'  " `
-    CreatedAt   time.Time `json:"createdAt"             xorm:"'created_at'  " `
-    UpdatedBy   int64     `json:"updatedBy"             xorm:"'updated_by'  " `
-    UpdatedAt   time.Time `json:"updatedAt"             xorm:"'updated_at'  " `
-    DeletedFlag int64     `json:"deletedFlag"           xorm:"'deleted_flag'" `
-    DeletedBy   int64     `json:"deletedBy"             xorm:"'deleted_by'  " `
-    DeletedAt   time.Time `json:"deletedAt"             xorm:"'deleted_at'  " `
+    CreatedBy           int64       `json:"createdBy"             xorm:"'created_by'  " `
+    CreatedAt           time.Time   `json:"createdAt"             xorm:"'created_at'  " `
+    UpdatedBy           int64       `json:"updatedBy"             xorm:"'updated_by'  " `
+    UpdatedAt           time.Time   `json:"updatedAt"             xorm:"'updated_at'  " `
+    DeletedFlag         int64       `json:"deletedFlag"           xorm:"'deleted_flag'" `
+    DeletedBy           int64       `json:"deletedBy"             xorm:"'deleted_by'  " `
+    DeletedAt           time.Time   `json:"deletedAt"             xorm:"'deleted_at'  " `
 }

+ 48 - 48
pkg/system/repository/account_repo.go

@@ -19,28 +19,28 @@ func NewAccountRepo(engine *xorm.Engine) *AccountRepo {
 }
 
 func (d *AccountRepo) GetAccountByName(accountName string) (*viewmodel.AccountInfo, error) {
-    sqlSelect := ` SELECT   A.oc_id,
-                            B.oc_type_id,
-                            B.oc_name,
-                            A.account_id,
-                            A.account_name,
-                            A.account_real_name,
-                            A.password,
-                            A.account_type,
-                            A.account_staff_no,
-                            A.account_phone,
-                            A.account_last_ip,
-                            A.account_loc,
-                            A.status,
-                            A.account_avatar,
-                            A.account_photo,
-                            A.account_real_name,
-                            A.account_intro,
-                            A.wx_id,
-                            A.is_fixed `
-    sqlFrom := `  FROM      account AS A
-                    LEFT JOIN oc      AS B ON (A.oc_id = B.oc_id ) `
-    sqlWhere := `  WHERE A.deleted_flag = 0  `
+    sqlSelect   := ` SELECT     A.oc_id,
+                                B.oc_type_id,
+                                B.oc_name,
+                                A.account_id,
+                                A.account_name,
+                                A.account_real_name,
+                                A.password,
+                                A.account_type,
+                                A.account_staff_no,
+                                A.account_phone,
+                                A.account_last_ip,
+                                A.account_loc,
+                                A.status,
+                                A.account_avatar,
+                                A.account_photo,
+                                A.account_real_name,
+                                A.account_intro,
+                                A.wx_id,
+                                A.is_fixed `
+    sqlFrom     := `    FROM      account AS A
+                        LEFT JOIN oc      AS B ON (A.oc_id = B.oc_id ) `
+    sqlWhere    := `    WHERE A.deleted_flag = 0  `
 
     if accountName != "" {
         sqlWhere += ` AND  A.account_name like ` + "'%" + accountName + "%'"
@@ -56,32 +56,32 @@ func (d *AccountRepo) GetAccountByName(accountName string) (*viewmodel.AccountIn
 }
 
 func (d *AccountRepo) GetAccountByCode(code string) (*viewmodel.AccountInfo, error) {
-    sqlSelect := ` SELECT   A.oc_id,
-                            B.oc_type_id,
-                            B.oc_name,
-                            A.account_id,
-                            A.account_name,
-                            A.account_real_name,
-                            A.password,
-                            A.account_type,
-                            A.account_staff_no,
-                            A.account_phone,
-                            A.account_last_ip,
-                            A.account_loc,
-                            A.status,
-                            A.account_avatar,
-                            A.account_photo,
-                            A.account_real_name,
-                            A.account_intro,
-                            A.wx_id,
-                            A.is_fixed `
-    sqlFrom := ` FROM      account AS A
-                  LEFT JOIN oc      AS B ON (A.oc_id = B.oc_id ) `
-    sqlWhere := ` WHERE A.deleted_flag = 0  `
-    sqlWhere += ` AND  (A.account_name = ` + "'" + code + "'"
-    sqlWhere += ` OR    A.account_phone = ` + "'" + code + "'"
-    sqlWhere += ` OR    A.account_mail = ` + "'" + code + "'"
-    sqlWhere += ` OR    A.account_staff_no = ` + "'" + code + "')"
+    sqlSelect   := ` SELECT     A.oc_id,
+                                B.oc_type_id,
+                                B.oc_name,
+                                A.account_id,
+                                A.account_name,
+                                A.account_real_name,
+                                A.password,
+                                A.account_type,
+                                A.account_staff_no,
+                                A.account_phone,
+                                A.account_last_ip,
+                                A.account_loc,
+                                A.status,
+                                A.account_avatar,
+                                A.account_photo,
+                                A.account_real_name,
+                                A.account_intro,
+                                A.wx_id,
+                                A.is_fixed `
+    sqlFrom     := ` FROM       account AS A
+                     LEFT JOIN  oc      AS B ON (A.oc_id = B.oc_id ) `
+    sqlWhere    := ` WHERE A.deleted_flag = 0  `
+    sqlWhere    += ` AND  (A.account_name = ` + "'" + code + "'"
+    sqlWhere    += ` OR    A.account_phone = ` + "'" + code + "'"
+    sqlWhere    += ` OR    A.account_mail = ` + "'" + code + "'"
+    sqlWhere    += ` OR    A.account_staff_no = ` + "'" + code + "')"
 
     data := &viewmodel.AccountInfo{}
     ok, err := d.engine.SQL(sqlSelect + sqlFrom + sqlWhere).Get(data)

+ 25 - 26
pkg/system/repository/art_attach_repo.go

@@ -19,25 +19,24 @@ func NewArtAttachRepo(engine *xorm.Engine) *ArtCatRepo {
 }
 
 func (d *ArtRepo) GetListById(ocId, artId int64) ([]viewmodel.AttachInfo, error) {
-    sqlSelect := ` SELECT
-                        A.file_id,
-                        B.file_title,
-                        B.dir_id,
-                        B.file_icon,
-                        B.file_url,
-                        B.file_ext,
-                        B.file_size,
-                        B.file_author,
-                        B.file_desc,
-                        B.uploaded_by  AS uploader_id,
-                        C.account_name AS uploader_name,
-                        B.uploaded_at  `
-    sqlFrom := ` FROM        art_attach  AS A
-                   LEFT JOIN   doc_file    AS B ON(A.oc_id = B.oc_id AND A.file_id     = B.file_id)
-                   LEFT JOIN   account     AS C ON(B.oc_id = C.oc_id AND B.uploaded_by = C.account_id)  `
-    sqlWhere := ` WHERE B.deleted_flag = 0 `
-    sqlWhere += fmt.Sprintf(" AND A.oc_id = %d ", ocId)
-    sqlWhere += fmt.Sprintf(" AND A.art_id = %d ", artId)
+    sqlSelect   := ` SELECT     A.file_id,
+                                B.file_title,
+                                B.dir_id,
+                                B.file_icon,
+                                B.file_url,
+                                B.file_ext,
+                                B.file_size,
+                                B.file_author,
+                                B.file_desc,
+                                B.uploaded_by  AS uploader_id,
+                                C.account_name AS uploader_name,
+                                B.uploaded_at  `
+    sqlFrom     := `FROM        art_attach  AS A
+                    LEFT JOIN   doc_file    AS B ON(A.oc_id = B.oc_id AND A.file_id     = B.file_id)
+                    LEFT JOIN   account     AS C ON(B.oc_id = C.oc_id AND B.uploaded_by = C.account_id)  `
+    sqlWhere    := ` WHERE B.deleted_flag = 0 `
+    sqlWhere    += fmt.Sprintf(" AND A.oc_id = %d ", ocId)
+    sqlWhere    += fmt.Sprintf(" AND A.art_id = %d ", artId)
 
     sqlOrderBy := " ORDER BY A.issued_at DESC "
     datalist := make([]viewmodel.AttachInfo, 0)
@@ -55,9 +54,9 @@ func (d *ArtAttachRepo) Create(data *datamodel.ArtAttach) error {
 }
 
 func (d *ArtAttachRepo) Delete(m map[string]interface{}) error {
-    ocId := m["ocId"].(int64)
-    artId := m["artId"].(int64)
-    deletedBy := m["deletedBy"].(int64)
+    ocId        := m["ocId"].(int64)
+    artId       := m["artId"].(int64)
+    deletedBy   := m["deletedBy"].(int64)
 
     data := &datamodel.ArtAttach{}
     data.DeletedFlag = 1
@@ -71,10 +70,10 @@ func (d *ArtAttachRepo) Delete(m map[string]interface{}) error {
 }
 
 func (d *ArtAttachRepo) DeleteById(m map[string]interface{}) error {
-    ocId := m["ocId"].(int64)
-    artId := m["artId"].(int64)
-    fileId := m["fileId"].(int64)
-    deletedBy := m["deletedBy"].(int64)
+    ocId        := m["ocId"].(int64)
+    artId       := m["artId"].(int64)
+    fileId      := m["fileId"].(int64)
+    deletedBy   := m["deletedBy"].(int64)
 
     data := &datamodel.ArtAttach{}
     data.DeletedFlag = 1

+ 27 - 26
pkg/system/repository/art_cat_repo.go

@@ -20,12 +20,12 @@ func NewArtCatRepo(engine *xorm.Engine) *ArtCatRepo {
 }
 
 func (d *ArtCatRepo) GetPage(m map[string]interface{}) (*common.PageResult, error) {
-    limit := m["limit"].(int)
-    page := m["page"].(int)
+    limit   := m["limit"].(int)
+    page    := m["page"].(int)
 
-    sqlSelect := ` SELECT A.*                `
-    sqlFrom := ` FROM   art_cat   AS A     `
-    sqlWhere := ` WHERE  A.deleted_flag = 0 `
+    sqlSelect   := ` SELECT A.*                `
+    sqlFrom     := ` FROM   art_cat   AS A     `
+    sqlWhere    := ` WHERE  A.deleted_flag = 0 `
     if artCatId, ok := m["artCatId"]; ok {
         sqlWhere += fmt.Sprintf(" AND A.art_cat_id = %d ", artCatId)
     }
@@ -39,9 +39,9 @@ func (d *ArtCatRepo) GetPage(m map[string]interface{}) (*common.PageResult, erro
         return nil, err1
     }
 
-    sqlOrderBy := " ORDER BY A.oc_id, A.art_cat_id "
-    pageStart := (page - 1) * limit
-    sqlLimit := fmt.Sprintf(" LIMIT %d OFFSET %d ", limit, pageStart)
+    sqlOrderBy  := " ORDER BY A.oc_id, A.art_cat_id "
+    pageStart   := (page - 1) * limit
+    sqlLimit    := fmt.Sprintf(" LIMIT %d OFFSET %d ", limit, pageStart)
 
     datalist := make([]datamodel.ArtCat, 0)
     err2 := d.engine.SQL(sqlSelect + sqlFrom + sqlWhere + sqlOrderBy + sqlLimit).Find(&datalist)
@@ -49,18 +49,19 @@ func (d *ArtCatRepo) GetPage(m map[string]interface{}) (*common.PageResult, erro
         return nil, err2
     }
 
-    pageResult := &common.PageResult{}
-    pageResult.Data = datalist
-    pageResult.Total = total
-    pageResult.PageSize = limit
-    pageResult.Page = page
+    pageResult := &common.PageResult{
+        Total:    total,
+        PageSize: limit,
+        Page:     page,
+        Data:     datalist,
+    }
     return pageResult, nil
 }
 
 func (d *ArtCatRepo) GetList(m map[string]interface{}) ([]viewmodel.ArtCatInfo, error) {
-    sqlSelect := ` SELECT A.*                `
-    sqlFrom := ` FROM  art_cat AS A        `
-    sqlWhere := ` WHERE A.deleted_flag = 0  `
+    sqlSelect   := ` SELECT A.*                `
+    sqlFrom     := ` FROM  art_cat AS A        `
+    sqlWhere    := ` WHERE A.deleted_flag = 0  `
     if ocId, ok := m["ocId"]; ok {
         sqlWhere += fmt.Sprintf(" AND A.oc_id = %d ", ocId)
     }
@@ -82,11 +83,11 @@ func (d *ArtCatRepo) GetList(m map[string]interface{}) ([]viewmodel.ArtCatInfo,
 }
 
 func (d *ArtCatRepo) GetById(ocId, artCatId int64) (*viewmodel.ArtCatInfo, error) {
-    sqlSelect := ` SELECT A.*                `
-    sqlFrom := ` FROM  art_cat AS A        `
-    sqlWhere := ` WHERE A.deleted_flag = 0  `
-    sqlWhere += fmt.Sprintf(" AND A.oc_id = %d ", ocId)
-    sqlWhere += fmt.Sprintf(" AND A.art_cat_id  = %d ", artCatId)
+    sqlSelect   := ` SELECT A.*                `
+    sqlFrom     := ` FROM  art_cat AS A        `
+    sqlWhere    := ` WHERE A.deleted_flag = 0  `
+    sqlWhere    += fmt.Sprintf(" AND A.oc_id = %d ", ocId)
+    sqlWhere    += fmt.Sprintf(" AND A.art_cat_id  = %d ", artCatId)
     data := &viewmodel.ArtCatInfo{}
     has, err := d.engine.SQL(sqlSelect + sqlFrom + sqlWhere).Get(data)
     if !has || err != nil {
@@ -97,11 +98,11 @@ func (d *ArtCatRepo) GetById(ocId, artCatId int64) (*viewmodel.ArtCatInfo, error
 }
 
 func (d *ArtCatRepo) GetListById(ocId int64) ([]viewmodel.ArtCatInfo, error) {
-    sqlSelect := ` SELECT A.*                `
-    sqlFrom := ` FROM  art_cat AS A        `
-    sqlWhere := ` WHERE A.deleted_flag = 0  `
-    sqlWhere += fmt.Sprintf(" AND A.oc_id = %d ", ocId)
-    sqlOrderBy := " ORDER BY A.oc_id, A.art_cat_id "
+    sqlSelect   := ` SELECT A.*                `
+    sqlFrom     := ` FROM  art_cat AS A        `
+    sqlWhere    := ` WHERE A.deleted_flag = 0  `
+    sqlWhere    += fmt.Sprintf(" AND A.oc_id = %d ", ocId)
+    sqlOrderBy  := " ORDER BY A.oc_id, A.art_cat_id "
     datalist := make([]viewmodel.ArtCatInfo, 0)
     err := d.engine.SQL(sqlSelect + sqlFrom + sqlWhere + sqlOrderBy).Find(&datalist)
     if err != nil {