|
|
@@ -217,6 +217,9 @@ func CheckSchemeTasksComplete(blockStarChain string, engine *xorm.Engine, tasks |
|
|
|
} else { |
|
|
|
total = item.FinishCount |
|
|
|
} |
|
|
|
if item.TaskType == 19 { |
|
|
|
total = zhios_condition_statistics_utils.IntToStr(zhios_condition_statistics_utils.StrToInt(total) + 1) |
|
|
|
} |
|
|
|
temp["name"] = name |
|
|
|
temp["total"] = total //需完成数 |
|
|
|
temp["finish"] = finish //已完成数 |
|
|
@@ -645,12 +648,13 @@ func GetFinishCount(blockStarChain string, engine *xorm.Engine, uid interface{}, |
|
|
|
FROM mall_ord_list_relate olr |
|
|
|
JOIN mall_ord ol ON olr.oid = ol.ord_id |
|
|
|
WHERE olr.uid = ? |
|
|
|
AND ol.state =3 and olr.level>0 ?; |
|
|
|
AND ol.state =3 and olr.level>0 %s; |
|
|
|
` |
|
|
|
str := "" |
|
|
|
if zhios_condition_statistics_utils.InArr(zhios_condition_statistics_utils.IntToStr(task.TaskTypePvd), []string{"8", "9"}) { |
|
|
|
str += " and ol.order_type=" + zhios_condition_statistics_utils.IntToStr(task.TaskTypePvd) |
|
|
|
} |
|
|
|
sqlTpl = fmt.Sprintf(sqlTpl, str) |
|
|
|
result, err := db.QueryNativeString(engine, sqlTpl, uid, str) |
|
|
|
if err == nil { |
|
|
|
total += zhios_condition_statistics_utils.StrToFloat64(result[0]["amount"]) |
|
|
@@ -879,6 +883,26 @@ WHERE molr.uid in(SELECT uid FROM user_relate WHERE parent_uid=%s and level=1) |
|
|
|
} |
|
|
|
|
|
|
|
return zhios_condition_statistics_utils.Float64ToStrByPrec(count, 2), hasPay, payOrdId |
|
|
|
case 19: |
|
|
|
teamCountMinData, _ := db.SysCfgGetOne(engine, "team_count_min") |
|
|
|
teamCountMin := 15 |
|
|
|
if teamCountMinData != nil { |
|
|
|
teamCountMin = zhios_condition_statistics_utils.StrToInt(teamCountMinData.Val) |
|
|
|
} |
|
|
|
teamtotal := db.GetUserTeamTotal(engine, zhios_condition_statistics_utils.AnyToString(uid)) |
|
|
|
var count = 0 |
|
|
|
if teamtotal != nil && teamtotal.FirstCount >= teamCountMin && teamtotal.SecondCount >= teamCountMin { |
|
|
|
count++ |
|
|
|
} |
|
|
|
sql := `SELECT * FROM user_profile up |
|
|
|
LEFT JOIN user_team_total utt ON utt.uid=up.uid |
|
|
|
WHERE up.parent_uid=? and utt.first_count>=? and utt.second_count>=? |
|
|
|
` |
|
|
|
nativeString, _ := db.QueryNativeString(engine, sql, zhios_condition_statistics_utils.AnyToString(uid), teamCountMin, teamCountMin) |
|
|
|
if len(nativeString) > 0 { |
|
|
|
count += len(nativeString) |
|
|
|
} |
|
|
|
return zhios_condition_statistics_utils.IntToStr(count), hasPay, payOrdId |
|
|
|
default: |
|
|
|
return "", hasPay, payOrdId |
|
|
|
} |
|
|
|