Browse Source

实名认证

master
huangjiajun 5 days ago
parent
commit
d5c2b8d261
12 changed files with 60 additions and 1 deletions
  1. +13
    -0
      app/hdl/hdl_demo.go
  2. +2
    -0
      app/hdl/hdl_member_center.go
  3. +1
    -0
      app/md/md_college.go
  4. +1
    -0
      app/md/md_member_center.go
  5. +1
    -0
      app/md/md_user_feedback.go
  6. +1
    -0
      app/router/router.go
  7. +1
    -0
      app/svc/svc_college.go
  8. +11
    -0
      app/svc/svc_common.go
  9. +2
    -1
      app/svc/svc_user_feedback.go
  10. +10
    -0
      docs/docs.go
  11. +10
    -0
      docs/swagger.json
  12. +7
    -0
      docs/swagger.yaml

+ 13
- 0
app/hdl/hdl_demo.go View File

@@ -4,8 +4,10 @@ import (
"applet/app/e"
"applet/app/lib/aes"
"applet/app/lib/aes/md"
md2 "applet/app/md"
"applet/app/svc"
"applet/app/utils"
"code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git/rabbit"
"encoding/json"
"github.com/gin-gonic/gin"
"io/ioutil"
@@ -43,6 +45,17 @@ func Demo(c *gin.Context) {
}, nil)
return
}
func Demo1(c *gin.Context) {
ch, err := rabbit.Cfg.Pool.GetChannel()
if err == nil {
defer ch.Release()
}
arg := md2.AdvertisingWatch{Id: "3"}
err = ch.PublishV2(md2.EggAdvertisingQueueExchange, arg, md2.EggAdvertisingSmash)
if err != nil {
ch.PublishV2(md2.EggAdvertisingQueueExchange, arg, md2.EggAdvertisingSmash)
}
}

func TestCreateSign(c *gin.Context) {
var args interface{}


+ 2
- 0
app/hdl/hdl_member_center.go View File

@@ -169,6 +169,7 @@ func MemberCenterGetBasic(c *gin.Context) {
Phone: user.Phone,
InviteCode: user.SystemInviteCode,
IsBindExtend: "0",
IsRealName: "0",
HeadImg: svc.GetOssUrl(user.Avatar),
}
if user.CustomInviteCode != "" {
@@ -177,6 +178,7 @@ func MemberCenterGetBasic(c *gin.Context) {
if user.ParentUid > 0 {
resp.IsBindExtend = "1"
}
resp.IsRealName = svc.CheckRealName(user.Id)
e.OutSuc(c, resp, nil)
return
}

+ 1
- 0
app/md/md_college.go View File

@@ -30,6 +30,7 @@ type CollegeDetailResp struct {
Content string `json:"content"`
IsLike string `json:"is_like" example:"是否点赞 0否 1是"`
CreateAt string `json:"create_at"`
AppName string `json:"app_name"`
WatchCount string `json:"watch_count" example:"学习数量"`
LikeCount string `json:"like_count" example:"点赞数量"`
ForwardCount string `json:"forward_count" example:"分享数量"`


+ 1
- 0
app/md/md_member_center.go View File

@@ -16,6 +16,7 @@ type MemberCenterGetBasicResp struct {
InviteCode string `json:"invite_code"`
HeadImg string `json:"head_img"`
IsBindExtend string `json:"is_bind_extend" example:"是否绑定了上级 0否 1是"`
IsRealName string `json:"is_real_name" example:"是否实名认证 0否 1是"`
}

type UserEggFlowReqRespList struct {


+ 1
- 0
app/md/md_user_feedback.go View File

@@ -12,6 +12,7 @@ type UserFeedbackRecordReq struct {
type UserFeedbackListResp struct {
Id string `json:"id"`
Title string `json:"title"`
Type string `json:"type"`
Label string `json:"label"`
Img []string `json:"img"`
Content string `json:"content"`


+ 1
- 0
app/router/router.go View File

@@ -51,6 +51,7 @@ func Init() *gin.Engine {
func route(r *gin.RouterGroup) {
r.StaticFS("/static", http.Dir("./static"))
r.GET("/test", hdl.Demo)
r.GET("/test1", hdl.Demo1)
r.Any("/createSign", hdl.CreateSign)
r.Any("/aesDecryptByECB", hdl.AesDecryptByECB)
r.GET("/article/html", hdl.ArticleHtml) //H5渲染的文章


+ 1
- 0
app/svc/svc_college.go View File

@@ -79,6 +79,7 @@ func CollegeDetail(c *gin.Context, uid int) {
Url: fmt.Sprintf("%s%s?id=%s&is_hide=1", GetSysCfgStr("wap_host"), "/#/pages/course-detail-page/course-detail-page", utils.AnyToString(article.Id)),
Title: article.Title,
Content: article.Content,
AppName: GetSysCfgStr("app_name"),
IsLike: "0",
CreateAt: time.Unix(int64(article.CreatedAt), 0).Format("2006-01-02"),
WatchCount: NumFormat(article.WatchCount),


+ 11
- 0
app/svc/svc_common.go View File

@@ -55,6 +55,17 @@ func GetSysCfgStr(key string) string {

}

// 是否实名
func CheckRealName(uid int64) string {
IsRealName := "0"
NewUserRealNameAuthDb := implement.NewUserRealNameAuthDb(db.Db)
realName, _ := NewUserRealNameAuthDb.GetRealNameAuth(int(uid))
if realName != nil && realName.State == 1 {
IsRealName = "1"
}
return IsRealName
}

//存入用户的设备

func UserImeiAdd(c *gin.Context, uid int64) {


+ 2
- 1
app/svc/svc_user_feedback.go View File

@@ -48,7 +48,8 @@ func UserFeedbackList(c *gin.Context) {
json.Unmarshal([]byte(v.Img), &img)
tmp := md.UserFeedbackListResp{
Id: utils.IntToStr(v.Id),
Title: v.Type,
Type: v.Type,
Title: v.Title,
Img: img,
Content: v.Content,
State: "0",


+ 10
- 0
docs/docs.go View File

@@ -3230,6 +3230,9 @@ const docTemplate = `{
"md.CollegeDetailResp": {
"type": "object",
"properties": {
"app_name": {
"type": "string"
},
"content": {
"type": "string"
},
@@ -4099,6 +4102,10 @@ const docTemplate = `{
"type": "string",
"example": "是否绑定了上级 0否 1是"
},
"is_real_name": {
"type": "string",
"example": "是否实名认证 0否 1是"
},
"level_name": {
"description": "会员等级名称",
"type": "string"
@@ -4666,6 +4673,9 @@ const docTemplate = `{
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
}
},


+ 10
- 0
docs/swagger.json View File

@@ -3223,6 +3223,9 @@
"md.CollegeDetailResp": {
"type": "object",
"properties": {
"app_name": {
"type": "string"
},
"content": {
"type": "string"
},
@@ -4092,6 +4095,10 @@
"type": "string",
"example": "是否绑定了上级 0否 1是"
},
"is_real_name": {
"type": "string",
"example": "是否实名认证 0否 1是"
},
"level_name": {
"description": "会员等级名称",
"type": "string"
@@ -4659,6 +4666,9 @@
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
}
},


+ 7
- 0
docs/swagger.yaml View File

@@ -190,6 +190,8 @@ definitions:
type: object
md.CollegeDetailResp:
properties:
app_name:
type: string
content:
type: string
create_at:
@@ -792,6 +794,9 @@ definitions:
is_bind_extend:
example: 是否绑定了上级 0否 1是
type: string
is_real_name:
example: 是否实名认证 0否 1是
type: string
level_name:
description: 会员等级名称
type: string
@@ -1183,6 +1188,8 @@ definitions:
type: string
title:
type: string
type:
type: string
type: object
md.UserFeedbackRecordReq:
properties:


Loading…
Cancel
Save