feat: 从黄果 NET hgdjnet-server 9bfbafe 导入 HKDJ 官网后端
来源:hgdjnet-server 9bfbafe10d417deea959bd53117bc88a10e60a83 项目身份 HKDJ / JHA-216,独立官网仓库,Jenkins 守卫键 hkdjnet 测试目录 /server/hkdj_net,App/Web API 30331/30332 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package web_recharge
|
||||
|
||||
import (
|
||||
"hkdj-web-server/pub/common"
|
||||
"hkdj-web-server/pub/common/srvdef"
|
||||
srv_recharge "hkdj-web-server/web/service/srv_recharge"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// PayCenterBillCallback 嘉华支付中心支付回调
|
||||
// @Tags 支付回调
|
||||
// @Summary 嘉华支付回调通知(内部接口,无需鉴权)
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param param body srv_recharge.BillCallbackParam true "回调参数"
|
||||
// @Success 200 {string} string "success"
|
||||
// @Router /api/web/third/paycenter/bill/callback [POST]
|
||||
func PayCenterBillCallback(ctx *gin.Context) {
|
||||
var req srv_recharge.BillCallbackParam
|
||||
if err := ctx.ShouldBind(&req); err != nil {
|
||||
common.ServerJSON(ctx, srvdef.ErrParamError, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
if serr := srv_recharge.OnPayCenterCallback(ctx, &req); serr != nil {
|
||||
ctx.String(http.StatusBadRequest, "fail")
|
||||
return
|
||||
}
|
||||
ctx.String(http.StatusOK, "success")
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package web_recharge
|
||||
|
||||
import (
|
||||
"hkdj-web-server/pub/common"
|
||||
"hkdj-web-server/pub/common/srvdef"
|
||||
"hkdj-web-server/web/service/srv_viporder"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// RechargeSummary 统计指定时间范围内的充值汇总
|
||||
// @Tags wbapi统计
|
||||
// @Summary 统计充值汇总
|
||||
// @Description 按北京时间的开始/结束时间汇总支付成功订单金额与笔数
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param startTime query string true "开始时间,北京时间,支持 2006-01-02、2006-01-02 15:04:05、RFC3339"
|
||||
// @Param endTime query string true "结束时间,北京时间,支持 2006-01-02、2006-01-02 15:04:05、RFC3339"
|
||||
// @Success 200 {object} srv_viporder.RechargeSummaryResp "成功"
|
||||
// @Failure 400 {string} string "失败"
|
||||
// @Router /wbapi/hgdjnet/recharge/summary [GET]
|
||||
func RechargeSummary(ctx *gin.Context) {
|
||||
var req srv_viporder.RechargeSummaryReq
|
||||
if err := ctx.ShouldBindQuery(&req); err != nil {
|
||||
common.ServerJSON(ctx, srvdef.ErrParamError, err.Error())
|
||||
return
|
||||
}
|
||||
resp, serr := srv_viporder.GetRechargeSummary(ctx, &req)
|
||||
if serr != nil {
|
||||
common.ServerJSON(ctx, serr, nil)
|
||||
return
|
||||
}
|
||||
common.ServerJSON(ctx, srvdef.Success, resp)
|
||||
}
|
||||
Reference in New Issue
Block a user