2021-04-27 15:33:49 +08:00
|
|
|
package service
|
|
|
|
|
2021-04-30 15:55:02 +08:00
|
|
|
import (
|
|
|
|
"legend/models/fast"
|
2021-05-16 15:21:52 +08:00
|
|
|
"legend/utils"
|
2021-04-30 15:55:02 +08:00
|
|
|
)
|
2021-04-27 15:33:49 +08:00
|
|
|
|
|
|
|
type AccountService struct {
|
|
|
|
BaseService
|
|
|
|
}
|
|
|
|
|
2021-04-30 15:55:02 +08:00
|
|
|
func (c *AccountService) GetAccountInfo(userName string) *fast.AccountInfo {
|
2021-04-27 15:33:49 +08:00
|
|
|
|
2021-04-30 15:55:02 +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
|
|
|
|
}
|