Преглед изворни кода

#6966 【Go查询】在接口“LoginQuery” > UserAccount: 返回所属经纪会员的Line客服账号字段 “MemberLineCSAccount”

deng.yinping пре 4 месеци
родитељ
комит
880a771b84
4 измењених фајлова са 33 додато и 0 уклоњено
  1. 8 0
      docs/docs.go
  2. 8 0
      docs/swagger.json
  3. 6 0
      docs/swagger.yaml
  4. 11 0
      models/account.go

+ 8 - 0
docs/docs.go

@@ -59229,10 +59229,18 @@ const docTemplate = `{
                     "description": "今日是否已签到",
                     "type": "boolean"
                 },
+                "linecsaccount": {
+                    "description": "Line客服账号",
+                    "type": "string"
+                },
                 "maxinvestornum": {
                     "description": "最大用户数(经纪会员下投资者个数)",
                     "type": "integer"
                 },
+                "memberlinecsaccount": {
+                    "description": "所属会员Line客服账号",
+                    "type": "string"
+                },
                 "memberuserid": {
                     "description": "所属会员ID",
                     "type": "integer"

+ 8 - 0
docs/swagger.json

@@ -59220,10 +59220,18 @@
                     "description": "今日是否已签到",
                     "type": "boolean"
                 },
+                "linecsaccount": {
+                    "description": "Line客服账号",
+                    "type": "string"
+                },
                 "maxinvestornum": {
                     "description": "最大用户数(经纪会员下投资者个数)",
                     "type": "integer"
                 },
+                "memberlinecsaccount": {
+                    "description": "所属会员Line客服账号",
+                    "type": "string"
+                },
                 "memberuserid": {
                     "description": "所属会员ID",
                     "type": "integer"

+ 6 - 0
docs/swagger.yaml

@@ -25976,9 +25976,15 @@ definitions:
       issigned:
         description: 今日是否已签到
         type: boolean
+      linecsaccount:
+        description: Line客服账号
+        type: string
       maxinvestornum:
         description: 最大用户数(经纪会员下投资者个数)
         type: integer
+      memberlinecsaccount:
+        description: 所属会员Line客服账号
+        type: string
       memberuserid:
         description: 所属会员ID
         type: integer

+ 11 - 0
models/account.go

@@ -211,12 +211,15 @@ type Useraccount struct {
 	Auditsrc         int32     `json:"-"  xorm:"AUDITSRC"`                        // 审核来源 - 1:管理端 2:终端
 	Rootuserid       int64     `json:"rootuserid"  xorm:"ROOTUSERID"`             // 根用户ID
 	Canrecommend     int32     `json:"canrecommend"  xorm:"CANRECOMMEND"`         // 是否可推荐 - 0:不可 1;可
+	LineCSAccount    string    `json:"linecsaccount"  xorm:"LINECSACCOUNT"`       // Line客服账号
 
 	TodayRefercount int `json:"todayrefercount" xorm:"-"` // 今日推荐人数
 
 	CURSCORE int64 `json:"curscore" xorm:"-"` // 积分
 
 	IsSigned bool `json:"issigned" xorm:"-"` // 今日是否已签到
+
+	MemberLineCSAccount string `json:"memberlinecsaccount"  xorm:"-"` // 所属会员Line客服账号
 }
 
 // TableName is USERACCOUNT
@@ -694,6 +697,14 @@ func GetUserAccount(userID int) (*Useraccount, error) {
 	p := new(Thjsignin)
 	userAccount.IsSigned, _ = engine.Where("userid = ?", userAccount.Userid).And("tradedate = to_char(sysdate, 'yyyymmdd')").Get(p)
 
+	// 所属会员Line客服账号
+	var p1 Useraccount
+	_, err = engine.Where("USERID = ?", userAccount.Memberuserid).Get(&p1)
+	if err == nil {
+		// 查询到有所属会员
+		userAccount.MemberLineCSAccount = p1.LineCSAccount
+	}
+
 	return &userAccount, nil
 }