43 lines
1.0 KiB
Go
43 lines
1.0 KiB
Go
|
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"
|
||
|
)
|
||
|
|
||
|
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)
|
||
|
response.ReplyErrCodeMsg(ctx, ec)
|
||
|
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)
|
||
|
response.ReplyErrCodeMsg(ctx, ec)
|
||
|
return
|
||
|
}
|
||
|
|
||
|
ReplyOk(ctx, data)
|
||
|
}
|