feat-IRONFANS-212-Robin #737

Merged
chenhao merged 2 commits from feat-IRONFANS-212-Robin into test 2024-09-12 16:32:22 +08:00
2 changed files with 26 additions and 0 deletions

View File

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

View File

@ -200,6 +200,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())