zhangjidong 2 hari lalu
induk
melakukan
f7e86f3630

+ 2 - 2
controllers/services/SyncDataService.go

@@ -133,8 +133,8 @@ func (s *SyncDataService) SyncHomeData() (int, interface{}, error) {
 // 社区发展奖励
 func (s *SyncDataService) SyncCommunityReward() (int, interface{}, error) {
 	url := "https://app-api.aiceanglobal1.com/api/v1/reward/develop/home"
-	userid := "0716d0ad7eb6404682fcaf564379e4e8"
-	authorization := "Bearer 09ec48ab484ea7f8b4fb1d4b125dd73e"
+	userid := "04a0d628189644a1b918f14cde664610"
+	authorization := "Bearer b2234191b1122b3d11393289985f7472"
 	body := map[string]interface{}{}
 
 	// 1. 发起请求

+ 9 - 7
models/reward_develop_data.go

@@ -10,13 +10,15 @@ import (
 )
 
 type RewardDevelopData struct {
-	Id                  int    `orm:"column(id);auto" description:"社区发展奖励"`
-	UserId              string `orm:"column(user_id);size(0);null"`
-	InviteReward        string `orm:"column(invite_reward);size(255);null" description:"推荐总奖励"`
-	InviteRewardValue   string `orm:"column(invite_reward_value);size(255);null" description:"推荐总奖励价值"`
-	SmallReward         string `orm:"column(small_reward);size(255);null" description:"社区总奖励"`
-	SmallRewardValue    string `orm:"column(small_reward_value);size(255);null" description:"社区总奖励价值"`
-	TodayCommunitySales string `orm:"column(today_community_sales);size(255);null" description:"今日社区销售"`
+	Id                int    `orm:"column(id);auto" description:"社区发展奖励" json:"-"`
+	UserId            string `orm:"column(user_id);size(0);null" json:"user_id"`
+	InviteReward      string `orm:"column(invite_reward);size(255);null" description:"推荐总奖励" json:"invite_reward"`
+	InviteRewardValue string `orm:"column(invite_reward_value);size(255);null" description:"推荐总奖励价值" json:"invite_reward_value"`
+	SmallReward       string `orm:"column(small_reward);size(255);null" description:"社区总奖励" json:"small_reward"`
+	SmallRewardValue  string `orm:"column(small_reward_value);size(255);null" description:"社区总奖励价值" json:"small_reward_value"`
+
+	// 关键修复点:添加 json 标签
+	TodayCommunitySales string `orm:"column(today_community_sales);size(255);null" description:"今日社区销售" json:"today_community_sales"`
 }
 
 func (t *RewardDevelopData) TableName() string {

+ 10 - 10
models/reward_range_data.go

@@ -10,16 +10,16 @@ import (
 )
 
 type RewardRangeData struct {
-	Id                   int    `orm:"column(id);auto" description:"代理奖励列表"`
-	UserId               string `orm:"column(user_id);size(0);null"`
-	Sales                string `orm:"column(sales);size(255);null" description:"总累计业绩"`
-	PromoteName          string `orm:"column(promote_name);size(255);null" description:"级别"`
-	CommunityReward      string `orm:"column(community_reward);size(255);null" description:"累计奖励"`
-	CommunityRewardValue string `orm:"column(community_reward_value);size(255);null" description:"累计奖励价值"`
-	TodayTeamSales       string `orm:"column(today_team_sales);size(255);null" description:"今天新增业绩"`
-	CommunitySales       string `orm:"column(community_sales);size(255);null" description:"小区业绩"`
-	GlobalReward         string `orm:"column(global_reward);size(255);null" description:"累计分红奖励"`
-	GlobalRewardValue    string `orm:"column(global_reward_value);size(255);null" description:"累计分红奖励价值"`
+	Id                   int    `orm:"column(id);auto" description:"代理奖励列表" json:"-"`
+	UserId               string `orm:"column(user_id);size(0);null" json:"user_id"`
+	Sales                string `orm:"column(sales);size(255);null" description:"总累计业绩" json:"sales"`
+	PromoteName          string `orm:"column(promote_name);size(255);null" description:"级别" json:"promote_name"`
+	CommunityReward      string `orm:"column(community_reward);size(255);null" description:"累计奖励" json:"community_reward"`
+	CommunityRewardValue string `orm:"column(community_reward_value);size(255);null" description:"累计奖励价值" json:"community_reward_value"`
+	TodayTeamSales       string `orm:"column(today_team_sales);size(255);null" description:"今天新增业绩" json:"today_team_sales"`
+	CommunitySales       string `orm:"column(community_sales);size(255);null" description:"小区业绩" json:"community_sales"`
+	GlobalReward         string `orm:"column(global_reward);size(255);null" description:"累计分红奖励" json:"global_reward"`
+	GlobalRewardValue    string `orm:"column(global_reward_value);size(255);null" description:"累计分红奖励价值" json:"global_reward_value"`
 }
 
 func (t *RewardRangeData) TableName() string {