diff --git a/app/mix/controller/contact_customer_service_api.go b/app/mix/controller/contact_customer_service_api.go index 3eadc6c6..aac72173 100644 --- a/app/mix/controller/contact_customer_service_api.go +++ b/app/mix/controller/contact_customer_service_api.go @@ -51,3 +51,15 @@ func ApiGetContactCustomerServiceListBySessionId(ctx *gin.Context) { } ReplyOk(ctx, data) } + +func ApiReadAllContactCustomerService(ctx *gin.Context) { + req := ctx.MustGet("client_req").(*contact_customer_serviceproto.ApiReadAllReq) + ec := service.DefaultService.ApiReadAllContactCustomerService(ctx, req) + if ec != errcode.ErrCodeContactCustomerServiceSrvOk { + logger.Error("OpReadAllContactCustomerService fail, req: %v, ec: %v", util.ToJson(req), ec) + ReplyErrorMsg(ctx, "server error") + return + } + + ReplyOk(ctx, nil) +} diff --git a/app/mix/controller/init.go b/app/mix/controller/init.go index 2ab88bfe..93f664ee 100644 --- a/app/mix/controller/init.go +++ b/app/mix/controller/init.go @@ -200,6 +200,7 @@ func Init(r *gin.Engine) { apiContactCustomerServiceGroup := r.Group("/api/contact_customer_service", PrepareToC()) apiContactCustomerServiceGroup.POST("create", middleware.JSONParamValidator(contact_customer_serviceproto.ApiCreateReq{}), middleware.JwtAuthenticator(), ApiCreateContactCustomerService) apiContactCustomerServiceGroup.POST("list_by_session_id", middleware.JSONParamValidator(contact_customer_serviceproto.ApiListBySessionIdReq{}), middleware.JwtAuthenticator(), ApiGetContactCustomerServiceListBySessionId) + apiContactCustomerServiceGroup.POST("read_all", middleware.JSONParamValidator(contact_customer_serviceproto.ApiReadAllReq{}), middleware.JwtAuthenticator(), ApiReadAllContactCustomerService) // 联系客服对话表 apiContactCustomerServiceSessionGroup := r.Group("/api/contact_customer_service_session", PrepareToC())