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-19 13:58:47 +08:00
|
|
|
if ec != errcode.ErrCodeHvyogoSrvOk {
|
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)
|
|
|
|
}
|
2024-06-19 13:58:47 +08:00
|
|
|
|
|
|
|
func ExtSingleDistributeCallback(ctx *gin.Context) {
|
|
|
|
|
|
|
|
req := ctx.MustGet("client_req").(*hvyogoproto.ExtSingleDistributeCallbackReq)
|
|
|
|
|
|
|
|
// 存入数据
|
|
|
|
ec := service.DefaultService.SaveSingleDistributeCallback(ctx, req)
|
|
|
|
if ec != errcode.ErrCodeHvyogoSrvOk {
|
|
|
|
logger.Error("SaveSingleDistributeCallback fail, req: %v, ec: %v", util.ToJson(req), ec)
|
|
|
|
response.ReplyErrCodeMsg(ctx, ec)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
response.ReplyOk(ctx, nil)
|
|
|
|
}
|