Ver código fonte

升级

master
huangjiajun 1 semana atrás
pai
commit
4ec100c869
1 arquivos alterados com 2 adições e 2 exclusões
  1. +2
    -2
      rule/user_upgrade.go

+ 2
- 2
rule/user_upgrade.go Ver arquivo

@@ -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


Carregando…
Cancelar
Salvar