fix
zhangqian
2024-03-20 6befd5f2fe9779883993b87f2e686885c147bc34
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package v1
 
import (
    "aps_crm/model/response"
    "aps_crm/pkg/contextx"
    "aps_crm/pkg/ecode"
    "github.com/gin-gonic/gin"
)
 
type ContactInformationApi struct{}
 
// List
//
//    @Tags        ContactInformation
//    @Summary    联系方式列表
//    @Produce    application/json
//    @Success    200    {object}    contextx.Response{data=response.ContactInformationResponse}
//    @Router        /api/contactInformation/list [get]
func (con *ContactInformationApi) List(c *gin.Context) {
    ctx, ok := contextx.NewContext(c, nil)
    if !ok {
        return
    }
 
    contactInformations, errCode := contactInformationService.GetContactInformationList()
    if errCode != ecode.OK {
        ctx.Fail(errCode)
        return
    }
 
    ctx.OkWithDetailed(response.ContactInformationResponse{
        List: contactInformations,
    })
}