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,
|
})
|
}
|