正在显示
5 个修改的文件
包含
11 行增加
和
9 行删除
| @@ -248,7 +248,7 @@ type ( | @@ -248,7 +248,7 @@ type ( | ||
| 248 | MiniArticleDraftGetMeResponse { | 248 | MiniArticleDraftGetMeResponse { |
| 249 | Id int64 `json:"id"` // | 249 | Id int64 `json:"id"` // |
| 250 | Template int `json:"template"` // 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式 | 250 | Template int `json:"template"` // 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式 |
| 251 | - Section []string `json:"Section"` // 填写的内容 | 251 | + Section []string `json:"section"` // 填写的内容 |
| 252 | Title string `json:"title"` // 标题 | 252 | Title string `json:"title"` // 标题 |
| 253 | Images []string `json:"images"` // 图片 | 253 | Images []string `json:"images"` // 图片 |
| 254 | WhoRead []int64 `json:"whoRead"` // 谁可以看 | 254 | WhoRead []int64 `json:"whoRead"` // 谁可以看 |
| @@ -170,11 +170,11 @@ func (l *MiniCreateArticleLogic) MiniCreateArticle(req *types.MiniArticleCreateR | @@ -170,11 +170,11 @@ func (l *MiniCreateArticleLogic) MiniCreateArticle(req *types.MiniArticleCreateR | ||
| 170 | } | 170 | } |
| 171 | //设置内容概要 | 171 | //设置内容概要 |
| 172 | if len(sectionList) > 0 { | 172 | if len(sectionList) > 0 { |
| 173 | - // 截取内容 30个字 | 173 | + // 截取内容 50个字 |
| 174 | runeNumber := 0 //字数 | 174 | runeNumber := 0 //字数 |
| 175 | stringIndex := 0 //字符串长度 | 175 | stringIndex := 0 //字符串长度 |
| 176 | for i := range sectionList[0].Content { | 176 | for i := range sectionList[0].Content { |
| 177 | - if runeNumber > 30 { | 177 | + if runeNumber > 50 { |
| 178 | break | 178 | break |
| 179 | } | 179 | } |
| 180 | runeNumber += 1 | 180 | runeNumber += 1 |
| @@ -52,6 +52,7 @@ func (l *MiniSearchArticleDraftMeLogic) MiniSearchArticleDraftMe(req *types.Mini | @@ -52,6 +52,7 @@ func (l *MiniSearchArticleDraftMeLogic) MiniSearchArticleDraftMe(req *types.Mini | ||
| 52 | Section: draftList[i].Content, | 52 | Section: draftList[i].Content, |
| 53 | Title: draftList[i].Title, | 53 | Title: draftList[i].Title, |
| 54 | Images: images, | 54 | Images: images, |
| 55 | + CreatedAt: draftList[i].CreatedAt, | ||
| 55 | } | 56 | } |
| 56 | } | 57 | } |
| 57 | return resp, nil | 58 | return resp, nil |
| @@ -4,6 +4,8 @@ import ( | @@ -4,6 +4,8 @@ import ( | ||
| 4 | "context" | 4 | "context" |
| 5 | "strconv" | 5 | "strconv" |
| 6 | 6 | ||
| 7 | + "strings" | ||
| 8 | + | ||
| 7 | "github.com/samber/lo" | 9 | "github.com/samber/lo" |
| 8 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/db/transaction" | 10 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/db/transaction" |
| 9 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/domain" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/domain" |
| @@ -11,7 +13,6 @@ import ( | @@ -11,7 +13,6 @@ import ( | ||
| 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/contextdata" | 13 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/contextdata" |
| 12 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/tool/oss" | 14 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/tool/oss" |
| 13 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/xerr" | 15 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/xerr" |
| 14 | - "strings" | ||
| 15 | 16 | ||
| 16 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/svc" | 17 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/svc" |
| 17 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/types" | 18 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/types" |
| @@ -147,11 +148,11 @@ func (l *SystemUpdateArticleLogic) SystemUpdateArticle(req *types.SystemArticleU | @@ -147,11 +148,11 @@ func (l *SystemUpdateArticleLogic) SystemUpdateArticle(req *types.SystemArticleU | ||
| 147 | }) | 148 | }) |
| 148 | //设置内容概要 | 149 | //设置内容概要 |
| 149 | if len(req.Section) > 0 { | 150 | if len(req.Section) > 0 { |
| 150 | - // 截取内容 30个字 | 151 | + // 截取内容 50个字 |
| 151 | runeNumber := 0 //字数 | 152 | runeNumber := 0 //字数 |
| 152 | stringIndex := 0 //字符串长度 | 153 | stringIndex := 0 //字符串长度 |
| 153 | for i := range req.Section[0].Content { | 154 | for i := range req.Section[0].Content { |
| 154 | - if runeNumber > 30 { | 155 | + if runeNumber > 50 { |
| 155 | break | 156 | break |
| 156 | } | 157 | } |
| 157 | runeNumber += 1 | 158 | runeNumber += 1 |
| @@ -297,8 +297,8 @@ type SimpleUser struct { | @@ -297,8 +297,8 @@ type SimpleUser struct { | ||
| 297 | CompanyId int64 `json:"companyId,omitempty"` // 公司ID | 297 | CompanyId int64 `json:"companyId,omitempty"` // 公司ID |
| 298 | CompanyName string `json:"companyName,omitempty"` // 公司名称 | 298 | CompanyName string `json:"companyName,omitempty"` // 公司名称 |
| 299 | Name string `json:"name"` // 名称 | 299 | Name string `json:"name"` // 名称 |
| 300 | - Avatar string `json:"avatar,omitempty"` // 头像 | ||
| 301 | - Position string `json:"position,omitempty"` // 职位 | 300 | + Avatar string `json:"avatar"` // 头像 |
| 301 | + Position string `json:"position"` // 职位 | ||
| 302 | } | 302 | } |
| 303 | 303 | ||
| 304 | type SimpleArticle struct { | 304 | type SimpleArticle struct { |
| @@ -949,7 +949,7 @@ type MiniArticleDraftGetMeRequest struct { | @@ -949,7 +949,7 @@ type MiniArticleDraftGetMeRequest struct { | ||
| 949 | type MiniArticleDraftGetMeResponse struct { | 949 | type MiniArticleDraftGetMeResponse struct { |
| 950 | Id int64 `json:"id"` // | 950 | Id int64 `json:"id"` // |
| 951 | Template int `json:"template"` // 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式 | 951 | Template int `json:"template"` // 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式 |
| 952 | - Section []string `json:"Section"` // 填写的内容 | 952 | + Section []string `json:"section"` // 填写的内容 |
| 953 | Title string `json:"title"` // 标题 | 953 | Title string `json:"title"` // 标题 |
| 954 | Images []string `json:"images"` // 图片 | 954 | Images []string `json:"images"` // 图片 |
| 955 | WhoRead []int64 `json:"whoRead"` // 谁可以看 | 955 | WhoRead []int64 `json:"whoRead"` // 谁可以看 |
-
请 注册 或 登录 后发表评论