Parcourir la source

添加收款信息

yuliang1112 il y a 2 ans
Parent
commit
9bd399b36c

+ 2 - 2
db/operate.go

@@ -983,7 +983,7 @@ func GetAutoDraftDefaultInMvTask() error {
 	taskIdToProjectIdMap := map[int]int64{}
 	// 项目id 对 定时任务id 的map
 	projectIdToAutoTaskIdMap := map[int64]int{}
-	// 项目id 对 违约定时任务id 的map
+	// 项目 id 对 违约定时任务 id 的 map
 	projectIdToAutoDefaultIdMap := map[int64]int{}
 	// taskId 对 稿费形式的 map
 	taskIdToFeeFormMap := make(map[int]int)
@@ -1725,7 +1725,7 @@ func GetAutoCaseCloseDefaultTask() error {
 				}
 				settleAmount := taskInfo.TaskReward * (1.0 - float64(taskInfo.SketchBreakRate+dataDefaultRate+taskInfo.LinkBreakRate+taskInfo.ScriptBreakRate)/100)
 				if settleAmount < 0 {
-					settleAmount = float64(0.01)
+					settleAmount = 0.01
 				}
 				db3 := GetReadDB(context.Background())
 				err2 = db3.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", submitTaskNeedModId).Updates(

+ 1 - 1
handler/ConfirmWithdrawal.go

@@ -39,7 +39,7 @@ func (c ConfirmWithdrawalHandler) run() {
 		util.HandlerPackErrorResp(c.resp, consts.ErrorInternal, consts.DefaultToast)
 		return
 	}
-	c.resp.Message = "确认提现成功"
+	//c.resp.Message = "确认提现成功"
 }
 
 func (c ConfirmWithdrawalHandler) checkParam() error {

+ 4 - 4
model/gorm_model/talent.go

@@ -10,10 +10,10 @@ type YoungeeTalentInfo struct {
 	TalentWxOpenid    string    `gorm:"column:talent_wx_openid;NOT NULL"`    // 达人的微信openid
 	TalentWxNickname  string    `gorm:"column:talent_wx_nickname"`           // 达人的微信昵称
 	TalentWxNumber    string    `gorm:"column:talent_wx_number"`             // 达人微信号
-	Income            int64     `gorm:"column:income;default:0"`             // 收益总数
-	Withdrawing       int64     `gorm:"column:withdrawing;default:0"`        // 提现中金额
-	Canwithdraw       int64     `gorm:"column:canwithdraw;default:0"`        // 可提现金额
-	Withdrawed        int64     `gorm:"column:withdrawed;default:0"`         // 已提现金额
+	Income            float64   `gorm:"column:income;default:0"`             // 收益总数
+	Withdrawing       float64   `gorm:"column:withdrawing;default:0"`        // 提现中金额
+	Canwithdraw       float64   `gorm:"column:canwithdraw;default:0"`        // 可提现金额
+	Withdrawed        float64   `gorm:"column:withdrawed;default:0"`         // 已提现金额
 	TalentGender      int       `gorm:"column:talent_gender"`                // 性别,0未知 1男 2女
 	TalentPhoneNumber string    `gorm:"column:talent_phone_number"`          // 电话号码
 	TalentAgeBracket  int       `gorm:"column:talent_age_bracket"`           // 年龄段,取tallent_age_bracket表id

+ 6 - 6
model/http_model/creator_list.go

@@ -9,12 +9,12 @@ type CreatorListRequest struct {
 }
 
 type CreatorListPreview struct {
-	Id               string `json:"id"`                  // 达人id
-	TalentWxNickname string `json:"talent_wx_nickname"`  // 达人的微信昵称
-	IsBindAccount    string `json:"is_bind_account"`     // 是否绑定账号
-	CanWithDraw      int64  `json:"canwithdraw"`         // 可用余额
-	TalentPhone      string `json:"talent_phone_number"` // 达人的联系方式
-	CreateDate       string `json:"create_date"`         // 创建时间
+	Id               string  `json:"id"`                  // 达人id
+	TalentWxNickname string  `json:"talent_wx_nickname"`  // 达人的微信昵称
+	IsBindAccount    string  `json:"is_bind_account"`     // 是否绑定账号
+	CanWithDraw      float64 `json:"canwithdraw"`         // 可用余额
+	TalentPhone      string  `json:"talent_phone_number"` // 达人的联系方式
+	CreateDate       string  `json:"create_date"`         // 创建时间
 }
 
 type CreatorListData struct {

+ 2 - 2
service/auto_task.go

@@ -197,8 +197,8 @@ func AutoTask() error {
 		log.Println("GetAutoCaseCloseDefaultTask is running ,Time :", time.Now())
 	}
 	//定时任务
-	spec := "*/30 * * * * ?" //cron表达式,每10秒一次
-	//spec := "0 */30 * * * ?" //cron表达式,每一分钟执行一次
+	//spec := "*/30 * * * * ?" //cron表达式,每10秒一次
+	spec := "0 */30 * * * ?" //cron表达式,每一分钟执行一次
 	//spec := "0 0 * * * *" //每小时执行
 	// 添加定时任务,
 	_, err := crontab.AddFunc("@midnight", taskKDStatus)