upcrmservice

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: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrTooManySearchItem too many search items, 搜索只支持返回前10000条数据
	ErrTooManySearchItem = errors.New("筛选仅支持展示前1万条")
	//ErrNoMid no mid
	ErrNoMid = errors.New("Mid为空")
)

Functions

func GetDateStamp

func GetDateStamp(timeStamp time.Time) time.Time

GetDateStamp get date from time stamp

Types

type QueryDbFunc

type QueryDbFunc func(fields string, mid ...int64) (result []upcrmmodel.UpBaseInfo, err error)

QueryDbFunc query func type

type SearchResult

type SearchResult struct {
	AccountState           int `json:"account_state"`
	Activity               int `json:"activity"`
	Attr                   int `json:"attr"`
	ArticleCountAccumulate int `json:"article_count_accumulate"`
	ID                     uint32
	Mid                    int64
}

SearchResult struct

type Service

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

Service upcrm service

func New

func New(c *conf.Config) (svc *Service)

New create service

func (*Service) AbsenceAdd

func (s *Service) AbsenceAdd(context context.Context, arg *signmodel.AbsenceArg) (result signmodel.CommonResponse, err error)

AbsenceAdd .

func (*Service) AbsenceList

func (s *Service) AbsenceList(context context.Context, arg *signmodel.PageArg) (result *signmodel.AbsenceResult, err error)

AbsenceList .

func (*Service) AbsenceRetract

func (s *Service) AbsenceRetract(context context.Context, arg *signmodel.IDArg) (result signmodel.CommonResponse, err error)

AbsenceRetract .

func (*Service) AddAuditLog

func (s *Service) AddAuditLog(bizID int, tp int8, action string, uid int64, uname string, oids []int64, index []interface{}, content map[string]interface{}) error

AddAuditLog .

func (*Service) CommandRefreshUpRank

func (s *Service) CommandRefreshUpRank(con context.Context, arg *model.CommandCommonArg) (result model.CommandCommonResult, err error)

CommandRefreshUpRank refresh up rank

func (*Service) Countrys

func (s *Service) Countrys(c context.Context, arg *signmodel.CommonArg) (res *signmodel.SignCountrysReply, err error)

Countrys .

func (*Service) CreditLogQueryUp

func (s *Service) CreditLogQueryUp(context context.Context, arg *upcrmmodel.CreditLogQueryArgs) (result upcrmmodel.CreditLogUpResult, err error)

CreditLogQueryUp query credit log

func (*Service) DataService

func (s *Service) DataService() *data.Service

DataService data service

func (*Service) PlayQueryInfo

func (s *Service) PlayQueryInfo(context context.Context, arg *upcrmmodel.PlayQueryArgs) (result upcrmmodel.PlayQueryResult, err error)

PlayQueryInfo handle PlayQueryInfo

func (*Service) QueryDetail

func (s *Service) QueryDetail(ctx context.Context, currentDate time.Time, days int) (result []*TrendDetail, err error)

QueryDetail query detail info

func (*Service) QueryTrend

func (s *Service) QueryTrend(ctx context.Context, statType int, currentDate time.Time, days int) (result []*TrendRes, err error)

QueryTrend query trend

func (*Service) QueryUpInfoWithViewerData

func (s *Service) QueryUpInfoWithViewerData(c context.Context, arg *upcrmmodel.UpInfoWithViewerArg) (result upcrmmodel.UpInfoWithViewerResult, err error)

QueryUpInfoWithViewerData query with view data

func (*Service) QueryYesterday

func (s *Service) QueryYesterday(ctx context.Context, date time.Time) (item *YesterdayRes, err error)

QueryYesterday query yesterday data

func (*Service) RefreshCache

func (s *Service) RefreshCache(tm time.Time)

RefreshCache refresh cache

func (*Service) ScoreQuery

func (s *Service) ScoreQuery(context context.Context, arg *upcrmmodel.ScoreQueryArgs) (result upcrmmodel.ScoreQueryResult, err error)

ScoreQuery query score

func (*Service) ScoreQueryUp

func (s *Service) ScoreQueryUp(context context.Context, arg *upcrmmodel.ScoreQueryUpArgs) (result upcrmmodel.ScoreQueryUpResult, err error)

ScoreQueryUp query up score

func (*Service) ScoreQueryUpHistory

func (s *Service) ScoreQueryUpHistory(context context.Context, arg *upcrmmodel.ScoreQueryUpHistoryArgs) (result upcrmmodel.ScoreQueryUpHistoryResult, err error)

ScoreQueryUpHistory query up history

func (*Service) SetHTTPClient

func (s *Service) SetHTTPClient(client *bm.Client)

SetHTTPClient set client

func (*Service) SignAdd

func (s *Service) SignAdd(context context.Context, arg *signmodel.SignUpArg) (result signmodel.CommonResponse, err error)

SignAdd add sign info

func (*Service) SignCheckExist

func (s *Service) SignCheckExist(c context.Context, arg *signmodel.SignCheckExsitArg) (result signmodel.SignCheckExsitResult, err error)

SignCheckExist check sign up has an valid contract

func (*Service) SignPayComplete

func (s *Service) SignPayComplete(con context.Context, arg *signmodel.SignPayCompleteArg) (result signmodel.SignPayCompleteResult, err error)

SignPayComplete complete sign pay

func (*Service) SignQuery

func (s *Service) SignQuery(c context.Context, arg *signmodel.SignQueryArg) (res *signmodel.SignQueryResult, err error)

SignQuery sign query

func (*Service) SignQueryID

func (s *Service) SignQueryID(c context.Context, arg *signmodel.SignIDArg) (res *signmodel.SignUpArg, err error)

SignQueryID .

func (*Service) SignUpAuditLogs

func (s *Service) SignUpAuditLogs(c context.Context, arg *signmodel.SignOpSearchArg) (res *signmodel.SignAuditListReply, err error)

SignUpAuditLogs .

func (*Service) SignUpdate

func (s *Service) SignUpdate(context context.Context, arg *signmodel.SignUpArg) (result signmodel.CommonResponse, err error)

SignUpdate .

func (*Service) TestGetViewBase

func (s *Service) TestGetViewBase(c context.Context, arg *upcrmmodel.TestGetViewBaseArgs) (res interface{}, err error)

TestGetViewBase test get view

func (*Service) Tids

func (s *Service) Tids(c context.Context, arg *signmodel.CommonArg) (res *signmodel.SignTidsReply, err error)

Tids .

func (*Service) UpAccountInfo

func (s *Service) UpAccountInfo(c context.Context, arg *upcrmmodel.InfoAccountInfoArgs) (res []*accgrpc.Info, err error)

UpAccountInfo get account info

func (*Service) UpBaseInfoQuery

func (s *Service) UpBaseInfoQuery(context context.Context, arg *upcrmmodel.InfoQueryArgs) (result *upcrmmodel.InfoQueryResult, err error)

UpBaseInfoQuery query

func (*Service) UpInfoSearch

func (s *Service) UpInfoSearch(c context.Context, arg *upcrmmodel.InfoSearchArgs) (result upcrmmodel.InfoSearchResult, err error)

UpInfoSearch info search

func (*Service) UpRankQueryList

func (s *Service) UpRankQueryList(c context.Context, arg *upcrmmodel.UpRankQueryArgs) (result upcrmmodel.UpRankQueryResult, err error)

UpRankQueryList query up rank list

func (*Service) ViewCheck

func (s *Service) ViewCheck(context context.Context, arg *signmodel.PowerCheckArg) (res *signmodel.PowerCheckReply, err error)

ViewCheck .

func (*Service) ViolationAdd

func (s *Service) ViolationAdd(context context.Context, arg *signmodel.ViolationArg) (result signmodel.CommonResponse, err error)

ViolationAdd .

func (*Service) ViolationList

func (s *Service) ViolationList(context context.Context, arg *signmodel.PageArg) (result *signmodel.ViolationResult, err error)

ViolationList .

func (*Service) ViolationRetract

func (s *Service) ViolationRetract(context context.Context, arg *signmodel.IDArg) (result signmodel.CommonResponse, err error)

ViolationRetract .

type TrendDetail

type TrendDetail struct {
	ActivityUps int64 `json:"activity_ups"`
	IncrUps     int64 `json:"incr_ups"`
	TotalUps    int64 `json:"total_ups"`
	Date        int64 `json:"date"`
}

TrendDetail struct

type TrendRes

type TrendRes struct {
	Date int64 `json:"date"` // 截止日期
	Ups  int64 `json:"ups"`
}

TrendRes struct

type YesterdayRes

type YesterdayRes struct {
	ActivityUps int64 `json:"activity_ups"`
	IncrUps     int64 `json:"incr_ups"`
	TotalUps    int64 `json:"total_ups"`
	Date        int64 `json:"date"` // 截止日期
}

YesterdayRes struct

Jump to

Keyboard shortcuts

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