From bf08afd68407d1f0fd39cba2fc3dad4dab0b1231 Mon Sep 17 00:00:00 2001 From: kanade Date: Fri, 23 May 2025 11:41:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(service/erp):=20=E4=B8=BA=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E6=B7=BB=E5=8A=A0=E9=83=A8=E9=97=A8=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 TemplateItem 结构中添加 DepId 字段,用于存储部门 ID - 在 ReplyTemplateList 结构中添加 DepIds 列表,用于存储模板关联的部门 ID - 在 TemplateAdd 结构中添加 DepIds 列表,用于在添加模板时指定关联的部门 ID - 在模板详情接口中添加 DepIds 字段,用于展示模板关联的部门 ID --- erp/template.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/erp/template.go b/erp/template.go index 12c51cd..478cc7b 100644 --- a/erp/template.go +++ b/erp/template.go @@ -17,6 +17,7 @@ type TemplateSearch struct { Name string // 模板名称 Types []string // 模板类型 IsOpen int64 // 是否开启 + DepId int64 // 部门id } type ReplyTemplateList struct { List []TemplateItem `json:"list"` @@ -33,6 +34,7 @@ type TemplateItem struct { IsOpen int64 `json:"isOpen"` CreatedStaffId int64 `json:"createdStaffId"` CreatedAt *time.Time `json:"createdAt"` + DepIds []int64 `json:"depIds"` } // List @TITLE 列表 @@ -51,12 +53,13 @@ type ArgsTemplateAdd struct { } type TemplateAdd struct { - Name string // 模板名称 - Type string // 模板类型 - Path string // 模板文件地址 - Sort int64 // 排序 - PdfConfig string // pdf配置 - FileName string // 文件名 + Name string // 模板名称 + Type string // 模板类型 + Path string // 模板文件地址 + Sort int64 // 排序 + PdfConfig string // pdf配置 + FileName string // 文件名 + DepIds []int64 // 部门id } // Add @TITLE 添加 @@ -81,6 +84,7 @@ type TemplateInfo struct { IsOpen int64 `json:"isOpen"` CreatedStaffId int64 `json:"createdStaffId"` CreatedAt *time.Time `json:"createdAt"` + DepIds []int64 `json:"depIds"` } // Info @TITLE 详情