2024-06-17 22:25:43 +08:00
|
|
|
package controller
|
|
|
|
|
|
|
|
import (
|
|
|
|
"service/api/errcode"
|
|
|
|
hvyogoproto "service/api/proto/hvyogo/proto"
|
|
|
|
"service/app/mix/service"
|
|
|
|
"service/bizcommon/util"
|
|
|
|
"service/library/logger"
|
|
|
|
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
|
|
|
|
func ApiHvyogoQueryAgreeState(ctx *gin.Context) {
|
|
|
|
|
|
|
|
req := ctx.MustGet("client_req").(*hvyogoproto.ApiQueryAgreeStateReq)
|
|
|
|
|
|
|
|
// 存入数据
|
|
|
|
data, ec := service.DefaultService.ApiHvyogoQueryAgreeState(ctx, req)
|
|
|
|
if ec != errcode.ErrCodeWorkerIdSrvOk {
|
|
|
|
logger.Error("ApiHygQueryAgreeState fail, req: %v, ec: %v", util.ToJson(req), ec)
|
2024-06-18 19:40:09 +08:00
|
|
|
ReplyErrCodeMsg(ctx, ec)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
ReplyOk(ctx, data)
|
|
|
|
}
|
|
|
|
|
|
|
|
func ApiHvyogoWorkerFindDetail(ctx *gin.Context) {
|
|
|
|
|
|
|
|
req := ctx.MustGet("client_req").(*hvyogoproto.ApiWorkerFindDetailReq)
|
|
|
|
|
|
|
|
// 存入数据
|
|
|
|
data, ec := service.DefaultService.ApiHvyogoWorkerFindDetail(ctx, req)
|
|
|
|
if ec != errcode.ErrCodeWorkerIdSrvOk {
|
|
|
|
logger.Error("ApiHygWorkerFindDetail fail, req: %v, ec: %v", util.ToJson(req), ec)
|
|
|
|
ReplyErrCodeMsg(ctx, ec)
|
2024-06-17 22:25:43 +08:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
ReplyOk(ctx, data)
|
|
|
|
}
|
|
|
|
|
|
|
|
func ApiHvyogoSingleDistribute(ctx *gin.Context) {
|
|
|
|
|
|
|
|
req := ctx.MustGet("client_req").(*hvyogoproto.ApiSingleDistributeReq)
|
|
|
|
|
|
|
|
// 存入数据
|
|
|
|
data, ec := service.DefaultService.ApiHvyogoSingleDistribute(ctx, req)
|
|
|
|
if ec != errcode.ErrCodeWorkerIdSrvOk {
|
|
|
|
logger.Error("ApiHygSingleDistribute fail, req: %v, ec: %v", util.ToJson(req), ec)
|
2024-06-18 19:40:09 +08:00
|
|
|
ReplyErrCodeMsg(ctx, ec)
|
2024-06-17 22:25:43 +08:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
ReplyOk(ctx, data)
|
|
|
|
}
|