huangjiajun 7 mesi fa
parent
commit
a0418928b2
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. +3
    -3
      rule/consume_integral_settlement.go

+ 3
- 3
rule/consume_integral_settlement.go Vedi File

@@ -262,7 +262,7 @@ func Total(sess *xorm.Session, date, dayPayAmount string) error {
amount = queryNativeString[0]["amount"]
}
date1 := strings.ReplaceAll(date, "-", "")
sql2 := "SELECT SUM(integral_num) as amount FROM subsidy_with_user where kind(1,2) and is_give=0 and date='" + date + "'"
sql2 := "SELECT SUM(integral_num) as amount FROM subsidy_with_user where kind in(1,2) and is_give=0 and date='" + date + "'"
queryNativeString2, _ := db.QueryNativeStringSess(sess, sql2)
DayIntegral := "0"
if len(queryNativeString2) > 0 {
@@ -275,13 +275,13 @@ func Total(sess *xorm.Session, date, dayPayAmount string) error {
if len(queryNativeStringAll) > 0 {
AllAmount = queryNativeStringAll[0]["amount"]
}
sqlAllIntegral := "SELECT SUM(integral_num) as amount FROM subsidy_with_user where kind(1,2) and is_give=0 "
sqlAllIntegral := "SELECT SUM(integral_num) as amount FROM subsidy_with_user where kind in(1,2) and is_give=0 "
queryNativeStringAllIntegral, _ := db.QueryNativeStringSess(sess, sqlAllIntegral)
AllIntegral := "0"
if len(queryNativeStringAllIntegral) > 0 {
AllIntegral = queryNativeStringAllIntegral[0]["amount"]
}
sqlAllIntegralAmount := "SELECT SUM(amount) as amount FROM subsidy_with_user where kind(1,2) and is_give=0 "
sqlAllIntegralAmount := "SELECT SUM(amount) as amount FROM subsidy_with_user where kind in(1,2) and is_give=0 "
queryNativeStringAllIntegralAmount, _ := db.QueryNativeStringSess(sess, sqlAllIntegralAmount)
AllIntegralAmount := "0"
if len(queryNativeStringAllIntegralAmount) > 0 {


Caricamento…
Annulla
Salva