Initial commit

This commit is contained in:
2026-05-20 16:13:58 +08:00
commit ceffbe382e
500 changed files with 157469 additions and 0 deletions
+66
View File
@@ -0,0 +1,66 @@
package userinviteapi
import (
"net/http"
"stat/api/proto"
"stat/common/log"
"stat/common/stdLog"
"stat/service/userinviteser"
"github.com/gin-gonic/gin"
)
// @Tags 全民代理
// @Summary 全民代理
// @Description 传入用户信息登录
// @Accept json
// @Produce json
// @Param param body proto.AdminLoginReq true "参数"
// @Success 200 {string} string "成功"
// @Success 400 {string} string "失败"
// @Router /userInvite/district [POST]
func UserDistictInfo(ctx *gin.Context) {
param := proto.UserDistrictReq{}
if err := ctx.ShouldBindJSON(&param); err != nil {
stdLog.ServerJSON(ctx, stdLog.ParamError, err.Error())
return
}
data, err := userinviteser.UserDistictInfo(ctx, param)
if err != nil {
stdLog.ServerJSON(ctx, stdLog.Failure, err.Error())
return
}
log.Info("district info", log.Any("request", param), log.Any("resp", data))
ctx.JSON(http.StatusOK, data)
}
// @Tags 全民代理
// @Summary 全民代理
// @Description 传入用户信息登录
// @Accept json
// @Produce json
// @Param param body proto.AdminLoginReq true "参数"
// @Success 200 {string} string "成功"
// @Success 400 {string} string "失败"
// @Router /user/districtcode [POST]
func UserDistrictCode(ctx *gin.Context) {
param := proto.UserDistrictCodeReq{}
if err := ctx.ShouldBindJSON(&param); err != nil {
stdLog.ServerJSON(ctx, stdLog.ParamError, err.Error())
return
}
data, err := userinviteser.UserDistrictCodeInfo(ctx, param)
if err != nil {
stdLog.ServerJSON(ctx, stdLog.Failure, err.Error())
return
}
log.Info("district info", log.Any("request", param), log.Any("resp", data))
ctx.JSON(http.StatusOK, data)
}