Kaynağa Gözat

[20250512]财务结算

lin-jim-leon 1 gün önce
ebeveyn
işleme
32f42fdb3e

+ 317 - 103
db/finance.go

@@ -187,6 +187,22 @@ func GetTalentWithdrawPrevalue(ctx context.Context, request http_model.GetTalent
 	}, err
 }
 
+func GetWithDrawInfo(ctx context.Context, request http_model.GetWithDrawInfoRequest) (*http_model.WithDrawInfoResponse, error) {
+	db := GetReadDB(ctx)
+	var withdrawinfo gorm_model.YounggeeWithdrawRecord
+	fmt.Println(request.Withdrawid)
+	err := db.Model(gorm_model.YounggeeWithdrawRecord{}).Where("withdraw_id = ?", request.Withdrawid).Find(&withdrawinfo).Error
+	if err != nil {
+		return nil, err
+	}
+	res := &http_model.WithDrawInfoResponse{
+		Operator:       withdrawinfo.Name,
+		WithdrawAmount: withdrawinfo.WithdrawAmount,
+		AmountPayable:  withdrawinfo.AmountPayable,
+	}
+	return res, nil
+}
+
 func GetWithdrawValue(ctx context.Context, request http_model.GetWithdrawValueRequest) (*http_model.ALlWithdrawValue, error) {
 	var withdrawvalue float64
 	db := GetReadDB(ctx)
@@ -311,7 +327,7 @@ func RefuseRecharge(ctx context.Context, req http_model.RefuseRechargeRequest) (
 	db := GetReadDB(ctx)
 	err := db.Model(gorm_model.YounggeeRechargeRecord{}).Where("recharge_id=?", req.Id).Updates(map[string]interface{}{"status": 3, "refuse_at": time.Now(), "fail_reason": req.FailReason}).Error
 	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Recharge service] call AcceptRecharge error,err:%+v", err)
+		logrus.WithContext(ctx).Errorf("[Recharge service] call RefuseRecharge error,err:%+v", err)
 		return nil, err
 	}
 	res := &http_model.RefuseRechargeData{
@@ -320,6 +336,41 @@ func RefuseRecharge(ctx context.Context, req http_model.RefuseRechargeRequest) (
 	return res, nil
 
 }
+
+func GetRechargeInfo(ctx context.Context, req http_model.GetRechargeInfoRequest) (*http_model.RechargeInfoResponse, error) {
+	db := GetReadDB(ctx)
+	var rechargeinfo gorm_model.YounggeeRechargeRecord
+	err := db.Model(gorm_model.YounggeeRechargeRecord{}).Where("recharge_id = ?", req.RechargeId).First(&rechargeinfo).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Recharge service] call GetRechargeInfo error,err:%+v", err)
+		return nil, err
+	}
+	var operator string
+	enterprise := gorm_model.Enterprise{}
+	result := db.Where(gorm_model.Enterprise{EnterpriseID: rechargeinfo.EnterpriseID}).First(&enterprise)
+	if result.Error != nil {
+		logrus.WithContext(ctx).Errorf("[Recharge service] call Enterprise error,err:%+v", err)
+		return nil, result.Error
+	}
+	if rechargeinfo.SubAccountID != 0 {
+		subaccountinfo := gorm_model.YounggeeSubAccount{}
+		userResult := db.Where(gorm_model.YounggeeSubAccount{SubAccountId: rechargeinfo.SubAccountID, SubAccountType: 1}).First(&subaccountinfo)
+		if userResult.Error != nil {
+			logrus.WithContext(ctx).Errorf("[Recharge service] call YounggeeSubAccount error,err:%+v", err)
+			return nil, userResult.Error
+		}
+		operator = subaccountinfo.SubAccountName
+	} else {
+		operator = enterprise.BusinessName
+	}
+	res := &http_model.RechargeInfoResponse{
+		RechargeAmount: rechargeinfo.RechargeAmount,
+		Operator:       operator,
+		MainAccount:    enterprise.BusinessName,
+	}
+	return res, nil
+}
+
 func GetPreRechargeList(ctx context.Context, req http_model.GetPreRechargeListRequest) (*http_model.PreRechargeListData, error) {
 	db := GetReadDB(ctx)
 
@@ -336,15 +387,9 @@ func GetPreRechargeList(ctx context.Context, req http_model.GetPreRechargeListRe
 	var prerechargelist []gorm_model.YounggeeRechargeRecord
 	var total int64
 
-	// 计算总记录数
-	err := db.Model(gorm_model.YounggeeRechargeRecord{}).Where("status = ?", req.Status).Count(&total).Error
-	if err != nil {
-		return &http_model.PreRechargeListData{}, err
-	}
-
-	// 查询当前页的数据
-	err = db.Model(gorm_model.YounggeeRechargeRecord{}).
-		Where("status = 1").
+	// 先查询当前页的数据,不考虑 "Others" 筛选条件
+	err := db.Model(gorm_model.YounggeeRechargeRecord{}).
+		Where("status = ?", req.Status).
 		Offset((page - 1) * pageSize). // 计算偏移量
 		Limit(pageSize).               // 设置每页限制
 		Find(&prerechargelist).Error
@@ -352,29 +397,76 @@ func GetPreRechargeList(ctx context.Context, req http_model.GetPreRechargeListRe
 		return &http_model.PreRechargeListData{}, err
 	}
 
-	rechargePointers := make([]*http_model.PreRechargeListResponse, 0, len(prerechargelist))
+	// 在查询到的数据上进行筛选 (比如 "Others" 筛选条件)
+	filteredList := make([]gorm_model.YounggeeRechargeRecord, 0)
 	for _, recharge := range prerechargelist {
-		subaccountinfo := gorm_model.YounggeeSubAccount{}
-		userResult := db.Where(gorm_model.YounggeeSubAccount{SubAccountId: recharge.SubAccountID, SubAccountType: 1}).First(&subaccountinfo)
-		if userResult.Error != nil {
-			return nil, userResult.Error
+		var operator string
+		enterprise := gorm_model.Enterprise{}
+		result := db.Where(gorm_model.Enterprise{EnterpriseID: recharge.EnterpriseID}).First(&enterprise)
+		if result.Error != nil {
+			logrus.WithContext(ctx).Errorf("[Recharge service] call Enterprise error,err:%+v", err)
+			return nil, result.Error
+		}
+		if recharge.SubAccountID != 0 {
+			subaccountinfo := gorm_model.YounggeeSubAccount{}
+			userResult := db.Where(gorm_model.YounggeeSubAccount{SubAccountId: recharge.SubAccountID, SubAccountType: 1}).First(&subaccountinfo)
+			if userResult.Error != nil {
+				logrus.WithContext(ctx).Errorf("[Recharge service] call YounggeeSubAccount error,err:%+v", err)
+				return nil, userResult.Error
+			}
+			operator = subaccountinfo.SubAccountName
+		} else {
+			operator = enterprise.BusinessName
+		}
+
+		// 进行 "Others" 筛选条件
+		if req.Others != "" {
+			if operator != req.Others && req.Others != recharge.RechargeID {
+				continue
+			}
 		}
+
+		// 满足筛选条件的记录添加到 filteredList
+		filteredList = append(filteredList, recharge)
+	}
+
+	// 计算筛选后的总记录数
+	total = int64(len(filteredList))
+
+	// 构建返回结果
+	rechargePointers := make([]*http_model.PreRechargeListResponse, 0, len(filteredList))
+	for _, recharge := range filteredList {
+		var operator string
 		enterprise := gorm_model.Enterprise{}
 		result := db.Where(gorm_model.Enterprise{EnterpriseID: recharge.EnterpriseID}).First(&enterprise)
 		if result.Error != nil {
+			logrus.WithContext(ctx).Errorf("[Recharge service] call Enterprise error,err:%+v", err)
 			return nil, result.Error
 		}
+		if recharge.SubAccountID != 0 {
+			subaccountinfo := gorm_model.YounggeeSubAccount{}
+			userResult := db.Where(gorm_model.YounggeeSubAccount{SubAccountId: recharge.SubAccountID, SubAccountType: 1}).First(&subaccountinfo)
+			if userResult.Error != nil {
+				logrus.WithContext(ctx).Errorf("[Recharge service] call YounggeeSubAccount error,err:%+v", err)
+				return nil, userResult.Error
+			}
+			operator = subaccountinfo.SubAccountName
+		} else {
+			operator = enterprise.BusinessName
+		}
+
+		// 构建返回响应数据
 		response := &http_model.PreRechargeListResponse{
 			ID:                 recharge.RechargeID,
 			EnterPrise:         enterprise.BusinessName,
-			Operator:           subaccountinfo.SubAccountName,
+			Operator:           operator,
 			RechargeAmount:     recharge.RechargeAmount,
 			RechargeMethod:     recharge.RechargeMethod,
 			TransferVoucherUrl: recharge.TransferVoucherUrl,
 			Phone:              recharge.Phone,
-			CommitAt:           recharge.CommitAt,
-			ConfirmAt:          recharge.ConfirmAt,
-			RefuseAt:           recharge.RefuseAt,
+			CommitAt:           recharge.CommitAt.Format("2006-01-02 15:04:05"),
+			ConfirmAt:          recharge.ConfirmAt.Format("2006-01-02 15:04:05"),
+			RefuseAt:           recharge.RefuseAt.Format("2006-01-02 15:04:05"),
 			FailReason:         recharge.FailReason,
 		}
 		rechargePointers = append(rechargePointers, response)
@@ -382,37 +474,110 @@ func GetPreRechargeList(ctx context.Context, req http_model.GetPreRechargeListRe
 
 	return &http_model.PreRechargeListData{
 		PreRechargeListinfo: rechargePointers,
-		Total:               total,
+		Total:               total, // 返回筛选后的总记录数
 	}, nil
 }
 
-func GetTalentWithdrawList(ctx context.Context, req *http_model.GetTalentWithdrawListRequest) (*http_model.TalentWithdrawListData, error) {
+func GetRechargenums(db *gorm.DB, status int) (int64, error) {
+	query := db.Model(&gorm_model.YounggeeRechargeRecord{}).Where("status = ?", status)
+
+	// 计算总数
+	var total int64
+	if err := query.Count(&total).Error; err != nil {
+		return 0, err
+	}
+	return total, nil
+}
+
+func GetRechargeCount(ctx context.Context) (*http_model.RechargeCountResponse, error) {
 	db := GetReadDB(ctx)
-	page := req.PageNum
-	pageSize := req.PageSize
-	if page < 1 {
-		page = 1
+	pre, _ := GetRechargenums(db, 1)
+	ing, _ := GetRechargenums(db, 2)
+	ed, _ := GetRechargenums(db, 3)
+	res := &http_model.RechargeCountResponse{
+		PreRechargeNums: pre,
+		RechargeNums:    ing,
+		FailNums:        ed,
 	}
-	if pageSize < 1 {
-		pageSize = 10 // 设置默认每页记录数为 10
+	return res, nil
+}
+
+func GetWithdrawnums(db *gorm.DB, status int) (int64, error) {
+	query := db.Model(&gorm_model.YounggeeWithdrawRecord{}).Where("status = ?", status)
+
+	// 计算总数
+	var total int64
+	if err := query.Count(&total).Error; err != nil {
+		return 0, err
 	}
+	return total, nil
+}
+
+func GetWithdrawCount(ctx context.Context) (*http_model.WithdrawCountResponse, error) {
+	db := GetReadDB(ctx)
+	pre, _ := GetWithdrawnums(db, 1)
+	ing, _ := GetWithdrawnums(db, 2)
+	ed, _ := GetWithdrawnums(db, 3)
+	res := &http_model.WithdrawCountResponse{
+		PreWithdrawNums: pre,
+		WithdrawNums:    ing,
+		FailNums:        ed,
+	}
+	return res, nil
+}
+
+func GetTalentWithdrawList(ctx context.Context, req *http_model.GetTalentWithdrawListRequest) (*http_model.TalentWithdrawListData, error) {
+	db := GetReadDB(ctx)
+	pageSize := req.PageSize
 
 	var withdrawlist []gorm_model.YounggeeWithdrawRecord
 	var total int64
 
 	// 计算总记录数
-	err := db.Model(gorm_model.YounggeeWithdrawRecord{}).Where("status = ?", req.Status).Count(&total).Error
-	if err != nil {
-		return &http_model.TalentWithdrawListData{}, err
+	query := db.Model(gorm_model.YounggeeWithdrawRecord{}).Where("status = ?", req.Status)
+	if req.Others != "" {
+		query = query.Where("withdraw_id LIKE ? OR Name LIKE ?", "%"+req.Others+"%", "%"+req.Others+"%")
+	}
+	// 添加 during 条件(时间范围筛选)
+	if req.During != "" {
+		// 解析 during 参数为时间
+		startTime, err := time.Parse("2006-01-02", req.During)
+		if err != nil {
+			return nil, fmt.Errorf("invalid during format, expected 'YYYY-MM-DD'")
+		}
+		endTime := startTime.Add(24 * time.Hour).Add(-1 * time.Second) // 当天的 23:59:59
+
+		// 添加时间范围条件
+		var timeField string
+		switch req.Status {
+		case 1:
+			timeField = "submit_at"
+		case 2:
+			timeField = "withdraw_at"
+		case 3:
+			timeField = "reject_at"
+		}
+		query = query.Where(
+			fmt.Sprintf("%s BETWEEN ? AND ?", timeField), // 字段名安全拼接
+			startTime,
+			endTime,
+		)
+	}
+	if err := query.Count(&total).Error; err != nil {
+		return nil, err
 	}
 
-	// 查询当前页的数据
-	err = db.Model(gorm_model.YounggeeWithdrawRecord{}).
-		Offset((page - 1) * pageSize). // 计算偏移量
-		Limit(pageSize).               // 设置每页限制
-		Find(&withdrawlist).Error
-	if err != nil {
-		return &http_model.TalentWithdrawListData{}, err
+	// 添加分页逻辑
+	if pageSize == 0 {
+		pageSize = 10
+	}
+	pageNum := req.PageNum
+	if pageNum == 0 {
+		pageNum = 1
+	}
+	offset := (pageNum - 1) * pageSize
+	if err := query.Offset(offset).Limit(pageSize).Find(&withdrawlist).Error; err != nil {
+		return nil, err
 	}
 
 	withdrawPointers := make([]*http_model.TalentWithdrawListResponse, 0, len(withdrawlist))
@@ -422,9 +587,9 @@ func GetTalentWithdrawList(ctx context.Context, req *http_model.GetTalentWithdra
 			TalentId:       withdraw.TalentID,
 			WithdrawAmount: withdraw.WithdrawAmount,
 			ActualAmount:   withdraw.AmountPayable,
-			ReajectAt:      withdraw.RejectAt,
-			SubmitAt:       withdraw.SubmitAt,
-			WithdrawAt:     withdraw.WithdrawAt,
+			ReajectAt:      withdraw.RejectAt.Format("2006-01-02 15:04:05"),
+			SubmitAt:       withdraw.SubmitAt.Format("2006-01-02 15:04:05"),
+			WithdrawAt:     withdraw.WithdrawAt.Format("2006-01-02 15:04:05"),
 			RejectReason:   withdraw.RejectReason,
 			Name:           withdraw.Name,
 			PhoneNumber:    withdraw.PhoneNum,
@@ -439,77 +604,126 @@ func GetTalentWithdrawList(ctx context.Context, req *http_model.GetTalentWithdra
 		Total:              total,
 	}, nil
 }
-func ConfirmWithdrawal(ctx context.Context, withdrawId string) error {
-	db := GetReadDB(ctx)
-	db2 := GetReadDB(ctx)
-	withdrawInfo := gorm_model.YounggeeWithdrawRecord{}
-	db = db.Debug().Model(gorm_model.YounggeeWithdrawRecord{}).Where("withdraw_id = ?", withdrawId).Find(&withdrawInfo)
-	db2.Debug().Where("withdraw_id = ?", withdrawId).Updates(gorm_model.YounggeeWithdrawRecord{Status: 2, WithdrawAt: time.Now()})
-
-	IncomeIdLists := strings.Split(withdrawInfo.IncomeIdList, ",")
-	for _, income := range IncomeIdLists {
-		var incomeinfo gorm_model.YounggeeTalentIncome
-		err := db.Debug().Model(gorm_model.YounggeeTalentIncome{}).
-			Where("id = ?", income).
-			First(&incomeinfo).Error // 使用 First 而不是 Updates 来查询数据
-		if err != nil {
-			logrus.WithContext(ctx).Errorf("[finance db] Query YounggeeTalentIncome error, err:%+v", err)
-			return err
+
+func ConfirmWithdrawal(ctx context.Context, withdrawIdsStr string) (*http_model.ConfirmWithdrawalResponse, error) {
+	// 分割 withdrawId 列表
+	withdrawIds := strings.Split(withdrawIdsStr, ",")
+	res := http_model.ConfirmWithdrawalResponse{
+		WithdrawId: withdrawIdsStr,
+	}
+	if len(withdrawIds) == 0 {
+		return &res, fmt.Errorf("empty withdrawIds list")
+	}
+
+	db := GetReadDB(ctx) // 使用统一的 DB 实例
+
+	// 开启事务
+	return &res, db.Transaction(func(tx *gorm.DB) error {
+		// 1. 批量更新提现记录状态
+		if err := tx.Model(&gorm_model.YounggeeWithdrawRecord{}).
+			Where("withdraw_id IN (?)", withdrawIds).
+			Updates(map[string]interface{}{
+				"status":      2,
+				"withdraw_at": time.Now(),
+			}).Error; err != nil {
+			return fmt.Errorf("批量更新提现记录失败: %v", err)
 		}
-		err = db.Model(gorm_model.YounggeeTalentIncome{}).Where("id = ?", income).Updates(gorm_model.YounggeeTalentIncome{WithdrawStatus: 1}).Error
-		if err != nil {
-			logrus.WithContext(ctx).Errorf("[finance db] Updates YounggeeTalentIncome error, err:%+v", err)
-			return err
+
+		// 2. 获取所有提现记录的 IncomeIdList(保留重复项)
+		var withdrawRecords []gorm_model.YounggeeWithdrawRecord
+		if err := tx.Where("withdraw_id IN (?)", withdrawIds).
+			Find(&withdrawRecords).Error; err != nil {
+			return fmt.Errorf("查询提现记录失败: %v", err)
 		}
-		switch incomeinfo.Type {
-		case 1:
-			{
-				err = db.Debug().Model(gorm_model.YounggeeSecTaskInfo{}).Where("task_id = ?", incomeinfo.SectaskID).Updates(gorm_model.YounggeeSecTaskInfo{WithdrawStatus: 4}).Error
-				if err != nil {
-					logrus.WithContext(ctx).Errorf("[finance db] Updates YounggeeSecTaskInfo error, err:%+v", err)
-					return err
-				}
+
+		// 3. 收集所有 IncomeId(包含重复项)
+		var rawIncomeIds []string
+		talentAmountMap := make(map[string]float64) // talentID -> 总提现金额
+		for _, record := range withdrawRecords {
+			// 按原始顺序保留所有 IncomeId(含重复)
+			ids := strings.Split(record.IncomeIdList, ",")
+			rawIncomeIds = append(rawIncomeIds, ids...)
+			// 累加提现金额
+			talentAmountMap[record.TalentID] += record.WithdrawAmount
+		}
+
+		// 4. 更新所有 Income 记录状态(含重复项)
+		if len(rawIncomeIds) > 0 {
+			if err := tx.Model(&gorm_model.YounggeeTalentIncome{}).
+				Where("id IN (?)", rawIncomeIds).
+				Update("withdraw_status", 1).Error; err != nil {
+				return fmt.Errorf("更新收入状态失败: %v", err)
 			}
-		case 2:
-			{
-				err = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", incomeinfo.TaskID).Updates(gorm_model.YoungeeTaskInfo{WithdrawStatus: 4}).Error
-				if err != nil {
-					logrus.WithContext(ctx).Errorf("[finance db] Updates YoungeeTaskInfo error, err:%+v", err)
-					return err
-				}
+		}
+
+		// 5. 查询所有 Income 记录详情(含重复项)
+		var incomeList []gorm_model.YounggeeTalentIncome
+		if err := tx.Where("id IN (?)", rawIncomeIds).
+			Find(&incomeList).Error; err != nil {
+			return fmt.Errorf("查询收入详情失败: %v", err)
+		}
+
+		// 6. 按类型收集所有任务ID(含重复项)
+		type TaskRef struct {
+			Type    int
+			TaskIDs []string
+		}
+		var taskRefs []TaskRef
+		for _, income := range incomeList {
+			var taskID string
+			switch income.Type {
+			case 1:
+				taskID = income.SectaskID
+			case 2:
+				taskID = income.TaskID
+			case 3:
+				taskID = income.LocalTaskId
+			default:
+				continue
 			}
-		case 3:
-			{
-				err = db.Debug().Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id = ?", incomeinfo.LocalTaskId).Updates(gorm_model.YoungeeLocalTaskInfo{WithdrawStatus: 4}).Error
-				if err != nil {
-					logrus.WithContext(ctx).Errorf("[finance db] Updates YoungeeLocalTaskInfo error, err:%+v", err)
-					return err
-				}
+			// 允许重复的 TaskID
+			taskRefs = append(taskRefs, TaskRef{
+				Type:    income.Type,
+				TaskIDs: []string{taskID},
+			})
+		}
+
+		// 7. 批量更新任务状态(允许重复更新)
+		for _, ref := range taskRefs {
+			var model interface{}
+			switch ref.Type {
+			case 1:
+				model = &gorm_model.YounggeeSecTaskInfo{}
+			case 2:
+				model = &gorm_model.YoungeeTaskInfo{}
+			case 3:
+				model = &gorm_model.YoungeeLocalTaskInfo{}
+			default:
+				continue
+			}
+			if err := tx.Model(model).
+				Where("task_id IN (?)", ref.TaskIDs).
+				Update("withdraw_status", 4).Error; err != nil {
+				return fmt.Errorf("更新任务状态失败: %v", err)
 			}
 		}
 
-	}
-	//for _, taskId := range taskIdLists {
-	//	db1 := GetReadDB(ctx)
-	//	err := db1.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(gorm_model.YoungeeTaskInfo{WithdrawStatus: 4}).Error
-	//	if err != nil {
-	//		logrus.WithContext(ctx).Errorf("[finance db] Update YoungeeTaskInfo error,err:%+v", err)
-	//		return err
-	//	}
-	//
-	//	err = CreateMessageByTaskId(ctx, 6, 1, taskId)
-	//	if err != nil {
-	//		logrus.WithContext(ctx).Errorf("[ConfirmWithdrawal] call CreateMessageByTaskId error,err:%+v", err)
-	//		return err
-	//	}
-	//}
-	db3 := GetReadDB(ctx)
-	db3.Debug().Model(gorm_model.YoungeeTalentInfo{}).Where("id = ?", withdrawInfo.TalentID).Updates(
-		map[string]interface{}{
-			"withdrawing": gorm.Expr("withdrawing - ?", withdrawInfo.WithdrawAmount),
-			"withdrawed":  gorm.Expr("withdrawed + ?", withdrawInfo.WithdrawAmount)})
-	return nil
+		// 8. 更新人才账户金额
+		for talentID, amount := range talentAmountMap {
+			if err := tx.Model(&gorm_model.YoungeeTalentInfo{}).
+				Where("id = ?", talentID).
+				Updates(map[string]interface{}{
+					"withdrawing": gorm.Expr("withdrawing - ?", amount),
+					"withdrawed":  gorm.Expr("withdrawed + ?", amount),
+				}).Error; err != nil {
+				return fmt.Errorf("更新人才账户失败: %v", err)
+			}
+		}
+
+		return nil
+	})
 }
+
 func RefuseTalentWithdrawal(ctx context.Context, req *http_model.RefuseTalentWithdrawalRequest) error {
 	db := GetReadDB(ctx)
 

+ 34 - 0
db/talent.go

@@ -6,6 +6,7 @@ import (
 	"github.com/caixw/lib.go/conv"
 	"github.com/sirupsen/logrus"
 	"gorm.io/gorm"
+	"strings"
 	"youngee_m_api/consts"
 	"youngee_m_api/model/gorm_model"
 	"youngee_m_api/model/http_model"
@@ -219,3 +220,36 @@ func UpdateKuaishouUserInfoById(ctx context.Context, talentInfo gorm_model.Platf
 	}
 	return err
 }
+
+func GetProvince(ctx context.Context, request http_model.GetProviceRequest) (*http_model.GetProviceResponse, error) {
+	db := GetReadDB(ctx)
+	var userInfo []gorm_model.PlatformKuaishouUserInfo
+	// 从数据库中获取所有 city 字段的数据
+	err := db.Model(&gorm_model.PlatformKuaishouUserInfo{}).Pluck("city", &userInfo).Error
+	if err != nil {
+		return nil, err
+	}
+
+	// 使用 map 来去重省份
+	provinceMap := make(map[string]struct{})
+	for _, user := range userInfo {
+		if user.City != "" {
+			// 按照空格分割 city 字段,取第一个部分作为省份
+			cityParts := strings.Split(user.City, " ")
+			if len(cityParts) > 0 {
+				provinceMap[cityParts[0]] = struct{}{} // 使用空结构体来去重
+			}
+		}
+	}
+
+	// 将 map 中的省份名称放入切片
+	var provinces []string
+	for province := range provinceMap {
+		provinces = append(provinces, province)
+	}
+
+	// 返回省份列表
+	return &http_model.GetProviceResponse{
+		Provices: provinces,
+	}, nil
+}

+ 57 - 55
handler/ConfirmWithdrawal.go

@@ -1,55 +1,57 @@
-package handler
-
-import (
-	"github.com/gin-gonic/gin"
-	"github.com/sirupsen/logrus"
-	"youngee_m_api/consts"
-	"youngee_m_api/db"
-	"youngee_m_api/model/http_model"
-	"youngee_m_api/util"
-)
-
-func WrapConfirmWithdrawalHandler(ctx *gin.Context) {
-	handler := newConfirmWithdrawalHandler(ctx)
-	BaseRun(handler)
-}
-
-type ConfirmWithdrawalHandler struct {
-	ctx  *gin.Context
-	req  *http_model.ConfirmWithdrawalRequest
-	resp *http_model.CommonResponse
-}
-
-func (c ConfirmWithdrawalHandler) getContext() *gin.Context {
-	return c.ctx
-}
-
-func (c ConfirmWithdrawalHandler) getResponse() interface{} {
-	return c.resp
-}
-
-func (c ConfirmWithdrawalHandler) getRequest() interface{} {
-	return c.req
-}
-
-func (c ConfirmWithdrawalHandler) run() {
-	err := db.ConfirmWithdrawal(c.ctx, c.req.WithdrawId)
-	if err != nil {
-		logrus.WithContext(c.ctx).Errorf("[ConfirmWithdrawalHandler] error ConfirmWithdrawal, err:%+v", err)
-		util.HandlerPackErrorResp(c.resp, consts.ErrorInternal, consts.DefaultToast)
-		return
-	}
-	c.resp.Message = "确认提现成功"
-}
-
-func (c ConfirmWithdrawalHandler) checkParam() error {
-	return nil
-}
-
-func newConfirmWithdrawalHandler(ctx *gin.Context) *ConfirmWithdrawalHandler {
-	return &ConfirmWithdrawalHandler{
-		ctx:  ctx,
-		req:  http_model.NewConfirmWithdrawalRequest(),
-		resp: http_model.NewConfirmWithdrawalResponse(),
-	}
-}
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_m_api/consts"
+	"youngee_m_api/db"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/util"
+)
+
+func WrapConfirmWithdrawalHandler(ctx *gin.Context) {
+	handler := newConfirmWithdrawalHandler(ctx)
+	BaseRun(handler)
+}
+
+type ConfirmWithdrawalHandler struct {
+	ctx  *gin.Context
+	req  *http_model.ConfirmWithdrawalRequest
+	resp *http_model.CommonResponse
+}
+
+func (c ConfirmWithdrawalHandler) getContext() *gin.Context {
+	return c.ctx
+}
+
+func (c ConfirmWithdrawalHandler) getResponse() interface{} {
+	return c.resp
+}
+
+func (c ConfirmWithdrawalHandler) getRequest() interface{} {
+	return c.req
+}
+
+func (c ConfirmWithdrawalHandler) run() {
+	res, err := db.ConfirmWithdrawal(c.ctx, c.req.WithdrawId)
+	if err != nil {
+		logrus.WithContext(c.ctx).Errorf("[ConfirmWithdrawalHandler] error ConfirmWithdrawal, err:%+v", err)
+		util.HandlerPackErrorResp(c.resp, consts.ErrorInternal, consts.DefaultToast)
+		return
+	}
+	c.resp.Message = "确认提现成功"
+	c.resp.Data = res
+	c.resp.Status = consts.ErrorSuccess
+}
+
+func (c ConfirmWithdrawalHandler) checkParam() error {
+	return nil
+}
+
+func newConfirmWithdrawalHandler(ctx *gin.Context) *ConfirmWithdrawalHandler {
+	return &ConfirmWithdrawalHandler{
+		ctx:  ctx,
+		req:  http_model.NewConfirmWithdrawalRequest(),
+		resp: http_model.NewConfirmWithdrawalResponse(),
+	}
+}

+ 1 - 0
handler/RefuseTalentWithdraw.go

@@ -40,6 +40,7 @@ func (c RefuseTalentWithdrawalHandler) run() {
 		return
 	}
 	c.resp.Message = "驳回提现成功"
+	c.resp.Status = consts.ErrorSuccess
 }
 
 func (c RefuseTalentWithdrawalHandler) checkParam() error {

+ 1 - 1
handler/getprerechargelist.go

@@ -42,7 +42,7 @@ func (c GetPreRechargeList) run() {
 		logrus.Info("GetPreRechargeList fail,req:%+v", c.req)
 		return
 	}
-	c.resp.Message = "成功查询充值待确认列表"
+	c.resp.Message = "成功查询充值列表"
 	c.resp.Data = res
 	c.resp.Status = consts.ErrorSuccess
 }

+ 60 - 0
handler/getprovince.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_m_api/consts"
+	"youngee_m_api/db"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/util"
+)
+
+func WrapGetProviceHandler(ctx *gin.Context) {
+	handler := newGetProviceHandler(ctx)
+	BaseRun(handler)
+}
+
+type GetProvice struct {
+	ctx  *gin.Context
+	req  *http_model.GetProviceRequest
+	resp *http_model.CommonResponse
+}
+
+func (c GetProvice) getContext() *gin.Context {
+	return c.ctx
+}
+
+func (c GetProvice) getResponse() interface{} {
+	return c.resp
+}
+
+func (c GetProvice) getRequest() interface{} {
+	return c.req
+}
+
+func (c GetProvice) run() {
+	data := http_model.GetProviceRequest{}
+	data = *c.req
+	res, err := db.GetProvince(c.ctx, data)
+	if err != nil {
+		logrus.Errorf("[GetProvice] call GetProvice err:%+v\n", err)
+		util.HandlerPackErrorResp(c.resp, consts.ErrorInternal, "")
+		logrus.Info("GetProvice fail,req:%+v", c.req)
+		return
+	}
+	c.resp.Message = "成功查询达人省份"
+	c.resp.Data = res
+	c.resp.Status = consts.ErrorSuccess
+}
+
+func (c GetProvice) checkParam() error {
+	return nil
+}
+
+func newGetProviceHandler(ctx *gin.Context) *GetProvice {
+	return &GetProvice{
+		ctx:  ctx,
+		req:  http_model.NewGetProviceRequest(),
+		resp: http_model.NewGetProviceResponse(),
+	}
+}

+ 57 - 0
handler/getrechargecount.go

@@ -0,0 +1,57 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_m_api/consts"
+	"youngee_m_api/db"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/util"
+)
+
+func WrapGetRechargeCountHandler(ctx *gin.Context) {
+	handler := newGetRechargeCountHandler(ctx)
+	BaseRun(handler)
+}
+
+type GetRechargeCountHandler struct {
+	ctx  *gin.Context
+	req  *http_model.GetRechargeCountRequest
+	resp *http_model.CommonResponse
+}
+
+func (g GetRechargeCountHandler) getContext() *gin.Context {
+	return g.ctx
+}
+
+func (g GetRechargeCountHandler) getResponse() interface{} {
+	return g.resp
+}
+
+func (g GetRechargeCountHandler) getRequest() interface{} {
+	return g.req
+}
+
+func (g GetRechargeCountHandler) run() {
+	data, err := db.GetRechargeCount(g.ctx)
+	if err != nil {
+		logrus.WithContext(g.ctx).Errorf("[GetRechargeCountHandler] error GetRechargeCount, err:%+v", err)
+		util.HandlerPackErrorResp(g.resp, consts.ErrorInternal, consts.DefaultToast)
+		return
+	}
+	g.resp.Data = data
+	g.resp.Status = consts.ErrorSuccess
+	g.resp.Message = "成功查询"
+}
+
+func (g GetRechargeCountHandler) checkParam() error {
+	return nil
+}
+
+func newGetRechargeCountHandler(ctx *gin.Context) *GetRechargeCountHandler {
+	return &GetRechargeCountHandler{
+		ctx:  ctx,
+		req:  http_model.NewGetRechargeCountRequest(),
+		resp: http_model.NewGetRechargeCountResponse(),
+	}
+}

+ 57 - 0
handler/getrechargeinfo.go

@@ -0,0 +1,57 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_m_api/consts"
+	"youngee_m_api/db"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/util"
+)
+
+func WrapGetRechargeInfoHandler(ctx *gin.Context) {
+	handler := newGetRechargeInfoHandler(ctx)
+	BaseRun(handler)
+}
+
+type GetRechargeInfoHandler struct {
+	ctx  *gin.Context
+	req  *http_model.GetRechargeInfoRequest
+	resp *http_model.CommonResponse
+}
+
+func (g GetRechargeInfoHandler) getContext() *gin.Context {
+	return g.ctx
+}
+
+func (g GetRechargeInfoHandler) getResponse() interface{} {
+	return g.resp
+}
+
+func (g GetRechargeInfoHandler) getRequest() interface{} {
+	return g.req
+}
+
+func (g GetRechargeInfoHandler) run() {
+	req := g.req
+	data, err := db.GetRechargeInfo(g.ctx, *req)
+	if err != nil {
+		logrus.WithContext(g.ctx).Errorf("[GetRechargeInfoHandler] error GetRechargeInfo, err:%+v", err)
+		util.HandlerPackErrorResp(g.resp, consts.ErrorInternal, consts.DefaultToast)
+		return
+	}
+	g.resp.Data = data
+	g.resp.Status = consts.ErrorSuccess
+}
+
+func (g GetRechargeInfoHandler) checkParam() error {
+	return nil
+}
+
+func newGetRechargeInfoHandler(ctx *gin.Context) *GetRechargeInfoHandler {
+	return &GetRechargeInfoHandler{
+		ctx:  ctx,
+		req:  http_model.NewGetRechargeInfoRequest(),
+		resp: http_model.NewGetRechargeInfoResponse(),
+	}
+}

+ 1 - 0
handler/getrechargevalue.go

@@ -42,6 +42,7 @@ func (g GetRechargeValueHandler) run() {
 	}
 	g.resp.Data = data
 	g.resp.Status = consts.ErrorSuccess
+	g.resp.Message = "成功查询"
 }
 
 func (g GetRechargeValueHandler) checkParam() error {

+ 1 - 0
handler/gettalentwithdrawlist.go

@@ -43,6 +43,7 @@ func (c GetTalentWithdrawList) run() {
 	}
 	c.resp.Message = "成功查询开票列表"
 	c.resp.Data = res
+	c.resp.Status = consts.ErrorSuccess
 }
 
 func (c GetTalentWithdrawList) checkParam() error {

+ 57 - 0
handler/getwithdrawcount.go

@@ -0,0 +1,57 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_m_api/consts"
+	"youngee_m_api/db"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/util"
+)
+
+func WrapGetWithdrawCountHandler(ctx *gin.Context) {
+	handler := newGetWithdrawCountHandler(ctx)
+	BaseRun(handler)
+}
+
+type GetWithdrawCountHandler struct {
+	ctx  *gin.Context
+	req  *http_model.GetWithdrawCountRequest
+	resp *http_model.CommonResponse
+}
+
+func (g GetWithdrawCountHandler) getContext() *gin.Context {
+	return g.ctx
+}
+
+func (g GetWithdrawCountHandler) getResponse() interface{} {
+	return g.resp
+}
+
+func (g GetWithdrawCountHandler) getRequest() interface{} {
+	return g.req
+}
+
+func (g GetWithdrawCountHandler) run() {
+	data, err := db.GetWithdrawCount(g.ctx)
+	if err != nil {
+		logrus.WithContext(g.ctx).Errorf("[GetWithdrawCountHandler] error GetWithdrawCount, err:%+v", err)
+		util.HandlerPackErrorResp(g.resp, consts.ErrorInternal, consts.DefaultToast)
+		return
+	}
+	g.resp.Data = data
+	g.resp.Status = consts.ErrorSuccess
+	g.resp.Message = "成功查询"
+}
+
+func (g GetWithdrawCountHandler) checkParam() error {
+	return nil
+}
+
+func newGetWithdrawCountHandler(ctx *gin.Context) *GetWithdrawCountHandler {
+	return &GetWithdrawCountHandler{
+		ctx:  ctx,
+		req:  http_model.NewGetWithdrawCountRequest(),
+		resp: http_model.NewGetWithdrawCountResponse(),
+	}
+}

+ 60 - 0
handler/getwithdrawinfo.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"fmt"
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_m_api/consts"
+	"youngee_m_api/db"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/util"
+)
+
+func WrapGetWithDrawInfoHandler(ctx *gin.Context) {
+	handler := newGetWithDrawInfoHandler(ctx)
+	BaseRun(handler)
+}
+
+type GetWithDrawInfoHandler struct {
+	ctx  *gin.Context
+	req  *http_model.GetWithDrawInfoRequest
+	resp *http_model.CommonResponse
+}
+
+func (g GetWithDrawInfoHandler) getContext() *gin.Context {
+	return g.ctx
+}
+
+func (g GetWithDrawInfoHandler) getResponse() interface{} {
+	return g.resp
+}
+
+func (g GetWithDrawInfoHandler) getRequest() interface{} {
+	return g.req
+}
+
+func (g GetWithDrawInfoHandler) run() {
+	req := g.req
+	fmt.Println(req.Withdrawid)
+	data, err := db.GetWithDrawInfo(g.ctx, *req)
+	if err != nil {
+		logrus.WithContext(g.ctx).Errorf("[GetWithDrawInfoHandler] error GetWithDrawInfo, err:%+v", err)
+		util.HandlerPackErrorResp(g.resp, consts.ErrorInternal, consts.DefaultToast)
+		return
+	}
+	g.resp.Data = data
+	g.resp.Status = consts.ErrorSuccess
+	g.resp.Message = "成功查询"
+}
+
+func (g GetWithDrawInfoHandler) checkParam() error {
+	return nil
+}
+
+func newGetWithDrawInfoHandler(ctx *gin.Context) *GetWithDrawInfoHandler {
+	return &GetWithDrawInfoHandler{
+		ctx:  ctx,
+		req:  http_model.NewGetWithDrawInfoRequest(),
+		resp: http_model.NewGetWithDrawInfoResponse(),
+	}
+}

+ 1 - 0
model/gorm_model/rechargeRecord.go

@@ -20,6 +20,7 @@ type YounggeeRechargeRecord struct {
 	ConfirmAt          time.Time `gorm:"column:confirm_at"`                    // 充值确认时间
 	FailReason         string    `gorm:"column:fail_reason"`                   //失败原因
 	RefuseAt           time.Time `gorm:"column:refuse_at"`                     //失败时间
+	Operator           string    `gorm:"column:operator"`
 }
 
 func (m *YounggeeRechargeRecord) TableName() string {

+ 19 - 14
model/http_model/ConfirmWithdrawalRequest.go

@@ -1,14 +1,19 @@
-package http_model
-
-type ConfirmWithdrawalRequest struct {
-	WithdrawId string `json:"withdraw_id"`
-}
-
-func NewConfirmWithdrawalRequest() *ConfirmWithdrawalRequest {
-	return new(ConfirmWithdrawalRequest)
-}
-
-func NewConfirmWithdrawalResponse() *CommonResponse {
-	resp := new(CommonResponse)
-	return resp
-}
+package http_model
+
+type ConfirmWithdrawalRequest struct {
+	WithdrawId string `json:"withdraw_id"`
+}
+
+type ConfirmWithdrawalResponse struct {
+	WithdrawId string `json:"withdraw_id"`
+}
+
+func NewConfirmWithdrawalRequest() *ConfirmWithdrawalRequest {
+	return new(ConfirmWithdrawalRequest)
+}
+
+func NewConfirmWithdrawalResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(ConfirmWithdrawalResponse)
+	return resp
+}

+ 15 - 16
model/http_model/getprerechargelistrequest.go

@@ -1,25 +1,24 @@
 package http_model
 
-import "time"
-
 type GetPreRechargeListRequest struct {
-	PageSize int `json:"page_size"`
-	PageNum  int `json:"page_num"`
-	Status   int `json:"status"`
+	PageSize int    `json:"page_size"`
+	PageNum  int    `json:"page_num"`
+	Status   int    `json:"status"`
+	Others   string `json:"others,omitempty"`
 }
 
 type PreRechargeListResponse struct {
-	ID                 string    `json:"id"`
-	EnterPrise         string    `json:"enterprise"`
-	Operator           string    `json:"operator"`
-	RechargeAmount     float64   `json:"recharge_amount"`
-	RechargeMethod     int64     `json:"recharge_method"`
-	TransferVoucherUrl string    `json:"transfer_voucher_url"`
-	Phone              string    `json:"phone"`
-	CommitAt           time.Time `json:"commit_at"`
-	ConfirmAt          time.Time `json:"confirm_at"`
-	RefuseAt           time.Time `json:"Refuse_at"`
-	FailReason         string    `json:"fail_reason"`
+	ID                 string  `json:"id"`
+	EnterPrise         string  `json:"enterprise"`
+	Operator           string  `json:"operator"`
+	RechargeAmount     float64 `json:"recharge_amount"`
+	RechargeMethod     int64   `json:"recharge_method"`
+	TransferVoucherUrl string  `json:"transfer_voucher_url"`
+	Phone              string  `json:"phone"`
+	CommitAt           string  `json:"commit_at"`
+	ConfirmAt          string  `json:"confirm_at"`
+	RefuseAt           string  `json:"Refuse_at"`
+	FailReason         string  `json:"fail_reason"`
 }
 
 type PreRechargeListData struct {

+ 18 - 0
model/http_model/getprovincerequest.go

@@ -0,0 +1,18 @@
+package http_model
+
+type GetProviceRequest struct {
+}
+
+type GetProviceResponse struct {
+	Provices []string `json:"provinces"`
+}
+
+func NewGetProviceRequest() *GetProviceRequest {
+	return new(GetProviceRequest)
+}
+
+func NewGetProviceResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(GetProviceResponse)
+	return resp
+}

+ 19 - 0
model/http_model/getrechargecountrequest.go

@@ -0,0 +1,19 @@
+package http_model
+
+type GetRechargeCountRequest struct {
+}
+
+type RechargeCountResponse struct {
+	PreRechargeNums int64 `json:"prerecharge_nums"`
+	RechargeNums    int64 `json:"recharge_nums"`
+	FailNums        int64 `json:"fail_nums"`
+}
+
+func NewGetRechargeCountRequest() *GetRechargeCountRequest {
+	return new(GetRechargeCountRequest)
+}
+func NewGetRechargeCountResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(ReviewNums)
+	return resp
+}

+ 21 - 0
model/http_model/getrechargeinforequest.go

@@ -0,0 +1,21 @@
+package http_model
+
+type GetRechargeInfoRequest struct {
+	RechargeId string `json:"rechargeId"`
+}
+
+type RechargeInfoResponse struct {
+	RechargeAmount float64 `json:"recharge_amount"`
+	Operator       string  `json:"operator"`
+	MainAccount    string  `json:"main_account"`
+}
+
+func NewGetRechargeInfoRequest() *GetRechargeInfoRequest {
+	return new(GetRechargeInfoRequest)
+}
+
+func NewGetRechargeInfoResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(RechargeInfoResponse)
+	return resp
+}

+ 15 - 15
model/http_model/gettalentwithdrawlsitrequest.go

@@ -1,27 +1,27 @@
 package http_model
 
-import "time"
-
 type GetTalentWithdrawListRequest struct {
-	PageSize int `json:"page_size"`
-	PageNum  int `json:"page_num"`
-	Status   int `json:"status"`
+	PageSize int    `json:"page_size"`
+	PageNum  int    `json:"page_num"`
+	Status   int    `json:"status"`
+	Others   string `json:"others,omitempty"`
+	During   string `json:"during,omitempty"`
 }
 
 type TalentWithdrawListResponse struct {
 	WithdrawId string `json:"withdraw_id"`
 	TalentId   string `json:"talent_id"`
 	//TalentName     string    `json:"talent_name"`
-	WithdrawAmount float64   `json:"withdraw_amount"`
-	ActualAmount   float64   `json:"amount_payable"`
-	PhoneNumber    string    `json:"phone_number"`
-	ReajectAt      time.Time `json:"reject_at"`
-	SubmitAt       time.Time `json:"submit_at"`
-	WithdrawAt     time.Time `json:"withdraw_at"`
-	RejectReason   string    `json:"reject_reason"`
-	Name           string    `json:"name"`
-	IdcardNumber   string    `json:"idcard_number"`
-	BankNumber     string    `json:"bank_number"`
+	WithdrawAmount float64 `json:"withdraw_amount"`
+	ActualAmount   float64 `json:"amount_payable"`
+	PhoneNumber    string  `json:"phone_number"`
+	ReajectAt      string  `json:"reject_at"`
+	SubmitAt       string  `json:"submit_at"`
+	WithdrawAt     string  `json:"withdraw_at"`
+	RejectReason   string  `json:"reject_reason"`
+	Name           string  `json:"name"`
+	IdcardNumber   string  `json:"idcard_number"`
+	BankNumber     string  `json:"bank_number"`
 }
 
 type TalentWithdrawListData struct {

+ 19 - 0
model/http_model/getwithdrawcountrequest.go

@@ -0,0 +1,19 @@
+package http_model
+
+type GetWithdrawCountRequest struct {
+}
+
+type WithdrawCountResponse struct {
+	PreWithdrawNums int64 `json:"preWithdraw_nums"`
+	WithdrawNums    int64 `json:"Withdraw_nums"`
+	FailNums        int64 `json:"fail_nums"`
+}
+
+func NewGetWithdrawCountRequest() *GetWithdrawCountRequest {
+	return new(GetWithdrawCountRequest)
+}
+func NewGetWithdrawCountResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(ReviewNums)
+	return resp
+}

+ 21 - 0
model/http_model/getwithdrawrequest.go

@@ -0,0 +1,21 @@
+package http_model
+
+type GetWithDrawInfoRequest struct {
+	Withdrawid string `json:"withdraw_id"`
+}
+
+type WithDrawInfoResponse struct {
+	WithdrawAmount float64 `json:"withdraw_amount"`
+	Operator       string  `json:"operator"`
+	AmountPayable  float64 `json:"amount_payable"`
+}
+
+func NewGetWithDrawInfoRequest() *GetWithDrawInfoRequest {
+	return new(GetWithDrawInfoRequest)
+}
+
+func NewGetWithDrawInfoResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(WithDrawInfoResponse)
+	return resp
+}

+ 12 - 1
route/init.go

@@ -194,8 +194,10 @@ func InitRoute(r *gin.Engine) {
 	{
 		f.Use(middleware.LoginAuthMiddleware)
 
-		f.GET("/getRechargeValue", handler.WrapGetRechargeValueHandler)      //获取充值确认金额
+		f.GET("/getRechargeValue", handler.WrapGetRechargeValueHandler)      //获取充值金额
+		f.GET("/getrechargecount", handler.WrapGetRechargeCountHandler)      //列表角标
 		f.POST("/getPreRechargelist", handler.WrapGetPreRechargeListHandler) //充值待确认、确认、失败列表
+		f.POST("/getrechargeinfo", handler.WrapGetRechargeInfoHandler)       //充值确认信息
 		f.POST("/acceptraecharge", handler.WrapAcceptRechargeHandler)        //同意充值
 		f.POST("/refuseraecharge", handler.WrapRefuseRechargeHandler)        //充值失败
 
@@ -220,6 +222,8 @@ func InitRoute(r *gin.Engine) {
 		f.GET("/gettalentwithdrawValue", handler.WarpGetTalentWithdrawPrevalueHandler) //达人提现待确认
 		f.GET("/withdrawvalue", handler.WarpGetWithdrawValueHandler)                   //累计提现金额
 		f.POST("/getTalentWithdrawlist", handler.WrapGetTalentWithdrawListHandler)     //达人待/已提现、已驳回列表
+		f.POST("/getwithdrawinfo", handler.WrapGetWithDrawInfoHandler)                 //确认信息
+		f.GET("/getwithdrawcount", handler.WrapGetWithdrawCountHandler)                //列表角标
 
 		f.POST("/getInvoiveinfo", handler.WrapGetInvoiceInfoHandler) //查看开票信息
 		f.POST("/getbilllist", handler.WrapGetBillTaskListHandler)   //查看账单
@@ -427,4 +431,11 @@ func InitRoute(r *gin.Engine) {
 		n.POST("/serveratio", handler.WrapSetServeratioHandler)                  //设置服务费率
 		n.POST("/getserveratio", handler.WrapGetServeratioHandler)               //获取服务费率
 	}
+	//通用
+	common := r.Group("/youngee/m/common")
+	{
+		common.POST("/talent/province", handler.WrapGetProviceHandler)                  //获取达人省份
+		common.POST("/platform", controller.CommonController{}.CooperationPlatform)     // 获取合作平台icon
+		common.POST("/product/category", controller.CommonController{}.ProductCategory) // 获取商品类目
+	}
 }