Sfoglia il codice sorgente

Merge branch 'feature/pc1.0' of hongze/hongze_yb into master

pc1.0:更新浏览记录
xyxie 3 anni fa
parent
commit
402a0f8493

+ 3 - 1
logic/user/user.go

@@ -141,9 +141,9 @@ func GetUserInfo(userInfo user.UserInfo) (userDetail Detail, err error, errMsg s
 			isSuspend = companyProduct.IsSuspend
 
 			//销售信息
-			sellerName = companyProduct.SellerName
 			adminInfo, tmpErr := admin2.GetByAdminId(companyProduct.SellerID)
 			if tmpErr == nil {
+				sellerName = adminInfo.RealName
 				sellerMobile = adminInfo.Mobile
 			}
 			//获取所有的权限分类列表
@@ -317,6 +317,8 @@ func Apply(userId int, companyId int64, mobile, email string, applyInfo userReq.
 		CompanyNamePay:  companyName,
 		CreateTime:      time.Now(),
 		Source: 		 applyInfo.Source,
+		SourceAgent:     applyInfo.SourceAgent,
+		FromPage:        applyInfo.FromPage,
 	}
 	err = ybApplyRecord.Create()
 	if err != nil {

+ 2 - 0
models/request/user/user.go

@@ -14,4 +14,6 @@ type ApplyReq struct {
 	RealName        string `description:"用户真实姓名" json:"real_name"`
 	Permission      string `description:"用户关注品种,多个品种之间用英文,隔开" json:"permission"`
 	Source			int	   `description:"申请来源:1-我的 2-活动 3-图库"`
+	SourceAgent     int    `description:"申请入口来源,1:小程序,2:pc" json:"source_agent"`
+	FromPage        string `description:"申请来源页面" json:"from_page"`
 }

+ 2 - 0
models/tables/yb_apply_record/yb_apply_record.go

@@ -23,6 +23,8 @@ type YbApplyRecord struct {
 	CreateTime      time.Time `gorm:"column:create_time;type:datetime" json:"createTime"`                           // 创建时间
 	IsMove			int		  `gorm:"column:is_move;type:tinyint(4);default:0" json:"is_move"`						// 是否已移动 0-否 1-是
 	Source			int		  `gorm:"column:source;type:tinyint(4);default:1" json:"source"`						// 申请来源 1-我的 2-活动 3-图库
+	SourceAgent     int       `gorm:"column:source_agent;type:tinyint(4);default:1" json:"source_agent"`             // 申请入口来源,1:小程序,2:pc
+	FromPage        string    `gorm:"column:from_page;type:varchar(255);default:''" json:"from_page"`                // 申请来源具体页面
 }
 
 // TableName get sql table name.获取数据库表名