|
@@ -50,8 +50,10 @@ func GetHappyOrchardUserSeedRecordData(engine *xorm.Engine, record models.HappyO |
|
|
resp.RecordPlantingStageZh = stageNameCustomData[resp.RecordPlantingStage+1] |
|
|
resp.RecordPlantingStageZh = stageNameCustomData[resp.RecordPlantingStage+1] |
|
|
resp.RecordPlantingNextStage = resp.RecordPlantingStage + 1 |
|
|
resp.RecordPlantingNextStage = resp.RecordPlantingStage + 1 |
|
|
resp.RecordPlantingNextStageZh = stageNameCustomData[resp.RecordPlantingNextStage+1] |
|
|
resp.RecordPlantingNextStageZh = stageNameCustomData[resp.RecordPlantingNextStage+1] |
|
|
resp.RecordPlantingNextStageNeedWaterNums = (nextSeedStateWaters - record.WaterNums) / happyOrchardBasicSetting.WateringEveryTimeWaterDroplet |
|
|
|
|
|
resp.RecordPlantingNextStageNeedWater = nextSeedStateWaters - record.WaterNums |
|
|
|
|
|
|
|
|
if nextSeedStateWaters > 0 { |
|
|
|
|
|
resp.RecordPlantingNextStageNeedWaterNums = (nextSeedStateWaters - record.WaterNums) / happyOrchardBasicSetting.WateringEveryTimeWaterDroplet |
|
|
|
|
|
resp.RecordPlantingNextStageNeedWater = nextSeedStateWaters - record.WaterNums |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
resp.RecordId = record.Id |
|
|
resp.RecordId = record.Id |
|
|
resp.RecordName = happyOrchardSeed.Name |
|
|
resp.RecordName = happyOrchardSeed.Name |
|
@@ -82,12 +84,8 @@ func getHappyOrchardUserSeedStage(record models.HappyOrchardUserSeedRecord, seed |
|
|
seedState = 3 |
|
|
seedState = 3 |
|
|
nextSeedStateWaters = seed.NeedWatersNumForStage4 |
|
|
nextSeedStateWaters = seed.NeedWatersNumForStage4 |
|
|
} |
|
|
} |
|
|
if record.WaterNums >= seed.NeedWatersNumForStage4 && record.WaterNums < seed.NeedWatersNumForStage5 { |
|
|
|
|
|
|
|
|
if record.WaterNums >= seed.NeedWatersNumForStage4 { |
|
|
seedState = 4 |
|
|
seedState = 4 |
|
|
nextSeedStateWaters = seed.NeedWatersNumForStage5 |
|
|
|
|
|
} |
|
|
|
|
|
if record.WaterNums >= seed.NeedWatersNumForStage5 { |
|
|
|
|
|
seedState = 5 |
|
|
|
|
|
} |
|
|
} |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|