上传服务代码

This commit is contained in:
liwei1dao 2022-12-20 15:00:03 +08:00
parent b22ff23c4d
commit 7cea922e44

View File

@ -32,12 +32,19 @@ func (this *Api_Comp) PayDelivery(c *engine.Context) {
Price: req.Price,
Amount: req.Amount,
}
payresp *pb.PayDeliveryResp = &pb.PayDeliveryResp{}
payresp *pb.PayDeliveryResp = &pb.PayDeliveryResp{
Code: 0,
Msg: "成功",
Data: "".
}
)
defer c.JSON(http.StatusOK, &Respond{Code: payresp.Code, Message: payresp.Msg, Data: nil})
defer func() {
c.JSON(http.StatusOK, &Respond{Code: payresp.Code, Message: payresp.Msg, Data: ""})
}()
if sign := gin.ParamSign(this.options.Key, map[string]interface{}{"orderid": req.Order, "productid": req.ProductID, "price": req.Price, "amount": req.Amount, "uid": req.Uid}); sign != req.Sign {
this.module.Errorf("PayDelivery SignError sgin:%s", sign)
payresp.Code = pb.ErrorCode_SignError
payresp.Msg = pb.GetErrorCodeMsg(pb.ErrorCode_SignError)
return
}
if err = this.module.service.RpcCall(