dongfeng-pay/legend/service/accountService.go

32 lines
602 B
Go
Raw Normal View History

2021-04-27 15:33:49 +08:00
package service
import (
"legend/models/fast"
2021-05-16 15:21:52 +08:00
"legend/utils"
)
2021-04-27 15:33:49 +08:00
type AccountService struct {
BaseService
}
func (c *AccountService) GetAccountInfo(userName string) *fast.AccountInfo {
2021-04-27 15:33:49 +08:00
merchantInfo := fast.GetMerchantInfoByUserName(userName)
accountInfo := fast.GetAccountInfo(merchantInfo.MerchantUid)
2021-04-27 15:33:49 +08:00
return accountInfo
}
2021-05-16 15:21:52 +08:00
/**
** 获取当天的充值金额
*/
func (c *AccountService) GetTodayIncome() float64 {
startTime := utils.GetNowDate() + " 00:00:00"
endTime := utils.GetNowDate() + " 23:59:59"
todayIncome := fast.GetRangeDateIncome(startTime, endTime)
return todayIncome
}