|
|
@@ -112,6 +112,7 @@ func AddPeriod(eg *xorm.Engine, sess *xorm.Session, req map[string]string) int { |
|
|
|
return 3 |
|
|
|
} |
|
|
|
} |
|
|
|
data.Price = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(data.Price) + zhios_order_relate_utils.StrToFloat64(req["price"])) |
|
|
|
data.Sum = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(data.Sum) + zhios_order_relate_utils.StrToFloat64(req["amount"])) |
|
|
|
data.UpdateTime = time.Now() |
|
|
|
update, err := sess.Where("id=?", data.Id).Cols("sum,update_time").Update(&data) |
|
|
@@ -132,6 +133,7 @@ func AddPeriod(eg *xorm.Engine, sess *xorm.Session, req map[string]string) int { |
|
|
|
period = base.MemberUplvPeriod |
|
|
|
break |
|
|
|
case "3": |
|
|
|
req["price"] = "0" |
|
|
|
period = base.NewMemberPeriod |
|
|
|
break |
|
|
|
} |
|
|
@@ -145,6 +147,7 @@ func AddPeriod(eg *xorm.Engine, sess *xorm.Session, req map[string]string) int { |
|
|
|
Sum: req["amount"], |
|
|
|
HasReturnMoney: "0", |
|
|
|
Period: period, |
|
|
|
Price: req["price"], |
|
|
|
EveryMoney: zhios_order_relate_utils.Float64ToStr(float64(int(zhios_order_relate_utils.StrToFloat64(req["amount"])/float64(period)*100)) / 100), |
|
|
|
Pvd: zhios_order_relate_utils.StrToInt(req["pvd"]), |
|
|
|
CoinId: base.CoinId, |
|
|
@@ -188,6 +191,7 @@ func AddPeriodEg(eg *xorm.Engine, req map[string]string) int { |
|
|
|
return 3 |
|
|
|
} |
|
|
|
} |
|
|
|
data.Price = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(data.Price) + zhios_order_relate_utils.StrToFloat64(req["price"])) |
|
|
|
data.Sum = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(data.Sum) + zhios_order_relate_utils.StrToFloat64(req["amount"])) |
|
|
|
data.UpdateTime = time.Now() |
|
|
|
update, err := eg.Where("id=?", data.Id).Cols("sum,update_time").Update(&data) |
|
|
@@ -208,6 +212,7 @@ func AddPeriodEg(eg *xorm.Engine, req map[string]string) int { |
|
|
|
period = base.MemberUplvPeriod |
|
|
|
break |
|
|
|
case "3": |
|
|
|
req["price"] = "0" |
|
|
|
period = base.NewMemberPeriod |
|
|
|
break |
|
|
|
} |
|
|
@@ -221,6 +226,7 @@ func AddPeriodEg(eg *xorm.Engine, req map[string]string) int { |
|
|
|
UpdateTime: time.Now(), |
|
|
|
Sum: req["amount"], |
|
|
|
HasReturnMoney: "0", |
|
|
|
Price: req["price"], |
|
|
|
Period: period, |
|
|
|
EveryMoney: zhios_order_relate_utils.Float64ToStr(float64(int(zhios_order_relate_utils.StrToFloat64(req["amount"])/float64(period)*100)) / 100), |
|
|
|
Pvd: zhios_order_relate_utils.StrToInt(req["pvd"]), |
|
|
|