Browse Source

统一社媒账号信息

Ethan 1 month ago
parent
commit
ada93a8387

+ 5 - 5
app/dao/local_life_task_info_dao.go

@@ -78,7 +78,7 @@ func (d LocalLifeTaskInfoDao) GetListBySketchDefault(param *vo.DefaultSearchPara
 	var total int64
 	query := Db.Model(&entity.LocalLifeTaskInfo{}).Where("local_id = ? AND cur_default_type = ?", param.TaskId, 4)
 	query.Count(&total)
-	query = query.Select("task_id, talent_id, settle_amount, draft_fee, sketch_missing_time")
+	query = query.Select("task_id, talent_id, settle_amount, draft_fee, sketch_missing_time, open_id")
 	offset := (param.Page - 1) * param.PageSize
 	if err := query.Order("sketch_missing_time desc").Offset(offset).Limit(param.PageSize).Find(&localTaskInfos).Error; err != nil {
 		return nil, 0, err
@@ -92,7 +92,7 @@ func (d LocalLifeTaskInfoDao) GetListByLinkDefault(param *vo.DefaultSearchParam)
 	var total int64
 	query := Db.Model(&entity.LocalLifeTaskInfo{}).Where("local_id = ? AND cur_default_type = ?", param.TaskId, 6)
 	query.Count(&total)
-	query = query.Select("task_id, talent_id, settle_amount, draft_fee, link_missing_time")
+	query = query.Select("task_id, talent_id, settle_amount, draft_fee, link_missing_time, open_id")
 	offset := (param.Page - 1) * param.PageSize
 	if err := query.Order("link_missing_time desc").Offset(offset).Limit(param.PageSize).Find(&localTaskInfos).Error; err != nil {
 		return nil, 0, err
@@ -106,7 +106,7 @@ func (d LocalLifeTaskInfoDao) GetListByDataDefault(param *vo.DefaultSearchParam)
 	var total int64
 	query := Db.Model(&entity.LocalLifeTaskInfo{}).Where("local_id = ? AND cur_default_type = ?", param.TaskId, 8)
 	query.Count(&total)
-	query = query.Select("task_id, talent_id, settle_amount, draft_fee, data_missing_time")
+	query = query.Select("task_id, talent_id, settle_amount, draft_fee, data_missing_time, open_id")
 	offset := (param.Page - 1) * param.PageSize
 	if err := query.Order("data_missing_time desc").Offset(offset).Limit(param.PageSize).Find(&localTaskInfos).Error; err != nil {
 		return nil, 0, err
@@ -120,7 +120,7 @@ func (d LocalLifeTaskInfoDao) GetListByTerminateDefault(param *vo.DefaultSearchP
 	var total int64
 	query := Db.Debug().Model(&entity.LocalLifeTaskInfo{}).Where("local_id = ? AND task_stage = ?", param.TaskId, 17)
 	query.Count(&total)
-	query = query.Select("task_id, talent_id, settle_amount, draft_fee, terminate_time, terminate_reason, terminate_operator_type, terminate_operator")
+	query = query.Select("task_id, talent_id, settle_amount, draft_fee, terminate_time, terminate_reason, terminate_operator_type, terminate_operator, open_id")
 	offset := (param.Page - 1) * param.PageSize
 	if err := query.Order("terminate_time desc").Offset(offset).Limit(param.PageSize).Find(&localTaskInfos).Error; err != nil {
 		return nil, 0, err
@@ -134,7 +134,7 @@ func (d LocalLifeTaskInfoDao) GetListByCancelDefault(param *vo.DefaultSearchPara
 	var total int64
 	query := Db.Debug().Model(&entity.LocalLifeTaskInfo{}).Where("local_id = ? AND task_stage = ?", param.TaskId, 16)
 	query.Count(&total)
-	query = query.Select("task_id, talent_id, settle_amount, draft_fee, cancel_time, cancel_reason, cancel_operator_type, cancel_operator")
+	query = query.Select("task_id, talent_id, settle_amount, draft_fee, cancel_time, cancel_reason, cancel_operator_type, cancel_operator, open_id")
 	offset := (param.Page - 1) * param.PageSize
 	if err := query.Order("cancel_time desc").Offset(offset).Limit(param.PageSize).Find(&localTaskInfos).Error; err != nil {
 		return nil, 0, err

+ 7 - 5
app/dao/platform_kuaishou_user_info_dao.go

@@ -1,18 +1,20 @@
 package dao
 
 import (
-	"github.com/sirupsen/logrus"
 	"youngee_b_api/app/entity"
 )
 
 type PlatformKuaishouUserInfoDao struct{}
 
-func (d PlatformKuaishouUserInfoDao) SelectUserInfo(talentId string) (*entity.PlatformKuaishouUserInfo, error) {
+func (d PlatformKuaishouUserInfoDao) GetUserInfo(openId string) (*entity.PlatformKuaishouUserInfo, error) {
 	var userInfo *entity.PlatformKuaishouUserInfo
-	err := Db.Model(entity.PlatformKuaishouUserInfo{}).Select("open_id, nick_name, head_uri").Where("talent_id = ?", talentId).Find(&userInfo).Error
+	err := Db.Model(entity.PlatformKuaishouUserInfo{}).Select("open_id, platform_id, nick_name, head_uri, city, gender").Where("open_id = ?", openId).Find(userInfo).Error
 	if err != nil {
-		logrus.Errorf("[SelectUserInfo] error query, err:%+v", err)
-		return nil, err
+		userInfo.OpenID = openId
+		userInfo.NickName = ""
+		userInfo.HeadUri = ""
+		userInfo.City = ""
+		userInfo.Gender = ""
 	}
 	return userInfo, nil
 }

+ 10 - 10
app/dao/project_task_info_dao.go

@@ -32,16 +32,16 @@ func (d ProjectTaskInfoDao) GetListByTaskStage(projectId string, taskStage int64
 		query = query.Where("project_id = ? AND task_stage = ?", projectId, taskStage)
 	}
 	if talentNickname != "" {
-		var talentInfos []entity.YoungeeTalentInfo
-		err1 := Db.Model(&entity.YoungeeTalentInfo{}).Where("talent_wx_nickname = ?", talentNickname).Find(&talentInfos).Error
+		var talentInfos []entity.PlatformKuaishouUserInfo
+		err1 := Db.Model(&entity.PlatformKuaishouUserInfo{}).Where("nick_name = ?", talentNickname).Find(&talentInfos).Error
 		if err1 != nil {
 			return nil, 0, err1
 		}
-		var talentIds []string
+		var openIds []string
 		for _, talentInfo := range talentInfos {
-			talentIds = append(talentIds, talentInfo.ID)
+			openIds = append(openIds, talentInfo.OpenID)
 		}
-		query = query.Where("talent_id in ?", talentIds)
+		query = query.Where("open_id in ?", openIds)
 	}
 	// 计算偏移量
 	offset := (page - 1) * pageSize
@@ -71,7 +71,7 @@ func (d ProjectTaskInfoDao) GetListBySketchDefault(param *vo.DefaultSearchParam)
 	var total int64
 	query := Db.Model(&entity.ProjectTaskInfo{}).Where("project_id = ? AND cur_default_type = ?", param.TaskId, 4)
 	query.Count(&total)
-	query = query.Select("task_id, talent_id, settle_amount, draft_fee, sketch_missing_time")
+	query = query.Select("task_id, talent_id, settle_amount, draft_fee, sketch_missing_time, open_id")
 	offset := (param.Page - 1) * param.PageSize
 	if err := query.Order("sketch_missing_time desc").Offset(offset).Limit(param.PageSize).Find(&projectTaskInfos).Error; err != nil {
 		return nil, 0, err
@@ -85,7 +85,7 @@ func (d ProjectTaskInfoDao) GetListByLinkDefault(param *vo.DefaultSearchParam) (
 	var total int64
 	query := Db.Model(&entity.ProjectTaskInfo{}).Where("project_id = ? AND cur_default_type = ?", param.TaskId, 6)
 	query.Count(&total)
-	query = query.Select("task_id, talent_id, settle_amount, draft_fee, link_missing_time")
+	query = query.Select("task_id, talent_id, settle_amount, draft_fee, link_missing_time, open_id")
 	offset := (param.Page - 1) * param.PageSize
 	if err := query.Order("link_missing_time desc").Offset(offset).Limit(param.PageSize).Find(&projectTaskInfos).Error; err != nil {
 		return nil, 0, err
@@ -99,7 +99,7 @@ func (d ProjectTaskInfoDao) GetListByDataDefault(param *vo.DefaultSearchParam) (
 	var total int64
 	query := Db.Model(&entity.ProjectTaskInfo{}).Where("project_id = ? AND cur_default_type = ?", param.TaskId, 8)
 	query.Count(&total)
-	query = query.Select("task_id, talent_id, settle_amount, draft_fee, data_missing_time")
+	query = query.Select("task_id, talent_id, settle_amount, draft_fee, data_missing_time, open_id")
 	offset := (param.Page - 1) * param.PageSize
 	if err := query.Order("data_missing_time desc").Offset(offset).Limit(param.PageSize).Find(&projectTaskInfos).Error; err != nil {
 		return nil, 0, err
@@ -113,7 +113,7 @@ func (d ProjectTaskInfoDao) GetListByTerminateDefault(param *vo.DefaultSearchPar
 	var total int64
 	query := Db.Debug().Model(&entity.ProjectTaskInfo{}).Where("project_id = ? AND task_stage = ?", param.TaskId, 17)
 	query.Count(&total)
-	query = query.Select("task_id, talent_id, settle_amount, draft_fee, terminate_time, terminate_reason, terminate_operator_type, terminate_operator")
+	query = query.Select("task_id, talent_id, settle_amount, draft_fee, terminate_time, terminate_reason, terminate_operator_type, terminate_operator, open_id")
 	offset := (param.Page - 1) * param.PageSize
 	if err := query.Order("terminate_time desc").Offset(offset).Limit(param.PageSize).Find(&projectTaskInfos).Error; err != nil {
 		return nil, 0, err
@@ -127,7 +127,7 @@ func (d ProjectTaskInfoDao) GetListByCancelDefault(param *vo.DefaultSearchParam)
 	var total int64
 	query := Db.Debug().Model(&entity.ProjectTaskInfo{}).Where("project_id = ? AND task_stage = ?", param.TaskId, 16)
 	query.Count(&total)
-	query = query.Select("task_id, talent_id, settle_amount, draft_fee, cancel_time, cancel_reason, cancel_operator_type, cancel_operator")
+	query = query.Select("task_id, talent_id, settle_amount, draft_fee, cancel_time, cancel_reason, cancel_operator_type, cancel_operator, open_id")
 	offset := (param.Page - 1) * param.PageSize
 	if err := query.Order("cancel_time desc").Offset(offset).Limit(param.PageSize).Find(&projectTaskInfos).Error; err != nil {
 		return nil, 0, err

+ 2 - 2
app/dao/talent_info_dao.go

@@ -8,7 +8,7 @@ import (
 
 type TalentInfoDao struct{}
 
-func (d TalentInfoDao) SelectTalentPhone(talentId string) (*string, error) {
+func (d TalentInfoDao) GetTalentPhone(talentId string) (*string, error) {
 	var talentInfo *entity.YoungeeTalentInfo
 	err := Db.Model(entity.YoungeeTalentInfo{}).Select("talent_phone_number").Where("id = ?", talentId).Find(&talentInfo).Error
 	if err != nil {
@@ -18,7 +18,7 @@ func (d TalentInfoDao) SelectTalentPhone(talentId string) (*string, error) {
 	return &talentInfo.TalentPhoneNumber, nil
 }
 
-func (d TalentInfoDao) SelectTalentInfo(talentId string) (*entity.YoungeeTalentInfo, error) {
+func (d TalentInfoDao) GetTalentInfo(talentId string) (*entity.YoungeeTalentInfo, error) {
 	var talentInfo *entity.YoungeeTalentInfo
 	err := Db.Model(&entity.YoungeeTalentInfo{}).Where("id = ?", talentId).Find(&talentInfo).Error
 	if err != nil {

+ 0 - 32
app/entity/platform_kuaishou_user_info.go

@@ -1,32 +0,0 @@
-// Code generated by sql2gorm. DO NOT EDIT.
-package entity
-
-import (
-	"time"
-)
-
-type PlatformKuaishouUserInfo struct {
-	ID           int64     `gorm:"column:id;primary_key"` // id
-	OpenId       string    `gorm:"column:open_id;NOT NULL"`
-	PlatformId   int64     `gorm:"column:platform_id;NOT NULL"`
-	TalentId     string    `gorm:"column:talent_id;NOT NULL"`
-	Code         string    `gorm:"column:code;NOT NULL"`
-	AccessToken  string    `gorm:"column:access_token;NOT NULL"`
-	RefreshToken string    `gorm:"column:refresh_token;NOT NULL"`
-	NickName     string    `gorm:"column:nick_name;NOT NULL"`
-	HeadUri      string    `gorm:"column:head_uri;NOT NULL"`
-	Fan          string    `gorm:"column:fan;NOT NULL"`
-	Expired      int64     `gorm:"column:expired"`
-	SaleNumTotal int64     `gorm:"column:sale_num_total;NOT NULL"`
-	SaleNum30day int64     `gorm:"column:sale_num_30day;NOT NULL"`
-	CreateTime   time.Time `gorm:"column:create_time;NOT NULL"`
-	UpdateTime   time.Time `gorm:"column:update_time;NOT NULL"`
-	IsDelete     int64     `gorm:"column:is_delete;NOT NULL"`
-	LikeNum      int64     `gorm:"column:like_num;NOT NULL"`
-	VideoNum     int64     `gorm:"column:video_num;NOT NULL"`
-	City         string    `gorm:"column:city"`
-}
-
-func (m *PlatformKuaishouUserInfo) TableName() string {
-	return "platform_kuaishou_user_info"
-}

+ 37 - 0
app/entity/platform_user_info.go

@@ -0,0 +1,37 @@
+// Code generated by sql2gorm. DO NOT EDIT.
+package entity
+
+import (
+	"time"
+)
+
+type PlatformKuaishouUserInfo struct {
+	ID                 int64     `gorm:"column:id;primary_key;AUTO_INCREMENT"` // 主键,自增长
+	OpenID             string    `gorm:"column:open_id"`                       // 用户唯一表示
+	PlatformID         int64     `gorm:"column:platform_id"`                   // 1.红book 2。抖音 3。微博 4。快手(电商)5.B站 6.大众点评 7.知乎 8.快手(平台)
+	TalentID           string    `gorm:"column:talent_id"`                     // 达人id
+	Code               string    `gorm:"column:code"`                          // 扫码后获得的临时票据
+	AccessToken        string    `gorm:"column:access_token"`                  // 调用API需要的参数
+	RefreshToken       string    `gorm:"column:refresh_token"`                 // 用于刷新access_token
+	NickName           string    `gorm:"column:nick_name"`                     // 快手昵称
+	HeadUri            string    `gorm:"column:head_uri"`                      // 用户头像
+	Fan                string    `gorm:"column:fan"`                           // 用户粉丝数
+	Expired            int64     `gorm:"column:expired;default:0"`             // access_token是否可用
+	SaleNum30Day       int64     `gorm:"column:sale_num_30day"`                // 30日销量
+	SaleNumTotal       int64     `gorm:"column:sale_num_total"`                // 总销量
+	CreateTime         time.Time `gorm:"column:create_time"`                   // 创建时间
+	UpdateTime         time.Time `gorm:"column:update_time"`                   // 更新时间
+	IsDelete           int64     `gorm:"column:is_delete;default:0"`           // 是否被删除,默认为0,1表示被删除
+	LikeNum            int64     `gorm:"column:like_num;default:0"`            // 点赞数
+	VideoNum           int64     `gorm:"column:video_num;default:0"`           // 作品数
+	SaleNum7Day        string    `gorm:"column:sale_num_7day;default:0"`       // 近7天销量
+	City               string    `gorm:"column:city"`                          // 用户城市所在地
+	Gender             string    `gorm:"column:gender"`                        // 用户性别
+	Skill              string    `gorm:"column:skill"`                         // 擅长领域
+	HomePageCaptureUrl string    `gorm:"column:home_page_capture_url"`         // 用户主页链接截图
+	HomePageUrl        string    `gorm:"column:home_page_url"`                 // 用户主页链接
+}
+
+func (m *PlatformKuaishouUserInfo) TableName() string {
+	return "platform_kuaishou_user_info"
+}

+ 1 - 0
app/entity/project_task_info.go

@@ -55,6 +55,7 @@ type ProjectTaskInfo struct {
 	CancelOperatorType     int64     `gorm:"column:cancel_operator_type;default:0;NOT NULL"`
 	CancelOperator         string    `gorm:"column:cancel_operator"`
 	TalentName             string    `gorm:"column:talent_name"`
+	OpenID                 string    `gorm:"column:open_id"` // 达人报名的唯一标识
 }
 
 func (m *ProjectTaskInfo) TableName() string {

+ 1 - 0
app/entity/selection_task_info.go

@@ -38,6 +38,7 @@ type SelectionTaskInfo struct {
 	TeamIncome             int       `gorm:"column:team_income"`                 // young之团团长现金收益
 	TeamPoint              int       `gorm:"column:team_point"`                  // young之团团长积分收益
 	SaleActual             int64     `gorm:"column:sale_actual"`                 // 实际带货量
+	OpenID                 string    `gorm:"column:open_id"`                     // 达人报名的快手唯一标识
 }
 
 func (m *SelectionTaskInfo) TableName() string {

+ 19 - 14
app/service/default_service.go

@@ -228,18 +228,19 @@ func (s DefaultService) GetPublicDefaultTalentList(param *vo.DefaultSearchParam)
 		}
 		for _, projectTaskInfo := range projectTaskInfos {
 			talentId := projectTaskInfo.TalentID
-			talentInfo, _ := dao.TalentInfoDao{}.SelectTalentInfo(talentId)
-			platformKuaishouUserInfo, _ := dao.PlatformKuaishouUserInfoDao{}.SelectUserInfo(talentId)
+			talentInfo, _ := dao.TalentInfoDao{}.GetTalentInfo(talentId)
+			platformKuaishouUserInfo, _ := dao.PlatformKuaishouUserInfoDao{}.GetUserInfo(projectTaskInfo.OpenID)
 			reTalentDefault := &vo.ReTalentDefault{
 				TalentId:    talentId,
 				TalentPhone: talentInfo.TalentPhoneNumber,
 				TaskId:      projectTaskInfo.TaskID,
 				DraftFee:    projectTaskInfo.DraftFee,
-				OpenId:      platformKuaishouUserInfo.OpenId,
+				OpenId:      platformKuaishouUserInfo.OpenID,
+				PlatformId:  platformKuaishouUserInfo.PlatformID,
 				NickName:    platformKuaishouUserInfo.NickName,
 				HeadUri:     platformKuaishouUserInfo.HeadUri,
 				City:        platformKuaishouUserInfo.City,
-				Gender:      talentInfo.Sex,
+				Gender:      platformKuaishouUserInfo.Gender,
 			}
 			if defaultType == 1 {
 				reTalentDefault.DefaultTime = projectTaskInfo.SketchMissingTime.Format("2006-01-02 15:04:05")
@@ -296,8 +297,8 @@ func (s DefaultService) GetPublicDefaultTalentList(param *vo.DefaultSearchParam)
 			Data:     resultMap,
 		}
 		return result, nil
-		// 本地生活
 	} else if param.TaskType == 2 {
+		// 本地生活
 		var localLifeTaskInfos []entity.LocalLifeTaskInfo
 		var total int64
 		var err error
@@ -328,18 +329,19 @@ func (s DefaultService) GetPublicDefaultTalentList(param *vo.DefaultSearchParam)
 		}
 		for _, localLifeTaskInfo := range localLifeTaskInfos {
 			talentId := localLifeTaskInfo.TalentID
-			talentInfo, _ := dao.TalentInfoDao{}.SelectTalentInfo(talentId)
-			platformKuaishouUserInfo, _ := dao.PlatformKuaishouUserInfoDao{}.SelectUserInfo(talentId)
+			talentInfo, _ := dao.TalentInfoDao{}.GetTalentInfo(talentId)
+			platformKuaishouUserInfo, _ := dao.PlatformKuaishouUserInfoDao{}.GetUserInfo(localLifeTaskInfo.OpenID)
 			reTalentDefault := &vo.ReTalentDefault{
 				TalentId:    talentId,
 				TalentPhone: talentInfo.TalentPhoneNumber,
 				TaskId:      localLifeTaskInfo.TaskID,
 				DraftFee:    localLifeTaskInfo.DraftFee,
-				OpenId:      platformKuaishouUserInfo.OpenId,
+				OpenId:      platformKuaishouUserInfo.OpenID,
+				PlatformId:  platformKuaishouUserInfo.PlatformID,
 				NickName:    platformKuaishouUserInfo.NickName,
 				HeadUri:     platformKuaishouUserInfo.HeadUri,
 				City:        platformKuaishouUserInfo.City,
-				Gender:      talentInfo.Sex,
+				Gender:      platformKuaishouUserInfo.Gender,
 			}
 			if defaultType == 1 {
 				reTalentDefault.DefaultTime = localLifeTaskInfo.SketchMissingTime.Format("2006-01-02 15:04:05")
@@ -455,16 +457,19 @@ func (s DefaultService) GetTargetDefaultTalentList(param *vo.DefaultSearchParam)
 	}
 	for _, projectTaskInfo := range projectTaskInfos {
 		talentId := projectTaskInfo.TalentID
-		talentPhone, _ := dao.TalentInfoDao{}.SelectTalentPhone(talentId)
-		platformKuaishouUserInfo, _ := dao.PlatformKuaishouUserInfoDao{}.SelectUserInfo(talentId)
+		talentInfo, _ := dao.TalentInfoDao{}.GetTalentInfo(talentId)
+		platformKuaishouUserInfo, _ := dao.PlatformKuaishouUserInfoDao{}.GetUserInfo(projectTaskInfo.OpenID)
 		reTalentDefault := &vo.ReTalentDefault{
 			TalentId:    talentId,
-			TalentPhone: *talentPhone,
+			TalentPhone: talentInfo.TalentPhoneNumber,
+			TaskId:      projectTaskInfo.TaskID,
 			DraftFee:    projectTaskInfo.DraftFee,
-			OpenId:      platformKuaishouUserInfo.OpenId,
+			OpenId:      platformKuaishouUserInfo.OpenID,
+			PlatformId:  platformKuaishouUserInfo.PlatformID,
 			NickName:    platformKuaishouUserInfo.NickName,
 			HeadUri:     platformKuaishouUserInfo.HeadUri,
-			City:        "-",
+			City:        platformKuaishouUserInfo.City,
+			Gender:      platformKuaishouUserInfo.Gender,
 		}
 		if defaultType == 4 {
 			reTalentDefault.DefaultTime = projectTaskInfo.TerminateTime.Format("2006-01-02 15:04:05")

+ 6 - 14
app/service/local_life_service.go

@@ -1136,22 +1136,14 @@ func (s LocalLifeService) GetStoreExploreInfo(param *vo.StoreExploreParam) (*vo.
 	}
 	for _, localLifeTaskInfo := range localLifeTaskInfos {
 		// 获取达人信息
-		talentInfo, err := dao.TalentInfoDao{}.SelectTalentInfo(localLifeTaskInfo.TalentID)
-		if err != nil {
-			return nil, err
-		}
-		//regionName, err := dao.RegionInfoDao{}.SelectRegion(talentInfo.VisitStoreRegion)
-		//if err != nil {
-		//	regionName = ""
-		//}
-		regionName := localLifeTaskInfo.City
+		platformKuaishouUserInfo, _ := dao.PlatformKuaishouUserInfoDao{}.GetUserInfo(localLifeTaskInfo.OpenID)
 		talentPreview := &vo.TalentPreview{
 			TalentId:    localLifeTaskInfo.TalentID,
-			TalentPhoto: talentInfo.Avatar,
-			TalentName:  talentInfo.TalentWxNickname,
-			Account:     "",
-			Location:    regionName,
-			Gender:      talentInfo.Sex,
+			TalentPhoto: platformKuaishouUserInfo.HeadUri,
+			TalentName:  platformKuaishouUserInfo.NickName,
+			Account:     platformKuaishouUserInfo.OpenID,
+			Location:    platformKuaishouUserInfo.City,
+			Gender:      platformKuaishouUserInfo.Gender,
 		}
 		reStoreExploreTalent := &vo.ReStoreExploreTalent{
 			ReTalentPreview: talentPreview,

+ 19 - 20
app/service/task_info_service.go

@@ -60,25 +60,20 @@ func (t TaskInfoService) LogisticsTalentList(param *vo.LogisticsTalentParam) (*v
 	}
 	for _, projectTaskInfo := range projectTaskInfos {
 		// 获取达人信息
-		talentInfo, err := dao.TalentInfoDao{}.SelectTalentInfo(projectTaskInfo.TalentID)
-		if err != nil {
-			return nil, err
-		}
-		regionName, err := dao.RegionInfoDao{}.SelectRegion(talentInfo.VisitStoreRegion)
-		if err != nil {
-			regionName = ""
-		}
+		platformKuaishouUserInfo, _ := dao.PlatformKuaishouUserInfoDao{}.GetUserInfo(projectTaskInfo.OpenID)
 		taskLogistics, err := dao.TaskLogisticsDao{}.SelectTaskLogistics(projectTaskInfo.TaskID)
 		if err != nil {
 			return nil, err
 		}
 		talentPreview := &vo.TalentPreview{
 			TalentId:    projectTaskInfo.TalentID,
-			TalentPhoto: talentInfo.Avatar,
-			TalentName:  talentInfo.TalentWxNickname,
-			Account:     "",
-			Location:    regionName,
-			Gender:      talentInfo.Sex,
+			TalentPhoto: platformKuaishouUserInfo.HeadUri,
+			TalentName:  platformKuaishouUserInfo.NickName,
+			TaskId:      projectTaskInfo.TaskID,
+			Account:     platformKuaishouUserInfo.OpenID,
+			PlatformId:  platformKuaishouUserInfo.PlatformID,
+			Location:    platformKuaishouUserInfo.City,
+			Gender:      platformKuaishouUserInfo.Gender,
 		}
 		reLogisticsTalent := &vo.ReLogisticsTalent{
 			TaskId:             projectTaskInfo.TaskID,
@@ -203,6 +198,7 @@ func (t TaskInfoService) LogisticsTalentCount(param *vo.LogisticsTalentParam) ma
 	return res
 }
 
+// 电商带货执行中-悬赏兑现
 func (t TaskInfoService) SelectionRewardCashDetail(param *vo.SelectionRewardCashParam) (*vo.ReSelectionRewardCash, error) {
 	if param.Page == 0 {
 		param.Page = 1
@@ -222,14 +218,17 @@ func (t TaskInfoService) SelectionRewardCashDetail(param *vo.SelectionRewardCash
 	}
 	var talentRewardMsgs []vo.TalentRewardMsg
 	for _, selectionTaskInfo := range selectionTaskInfos {
-		talentInfo, _ := dao.TalentInfoDao{}.SelectTalentInfo(selectionTaskInfo.TalentID)
+		platformKuaishouUserInfo, _ := dao.PlatformKuaishouUserInfoDao{}.GetUserInfo(selectionTaskInfo.OpenID)
 		talentRewardMsg := vo.TalentRewardMsg{
-			PhotoUrl: talentInfo.Avatar,
-			Nickname: talentInfo.TalentNickname,
-			Account:  talentInfo.TalentWxOpenid,
-			Gender:   talentInfo.Sex,
-			OrderNum: selectionTaskInfo.SaleActual,
-			CashTime: selectionTaskInfo.WithdrawDate.Format("2006-01-02 15:04:05"),
+			PhotoUrl:   platformKuaishouUserInfo.HeadUri,
+			Nickname:   platformKuaishouUserInfo.NickName,
+			Account:    platformKuaishouUserInfo.OpenID,
+			PlatformId: platformKuaishouUserInfo.PlatformID,
+			City:       platformKuaishouUserInfo.City,
+			Gender:     platformKuaishouUserInfo.Gender,
+			OrderNum:   selectionTaskInfo.SaleActual,
+			CashTime:   selectionTaskInfo.WithdrawDate.Format("2006-01-02 15:04:05"),
+			TaskId:     selectionTaskInfo.TaskID,
 		}
 		talentRewardMsgs = append(talentRewardMsgs, talentRewardMsg)
 	}

+ 3 - 1
app/vo/re_logistics_talent.go

@@ -17,6 +17,8 @@ type TalentPreview struct {
 	TalentPhoto string `json:"talentPhoto"`
 	TalentName  string `json:"talentName"`
 	Account     string `json:"account"`
+	PlatformId  int64  `json:"platformId"`
 	Location    string `json:"location"`
-	Gender      int64  `json:"gender"`
+	Gender      string `json:"gender"`
+	TaskId      string `json:"taskId"`
 }

+ 9 - 6
app/vo/re_selection_reward_cash.go

@@ -9,10 +9,13 @@ type ReSelectionRewardCash struct {
 }
 
 type TalentRewardMsg struct {
-	PhotoUrl string `json:"photoUrl"`
-	Nickname string `json:"nickname"`
-	Account  string `json:"account"`
-	OrderNum int64  `json:"orderNum"`
-	CashTime string `json:"cashTime"`
-	Gender   int64  `json:"gender"` // 0未知 1男 2女
+	PhotoUrl   string `json:"photoUrl"`
+	Nickname   string `json:"nickname"`
+	Account    string `json:"account"`
+	PlatformId int64  `json:"platformId"`
+	City       string `json:"city"`
+	OrderNum   int64  `json:"orderNum"`
+	CashTime   string `json:"cashTime"`
+	Gender     string `json:"gender"` // U:未知;M,m:男; F女
+	TaskId     string `json:"taskId"`
 }

+ 2 - 1
app/vo/re_talent_default.go

@@ -3,10 +3,11 @@ package vo
 type ReTalentDefault struct {
 	TalentId     string  `json:"talentId"`
 	OpenId       string  `json:"openId"` // 表platform_kuaishou_user_info
+	PlatformId   int64   `json:"platformId"`
 	NickName     string  `json:"nickName"`
 	HeadUri      string  `json:"headUri"`
 	City         string  `json:"city"`
-	Gender       int64   `json:"gender"`       // 0未知 1男 2
+	Gender       string  `json:"gender"`       // U:未知;M,m:男;F f
 	TalentPhone  string  `json:"talentPhone"`  // 表youngee_talent_info
 	TaskId       string  `json:"taskId"`       // 任务id
 	DraftFee     float64 `json:"draftFee"`     // 稿费价格