|
@@ -103,10 +103,10 @@ func (b *base_power) OpenPower(goods_spec_id int64, appid, goods_code string, us
|
|
|
}
|
|
|
if end_time == "" {
|
|
|
now := time.Now()
|
|
|
- end := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.Local)
|
|
|
+ end := time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 0, time.Local)
|
|
|
if strings.HasSuffix(v.Cycle, "d") {
|
|
|
cycle := IntAll(strings.TrimSuffix(v.Cycle, "d"))
|
|
|
- end = end.AddDate(0, 0, cycle)
|
|
|
+ end = end.AddDate(0, 0, cycle-1)
|
|
|
} else if strings.HasSuffix(v.Cycle, "m") {
|
|
|
cycle := IntAll(strings.TrimSuffix(v.Cycle, "m"))
|
|
|
end = end.AddDate(0, cycle, 0)
|