Merge pull request 'feat-IRONFANS-212-Robin' (#737) from feat-IRONFANS-212-Robin into test

Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/737
This commit is contained in:
chenhao 2024-09-12 16:32:21 +08:00
commit 5d25fb345a
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

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