by Robin at 20240912; read all

This commit is contained in:
Leufolium 2024-09-12 16:29:24 +08:00
parent 4038b87864
commit 84e28cb08b
2 changed files with 13 additions and 0 deletions

View File

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

View File

@ -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())