mbep

package
v0.15.47 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindUnTangentInterviewee

func BindUnTangentInterviewee(tangentID string, userID string) error

func CreateCarbonFootprintLog

func CreateCarbonFootprintLog(params *CreateCarbonFootprintLogRequest) (string, error)

func CreateVisitRecord

func CreateVisitRecord(params *CreateVisitRecordRequest) (string, error)

func DeleteCarbonFootprintLog

func DeleteCarbonFootprintLog(id string) error

func Destroy

func Destroy()

func GetMemberCurrentDay

func GetMemberCurrentDay(params *GetCommuteQuery) (int, *CheckinInfo, *SummaryInfo, error)

func GetTangentInterviewee

func GetTangentInterviewee(tangentID string, pageNo int, pageSize int) ([]string, int64, error)

func Init

func Init(baseUrl string, timeoutSec time.Duration)

func PunchClock

func PunchClock(params *CreateCommuteRequest) (string, error)

Types

type BackgroundInfo

type BackgroundInfo struct {
	ImageUrl  string `json:"imageUrl"`
	Copyright string `json:"copyright"`
	Date      string `json:"date"`
	Week      string `json:"week"`
	LunarYear string `json:"lunarYear"`
}

func GetBackground

func GetBackground() (*BackgroundInfo, error)

type BindUnIntervieweeRequest

type BindUnIntervieweeRequest struct {
	TangentID string `json:"tangentId"`
	UserID    string `json:"userId"`
}

type CarbonFootprintLogInfo

type CarbonFootprintLogInfo struct {
	ID          string `json:"id"`
	MemberID    string `json:"MemberId"`
	Title       string `json:"title"`
	EnergyIndex uint8  `json:"energyIndex"`
	Energy
	CreateDate string `json:"createDate"`
	CreateTime string `json:"createTime"`
}

type CheckinInfo

type CheckinInfo struct {
	MemberID     string `json:"memberId"`
	CheckinDays  int    `json:"checkinDays"`
	CheckinTimes int    `json:"checkinTimes"`
}

type CommuteInfo

type CommuteInfo struct {
	Num uint64 `json:"num"`
	Key string `json:"key"`
}

func StatisticCommute30

func StatisticCommute30(userIDs []string) ([]CommuteInfo, error)

type CreateCarbonFootprintLogRequest

type CreateCarbonFootprintLogRequest struct {
	ID          string `json:"id"`
	MemberID    string `json:"memberId"`
	Type        uint8  `json:"type"`
	Title       string `json:"title"`
	EnergyIndex uint8  `json:"energy_index"`
}

type CreateCarbonFootprintLogResponse

type CreateCarbonFootprintLogResponse struct {
	ID string `json:"id" binding:"required"`
	// contains filtered or unexported fields
}

type CreateCommuteRequest

type CreateCommuteRequest struct {
	ID           string `json:"id"`
	MemberID     string `json:"memberId"`
	Walking      uint8  `json:"walking"`
	Cycling      uint8  `json:"cycling"`
	ElecCars     uint8  `json:"elecCars"`
	FuelVehicles uint8  `json:"fuelVehicles"`
	Bus          uint8  `json:"bus"`
	SubWay       uint8  `json:"subWay"`
	SaveWater    uint8  `json:"saveWater"`
	SaveElec     uint8  `json:"saveElec"`
}

type CreateCommuteResponse

type CreateCommuteResponse struct {
	CheckinTime string `json:"checkinTime"`
	// contains filtered or unexported fields
}

type CreateVisitRecordRequest

type CreateVisitRecordRequest struct {
	CompanyName     string `json:"companyName"`
	VisitorName     string `json:"visitorName"`
	Mobile          string `json:"mobile"`
	GoalType        uint8  `json:"goalType"`
	IntervieweeID   string `json:"intervieweeId"`
	IntervieweeName string `json:"intervieweeName"`
	CommuteType     string `json:"commuteType"`
	VisitorID       string `json:"visitorId"`
	MeetingID       string `json:"meetingId"`
	TangentName     string `json:"tangentName"`
	TangentID       string `json:"tangentId"`
}

type CreateVisitRecordResponse

type CreateVisitRecordResponse struct {
	ID string `json:"id" binding:"required"`
	// contains filtered or unexported fields
}

type DeleteCarbonFootprintLogRequest

type DeleteCarbonFootprintLogRequest struct {
	ID string `json:"id"`
}

type DeleteCarbonFootprintLogResponse

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

type DeleteCommuteRequest

type DeleteCommuteRequest struct {
	ID string `json:"id"`
}

type Energy

type Energy struct {
	Co2   float64 `json:"co2"`
	Water float64 `json:"water"`
	Coal  float64 `json:"coal"`
	Wood  float64 `json:"wood"`
}

type GetBackgroundResponse

type GetBackgroundResponse struct {
	ImageUrl  string `json:"imageUrl"`
	Copyright string `json:"copyright"`
	Date      string `json:"date"`
	Week      string `json:"week"`
	LunarYear string `json:"lunarYear"`
	// contains filtered or unexported fields
}

type GetCarbonFootprintLogQuery

type GetCarbonFootprintLogQuery struct {
	MemberID string `form:"MemberId"`
	PageNo   int    `form:"pageNo"`
	PageSize int    `form:"pageSize"`
}

type GetCarbonFootprintLogResponse

type GetCarbonFootprintLogResponse struct {
	CountInfo  *Energy                  `json:"countInfo"`
	Infos      []CarbonFootprintLogInfo `json:"infos"`
	TotalCount int64                    `json:"totalCount"`
	PageNo     int                      `json:"pageNo"`
	// contains filtered or unexported fields
}

type GetCommute30Response

type GetCommute30Response struct {
	Infos []CommuteInfo `json:"infos"`
	// contains filtered or unexported fields
}

type GetCommuteQuery

type GetCommuteQuery struct {
	MemberID    string `form:"memberId"`
	CurrentDate string `form:"currentDate"`
}

type GetCommuteResponse

type GetCommuteResponse struct {
	TotalTimes  int          `json:"totalTimes"`
	CheckinInfo *CheckinInfo `json:"checkinInfo"`
	SummaryInfo *SummaryInfo `json:"summaryInfo"`
	// contains filtered or unexported fields
}

type GetDateVisitRecordResponse

type GetDateVisitRecordResponse struct {
	Infos []VisitDetail `json:"infos"`
	// contains filtered or unexported fields
}

type GetTangentIntervieweeQuery

type GetTangentIntervieweeQuery struct {
	TangentID string `form:"tangentId"`
	PageNo    int    `form:"pageNo"`
	PageSize  int    `form:"pageSize"`
}

type GetTangentIntervieweeResponse

type GetTangentIntervieweeResponse struct {
	PageNo       int      `json:"pageNo"`
	TotalCount   int64    `json:"totalCount"`
	Interviewees []string `json:"interviewees"`
	// contains filtered or unexported fields
}

type GetVisit30Response

type GetVisit30Response struct {
	Infos []VisitInfo `json:"infos"`
	// contains filtered or unexported fields
}

type GetVisitRecordQuery

type GetVisitRecordQuery struct {
	ID          string `form:"id"`
	CompanyName string `form:"companyName"`
	VisitorName string `form:"visitorName"`
	GoalType    uint8  `form:"goalType"`
	CommuteType string `form:"commuteType"`
	VisitorID   string `form:"visitorId"`
	CreateDate  string `form:"createDate"`
	TangentID   string `form:"orgId"`
	PageNo      int    `form:"pageNo"`
	PageSize    int    `form:"pageSize"`
}

type GetVisitRecordResponse

type GetVisitRecordResponse struct {
	PageNo     int               `json:"pageNo"`
	TotalCount int64             `json:"totalCount"`
	Infos      []VisitRecordInfo `json:"infos"`
	// contains filtered or unexported fields
}

type SummaryInfo

type SummaryInfo struct {
	ID              string `json:"id"`
	CreateDate      string `json:"createDate"`
	LastCheckinTime string `json:"lastCheckinTime"`
	MemberID        string `json:"memberId"`
	Walking         uint8  `json:"walking"`
	Cycling         uint8  `json:"cycling"`
	ElecCars        uint8  `json:"elecCars"`
	FuelVehicles    uint8  `json:"fuelVehicles"`
	Bus             uint8  `json:"bus"`
	SubWay          uint8  `json:"subWay"`
	SaveWater       uint8  `json:"saveWater"`
	SaveElec        uint8  `json:"saveElec"`
}

type VisitDetail

type VisitDetail struct {
	Interviewees string `json:"interviewees"`
	CommuteType  string `json:"commute_type"`
	Mobile       string `json:"mobile"`
	Name         string `json:"name"`
	ID           string `json:"id"`
	Dept         string `json:"dept"`
	Time         string `json:"time"`
	Type         string `json:"type"`
}

func StatisticVisitDetail

func StatisticVisitDetail(tangentID string, date string) ([]VisitDetail, error)

type VisitInfo

type VisitInfo struct {
	Date string `json:"date"`
	Num  uint64 `json:"num"`
}

func StatisticVisit30

func StatisticVisit30(tangentID string) ([]VisitInfo, error)

type VisitRecordInfo

type VisitRecordInfo struct {
	ID              string `json:"id"`
	CompanyName     string `json:"companyName"`
	VisitorName     string `json:"visitorName"`
	Mobile          string `json:"mobile"`
	GoalType        uint8  `json:"goalType"`
	IntervieweeID   string `json:"intervieweeId"`
	IntervieweeName string `json:"intervieweeName"`
	CommuteType     string `json:"commuteType"`
	VisitorID       string `json:"memberId"`
	CreateDate      string `json:"createDate"`
	MeetingID       string `json:"meetingId"`
	TangentID       string `json:"tangentId"`
}

func GetVisitRecord

func GetVisitRecord(params *GetVisitRecordQuery) ([]VisitRecordInfo, int64, error)

Jump to

Keyboard shortcuts

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