diff --git a/app/mix/controller/contact_customer_service_api.go b/app/mix/controller/contact_customer_service_api.go index 3eadc6c6..353dc6bc 100644 --- a/app/mix/controller/contact_customer_service_api.go +++ b/app/mix/controller/contact_customer_service_api.go @@ -51,3 +51,27 @@ func ApiGetContactCustomerServiceListBySessionId(ctx *gin.Context) { } ReplyOk(ctx, data) } + +func ApiUpdateContactCustomerServiceByIds(ctx *gin.Context) { + req := ctx.MustGet("client_req").(*contact_customer_serviceproto.ApiUpdateByIdsReq) + ec := service.DefaultService.ApiUpdateContactCustomerServiceByIds(ctx, req) + if ec != errcode.ErrCodeContactCustomerServiceSrvOk { + logger.Error("ApiUpdateContactCustomerService fail, req: %v, ec: %v", util.ToJson(req), ec) + ReplyErrCodeMsg(ctx, ec) + return + } + + ReplyOk(ctx, nil) +} + +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 58c4f07b..09126fca 100644 --- a/app/mix/controller/init.go +++ b/app/mix/controller/init.go @@ -202,6 +202,8 @@ 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("update_by_ids", middleware.JSONParamValidator(contact_customer_serviceproto.ApiUpdateByIdsReq{}), middleware.JwtAuthenticator(), ApiUpdateContactCustomerServiceByIds) + apiContactCustomerServiceGroup.POST("read_all", middleware.JSONParamValidator(contact_customer_serviceproto.ApiReadAllReq{}), middleware.JwtAuthenticator(), ApiReadAllContactCustomerService) // 联系客服对话表 apiContactCustomerServiceSessionGroup := r.Group("/api/contact_customer_service_session", PrepareToC())