|
@@ -139,14 +139,14 @@ func DailySettlementBlockConsumeIntegral(engine *xorm.Engine, mid string, isTask |
|
|
|
|
|
|
|
|
if hasConsumeTotal > 0 { |
|
|
if hasConsumeTotal > 0 { |
|
|
for _, v := range subsidyWithUserForConsumeList { |
|
|
for _, v := range subsidyWithUserForConsumeList { |
|
|
if v.LeaveDay > 0 && userStatusList[v.Uid]["status"] != "1" { |
|
|
|
|
|
|
|
|
if v.LeaveDay > 0 && userStatusList[v.Uid]["status"] == "1" { |
|
|
consumeTotalMap[v.Uid] = consumeTotalMap[v.Uid].Add(decimal.NewFromFloat(consumeValue)) |
|
|
consumeTotalMap[v.Uid] = consumeTotalMap[v.Uid].Add(decimal.NewFromFloat(consumeValue)) |
|
|
consumeTotalCountMap[v.Uid]++ |
|
|
consumeTotalCountMap[v.Uid]++ |
|
|
totalMap[v.Uid] = totalMap[v.Uid].Add(decimal.NewFromFloat(consumeValue)) |
|
|
totalMap[v.Uid] = totalMap[v.Uid].Add(decimal.NewFromFloat(consumeValue)) |
|
|
consumeValueTotal = consumeValueTotal.Add(decimal.NewFromFloat(consumeValue)) |
|
|
consumeValueTotal = consumeValueTotal.Add(decimal.NewFromFloat(consumeValue)) |
|
|
} |
|
|
} |
|
|
var err1 error |
|
|
var err1 error |
|
|
if userStatusList[v.Uid]["status"] != "1" { |
|
|
|
|
|
|
|
|
if userStatusList[v.Uid]["status"] == "1" { |
|
|
err1 = DealUserConsumeIntegral(session, &v, consumeValue, mid) |
|
|
err1 = DealUserConsumeIntegral(session, &v, consumeValue, mid) |
|
|
} else { |
|
|
} else { |
|
|
err1 = DealUserConsumeIntegralStop(session, &v, consumeValue, mid, storeStatusList[v.Uid]["date"]) |
|
|
err1 = DealUserConsumeIntegralStop(session, &v, consumeValue, mid, storeStatusList[v.Uid]["date"]) |
|
@@ -178,14 +178,14 @@ func DailySettlementBlockConsumeIntegral(engine *xorm.Engine, mid string, isTask |
|
|
return err, totalMap, storeTotalMap |
|
|
return err, totalMap, storeTotalMap |
|
|
} |
|
|
} |
|
|
for _, v := range subsidyWithUserForExperienceList { |
|
|
for _, v := range subsidyWithUserForExperienceList { |
|
|
if v.LeaveDay > 0 && userStatusList[v.Uid]["status"] != "1" { |
|
|
|
|
|
|
|
|
if v.LeaveDay > 0 && userStatusList[v.Uid]["status"] == "1" { |
|
|
experienceTotalCountMap[v.Uid]++ |
|
|
experienceTotalCountMap[v.Uid]++ |
|
|
totalMap[v.Uid] = totalMap[v.Uid].Add(decimal.NewFromFloat(experienceValue)) |
|
|
totalMap[v.Uid] = totalMap[v.Uid].Add(decimal.NewFromFloat(experienceValue)) |
|
|
experienceTotalMap[v.Uid] = experienceTotalMap[v.Uid].Add(decimal.NewFromFloat(experienceValue)) |
|
|
experienceTotalMap[v.Uid] = experienceTotalMap[v.Uid].Add(decimal.NewFromFloat(experienceValue)) |
|
|
experienceValueTotal = experienceValueTotal.Add(decimal.NewFromFloat(experienceValue)) |
|
|
experienceValueTotal = experienceValueTotal.Add(decimal.NewFromFloat(experienceValue)) |
|
|
} |
|
|
} |
|
|
var err1 error |
|
|
var err1 error |
|
|
if userStatusList[v.Uid]["status"] != "1" { |
|
|
|
|
|
|
|
|
if userStatusList[v.Uid]["status"] == "1" { |
|
|
err1 = DealUserExperienceIntegral(session, &v, experienceValue, mid) |
|
|
err1 = DealUserExperienceIntegral(session, &v, experienceValue, mid) |
|
|
} else { |
|
|
} else { |
|
|
err1 = DealUserExperienceIntegralStop(session, &v, experienceValue, mid, userStatusList[v.Uid]["date"]) |
|
|
err1 = DealUserExperienceIntegralStop(session, &v, experienceValue, mid, userStatusList[v.Uid]["date"]) |
|
@@ -215,7 +215,7 @@ func DailySettlementBlockConsumeIntegral(engine *xorm.Engine, mid string, isTask |
|
|
num := zhios_order_relate_utils.StrToFloat64(v.IntegralNum) / zhios_order_relate_utils.StrToFloat64(subsidyBase.ConsumptionIntegral) |
|
|
num := zhios_order_relate_utils.StrToFloat64(v.IntegralNum) / zhios_order_relate_utils.StrToFloat64(subsidyBase.ConsumptionIntegral) |
|
|
storeValue := zhios_order_relate_utils.FloatFormat(consumeValue*num, 2) |
|
|
storeValue := zhios_order_relate_utils.FloatFormat(consumeValue*num, 2) |
|
|
var err1 error |
|
|
var err1 error |
|
|
if storeStatusList[v.Uid]["status"] != "1" { |
|
|
|
|
|
|
|
|
if storeStatusList[v.Uid]["status"] == "1" { |
|
|
storeTotalCountMap[v.Uid] += int(num) |
|
|
storeTotalCountMap[v.Uid] += int(num) |
|
|
storeTotalMap[v.Uid] = storeTotalMap[v.Uid].Add(decimal.NewFromFloat(storeValue)) |
|
|
storeTotalMap[v.Uid] = storeTotalMap[v.Uid].Add(decimal.NewFromFloat(storeValue)) |
|
|
storeValueTotal = storeValueTotal.Add(decimal.NewFromFloat(storeValue)) |
|
|
storeValueTotal = storeValueTotal.Add(decimal.NewFromFloat(storeValue)) |
|
|