|
|
@@ -32,8 +32,8 @@ type Ab struct {
|
|
32
|
32
|
func (a *Ab) Ab(c *gin.Context) {
|
|
33
|
33
|
user := service.AllService.UserService.CurUser(c)
|
|
34
|
34
|
|
|
35
|
|
- al := service.AllService.AddressBookService.ListByUserId(user.Id, 1, 1000)
|
|
36
|
|
- tags := service.AllService.TagService.ListByUserId(user.Id)
|
|
|
35
|
+ al := service.AllService.AddressBookService.ListByUserIdAndCollectionId(user.Id, 0, 1, 1000)
|
|
|
36
|
+ tags := service.AllService.TagService.ListByUserIdAndCollectionId(user.Id, 0)
|
|
37
|
37
|
|
|
38
|
38
|
tagColors := map[string]uint{}
|
|
39
|
39
|
//将tags中的name转成一个以逗号分割的字符串
|
|
|
@@ -98,23 +98,6 @@ func (a *Ab) UpAb(c *gin.Context) {
|
|
98
|
98
|
c.JSON(http.StatusOK, nil)
|
|
99
|
99
|
}
|
|
100
|
100
|
|
|
101
|
|
-// Tags
|
|
102
|
|
-// @Tags 地址
|
|
103
|
|
-// @Summary 标签
|
|
104
|
|
-// @Description 标签
|
|
105
|
|
-// @Accept json
|
|
106
|
|
-// @Produce json
|
|
107
|
|
-// @Success 200 {object} []model.Tag
|
|
108
|
|
-// @Failure 500 {object} response.ErrorResponse
|
|
109
|
|
-// @Router /tags [post]
|
|
110
|
|
-// @Security BearerAuth
|
|
111
|
|
-func (a *Ab) Tags(c *gin.Context) {
|
|
112
|
|
- user := service.AllService.UserService.CurUser(c)
|
|
113
|
|
-
|
|
114
|
|
- tags := service.AllService.TagService.ListByUserId(user.Id)
|
|
115
|
|
- c.JSON(http.StatusOK, tags.Tags)
|
|
116
|
|
-}
|
|
117
|
|
-
|
|
118
|
101
|
// PTags
|
|
119
|
102
|
// @Tags 地址[Personal]
|
|
120
|
103
|
// @Summary 标签
|