Browse Source

升级

master
huangjiajun 1 week ago
parent
commit
4ec100c869
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      rule/user_upgrade.go

+ 2
- 2
rule/user_upgrade.go View File

@@ -106,7 +106,7 @@ func UserUpgradeTask(eg *xorm.Engine, uid, lv int) ([]map[string]string, error)
"is_success": utils.IntToStr(isSuccess),
}
taskList = append(taskList, tmp)
if isSuccess == 1 || v.IsMustTask == 0 { //记录选做任务数量
if isSuccess == 1 && v.IsMustTask == 0 { //记录选做任务数量
chooseNum++
}
if isSuccess == 0 && v.IsMustTask == 1 { //必做任务未完成
@@ -116,7 +116,7 @@ func UserUpgradeTask(eg *xorm.Engine, uid, lv int) ([]map[string]string, error)
if mustTaskErr == 1 {
return taskList, errors.New("必做任务未完成")
}
if level.ChoosableNum > chooseNum { //选做任务未完成
if chooseNum < level.ChoosableNum { //选做任务未完成
return taskList, errors.New("选择任务未完成")
}
return taskList, nil


Loading…
Cancel
Save