service/app/mix/controller/hvyogo_callback.go

28 lines
629 B
Go
Raw Normal View History

2024-06-15 13:41:03 +08:00
package controller
import (
"service/api/errcode"
"service/api/message/response"
hvyogoproto "service/api/proto/hvyogo/proto"
"service/app/mix/service"
"service/bizcommon/util"
"service/library/logger"
"github.com/gin-gonic/gin"
)
2024-06-17 22:25:43 +08:00
func ExtAgreeCallback(ctx *gin.Context) {
2024-06-15 13:41:03 +08:00
2024-06-17 22:25:43 +08:00
req := ctx.MustGet("client_req").(*hvyogoproto.ExtAgreeCallbackReq)
2024-06-15 13:41:03 +08:00
// 存入数据
2024-06-17 22:25:43 +08:00
ec := service.DefaultService.SaveAgreeCallback(ctx, req)
2024-06-15 13:41:03 +08:00
if ec != errcode.ErrCodeWorkerIdSrvOk {
2024-06-17 22:25:43 +08:00
logger.Error("SaveAgreeCallback fail, req: %v, ec: %v", util.ToJson(req), ec)
2024-06-15 13:41:03 +08:00
response.ReplyErrCodeMsg(ctx, ec)
return
}
response.ReplyOk(ctx, nil)
}