Documentation ¶
Index ¶
- Constants
- type Dao
- func (d *Dao) AddCreditScore(creditScore *upcrmmodel.UpScoreHistory) error
- func (d *Dao) AddLog(arg *upcrmmodel.ArgCreditLogAdd) error
- func (d *Dao) AddOrUpdateCreditScore(creditScore *upcrmmodel.UpScoreHistory) (err error)
- func (d *Dao) Close()
- func (d *Dao) GetCreditLog(c context.Context, arg *upcrmmodel.ArgGetLogHistory) (results []*upcrmmodel.SimpleCreditLogWithContent, err error)
- func (d *Dao) GetCreditScore(c context.Context, arg *upcrmmodel.GetScoreParam) (results []*upcrmmodel.UpScoreHistory, err error)
- func (d *Dao) InsertBatchScoreHistory(infoList []*UpQualityInfo, tablenum int) (affectRow int64, err error)
- func (d *Dao) InsertScoreHistory(info *UpQualityInfo) (affectRow int64, err error)
- func (d *Dao) InsertScoreSection(statis calculator.OverAllStatistic, scoreType int, date time.Time) error
- func (d *Dao) UpdateCreditScore(score int, mid int64) (affectRow int64, err error)
- func (d *Dao) UpdateQualityAndPrScore(prScore int, qualityScore int, mid int64) (affectRow int64, err error)
- type UpQualityInfo
Constants ¶
View Source
const ( //TimeFmtMysql mysql time format TimeFmtMysql = mysql.TimeFormat //TimeFmtDate with only date TimeFmtDate = "2006-01-02" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao upcrm dao
func (*Dao) AddCreditScore ¶
func (d *Dao) AddCreditScore(creditScore *upcrmmodel.UpScoreHistory) error
AddCreditScore add score
func (*Dao) AddOrUpdateCreditScore ¶
func (d *Dao) AddOrUpdateCreditScore(creditScore *upcrmmodel.UpScoreHistory) (err error)
AddOrUpdateCreditScore update score
func (*Dao) GetCreditLog ¶
func (d *Dao) GetCreditLog(c context.Context, arg *upcrmmodel.ArgGetLogHistory) (results []*upcrmmodel.SimpleCreditLogWithContent, err error)
GetCreditLog get log
func (*Dao) GetCreditScore ¶
func (d *Dao) GetCreditScore(c context.Context, arg *upcrmmodel.GetScoreParam) (results []*upcrmmodel.UpScoreHistory, err error)
GetCreditScore get score
func (*Dao) InsertBatchScoreHistory ¶
func (d *Dao) InsertBatchScoreHistory(infoList []*UpQualityInfo, tablenum int) (affectRow int64, err error)
InsertBatchScoreHistory insert batch sql
func (*Dao) InsertScoreHistory ¶
func (d *Dao) InsertScoreHistory(info *UpQualityInfo) (affectRow int64, err error)
InsertScoreHistory insert into score history
func (*Dao) InsertScoreSection ¶
func (d *Dao) InsertScoreSection(statis calculator.OverAllStatistic, scoreType int, date time.Time) error
InsertScoreSection insert score section
func (*Dao) UpdateCreditScore ¶
UpdateCreditScore update score
type UpQualityInfo ¶
type UpQualityInfo struct { Mid int64 `json:"mid"` QualityValue int `json:"quality_value"` PrValue int `json:"pr_value"` Cdate string `json:"cdate"` // 产生时间 "2018-01-01" }
UpQualityInfo struct
func (*UpQualityInfo) AsPrScore ¶
func (u *UpQualityInfo) AsPrScore() (history *upcrmmodel.UpScoreHistory)
AsPrScore copy to db struct
func (*UpQualityInfo) AsQualityScore ¶
func (u *UpQualityInfo) AsQualityScore() (history *upcrmmodel.UpScoreHistory)
AsQualityScore copy to db struct
Click to show internal directories.
Click to hide internal directories.