elec

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

type Dao struct {
	// contains filtered or unexported fields
}

Dao define

func New

func New(c *conf.Config) (d *Dao)

New init dao

func (*Dao) ArcUpdate

func (d *Dao) ArcUpdate(c context.Context, mid, aid int64, st int8, ip string) (err error)

ArcUpdate arc open or close elec.

func (*Dao) ArchiveState

func (d *Dao) ArchiveState(c context.Context, aid, mid int64, ip string) (data *elec.ArcState, err error)

ArchiveState get arc elec state.

func (*Dao) Balance

func (d *Dao) Balance(c context.Context, mid int64, ip string) (bal *elec.Balance, err error)

Balance get battery balance.

func (*Dao) CurrentRank

func (d *Dao) CurrentRank(c context.Context, mid int64, ip string) (cur []*elec.Rank, err error)

CurrentRank get current rank.

func (*Dao) DailyBill

func (d *Dao) DailyBill(c context.Context, mid int64, pn, ps int, begin, end, ip string) (bl *elec.BillList, err error)

DailyBill daily settlement.

func (*Dao) ElecRelation

func (d *Dao) ElecRelation(c context.Context, mid int64, mids []int64, ip string) (chargeMap map[int64]int, err error)

ElecRelation check if multi user charged.

func (*Dao) Notify

func (d *Dao) Notify(c context.Context, ip string) (nt *elec.Notify, err error)

Notify get up-to-date notice.

func (*Dao) RecentElec

func (d *Dao) RecentElec(c context.Context, mid int64, pn, ps int, ip string) (rec *elec.RecentElecList, err error)

RecentElec get aid & elec_num.

func (*Dao) RecentRank

func (d *Dao) RecentRank(c context.Context, mid, size int64, ip string) (rec []*elec.Rank, err error)

RecentRank get recent rank.

func (*Dao) Remark

func (d *Dao) Remark(c context.Context, mid, id int64, msg, ak, ck, ip string) (status int, err error)

Remark reply a msg.

func (*Dao) RemarkDetail

func (d *Dao) RemarkDetail(c context.Context, mid, id int64, ip string) (re *elec.Remark, err error)

RemarkDetail get remark detail.

func (*Dao) RemarkList

func (d *Dao) RemarkList(c context.Context, mid int64, pn, ps int, begin, end, ip string) (rec *elec.RemarkList, err error)

RemarkList get remark list.

func (*Dao) Status

func (d *Dao) Status(c context.Context, mid int64, ip string) (st *elec.Status, err error)

Status get elec setting status.

func (*Dao) TotalRank

func (d *Dao) TotalRank(c context.Context, mid int64, ip string) (tol []*elec.Rank, err error)

TotalRank get total rank.

func (*Dao) UpStatus

func (d *Dao) UpStatus(c context.Context, mid int64, spday int, ip string) (err error)

UpStatus update elec setting status.

func (*Dao) UserInfo

func (d *Dao) UserInfo(c context.Context, mid int64, ip string) (st *elec.UserInfo, err error)

UserInfo get user elec info.

func (*Dao) UserState

func (d *Dao) UserState(c context.Context, mid int64, ip string) (data *elec.UserState, err error)

UserState get user elec state.

func (*Dao) UserUpdate

func (d *Dao) UserUpdate(c context.Context, mid int64, st int8, ip string) (u *elec.UserInfo, err error)

UserUpdate join or exit elec.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL