Documentation ¶
Index ¶
- Constants
- Variables
- func AddUserInTeethlink(user schema.User) (uint64, error)
- func CreateOrderInTeethlink(item schema.AccountChange, id uint64, memberID uint64) error
- func UpdateUserAccountInTeethlink(id uint64, userAccount UserAccount) error
- type AgentConfigSrv
- func (a *AgentConfigSrv) Create(ctx context.Context, item schema.AgentConfig) (*schema.IDResult, error)
- func (a *AgentConfigSrv) Delete(ctx context.Context, userID uint64) error
- func (a *AgentConfigSrv) Get(ctx context.Context, id uint64, opts ...schema.AgentConfigQueryOptions) (*schema.AgentConfig, error)
- func (a *AgentConfigSrv) Query(ctx context.Context, params schema.AgentConfigQueryParam, ...) (*schema.AgentConfigQueryResult, error)
- func (a *AgentConfigSrv) Update(ctx context.Context, id uint64, item schema.AgentConfig) error
- func (a *AgentConfigSrv) UpdateStatus(ctx context.Context, id uint64, status int) error
- type AgentSrv
- type DomainSrv
- func (a *DomainSrv) Create(ctx context.Context, item schema.Domain) (*schema.IDResult, error)
- func (a *DomainSrv) Delete(ctx context.Context, id uint64) error
- func (a *DomainSrv) Get(ctx context.Context, id uint64, opts ...schema.DomainQueryOptions) (*schema.Domain, error)
- func (a *DomainSrv) Query(ctx context.Context, params schema.DomainQueryParam, ...) (*schema.DomainQueryResult, error)
- func (a *DomainSrv) Update(ctx context.Context, id uint64, item schema.Domain) error
- func (a *DomainSrv) UpdateStatus(ctx context.Context, id uint64, status int) error
- type IDResult
- type LoginSrv
- func (a *LoginSrv) DestroyToken(ctx context.Context, tokenString string) error
- func (a *LoginSrv) GenerateToken(ctx context.Context, memberID string) (*schema.LoginTokenInfo, error)
- func (a *LoginSrv) GetCaptcha(ctx context.Context, length int) (*schema.LoginCaptcha, error)
- func (a *LoginSrv) GetLoginInfo(ctx context.Context, memberID uint64) (*schema.MemberLoginInfo, error)
- func (a *LoginSrv) QueryMemberMenuTree(ctx context.Context, memberID, domainID uint64) (schema.MenuTrees, error)
- func (a *LoginSrv) ResCaptcha(ctx context.Context, w http.ResponseWriter, captchaID string, ...) error
- func (a *LoginSrv) UpdatePassword(ctx context.Context, userID uint64, params schema.UpdatePasswordParam) error
- func (a *LoginSrv) Verify(ctx context.Context, memberName, password string, domainID uint64) (*schema.Member, error)
- type MemberSrv
- func (a *MemberSrv) Create(ctx context.Context, item schema.Member) (*schema.IDResult, error)
- func (a *MemberSrv) Delete(ctx context.Context, userID, domainID uint64) error
- func (a *MemberSrv) DeleteByDomainID(ctx context.Context, id uint64) error
- func (a *MemberSrv) Get(ctx context.Context, id uint64, opts ...schema.MemberQueryOptions) (*schema.Member, error)
- func (a *MemberSrv) Query(ctx context.Context, params schema.MemberQueryParam, ...) (*schema.MemberQueryResult, error)
- func (a *MemberSrv) QueryShow(ctx context.Context, params schema.MemberQueryParam, ...) (*schema.MemberShowQueryResult, error)
- func (a *MemberSrv) Update(ctx context.Context, id uint64, item schema.Member) error
- func (a *MemberSrv) UpdateAgentPart(ctx context.Context, id uint64, item schema.AgentUpdate) error
- func (a *MemberSrv) UpdateStatus(ctx context.Context, id, domainID uint64, status int) error
- type MenuSrv
- func (a *MenuSrv) Create(ctx context.Context, item schema.Menu) (*schema.IDResult, error)
- func (a *MenuSrv) Delete(ctx context.Context, id uint64) error
- func (a *MenuSrv) Get(ctx context.Context, id uint64, opts ...schema.MenuQueryOptions) (*schema.Menu, error)
- func (a *MenuSrv) InitData(ctx context.Context, dataFile string) error
- func (a *MenuSrv) Query(ctx context.Context, params schema.MenuQueryParam, ...) (*schema.MenuQueryResult, error)
- func (a *MenuSrv) QueryActions(ctx context.Context, id uint64) (schema.MenuActions, error)
- func (a *MenuSrv) Update(ctx context.Context, id uint64, item schema.Menu) error
- func (a *MenuSrv) UpdateStatus(ctx context.Context, id uint64, status int) error
- type Order
- type OrderType
- type RoleSrv
- func (a *RoleSrv) Create(ctx context.Context, item schema.Role) (*schema.IDResult, error)
- func (a *RoleSrv) Delete(ctx context.Context, id, domainID uint64) error
- func (a *RoleSrv) DeleteByDomainID(ctx context.Context, id uint64) error
- func (a *RoleSrv) Get(ctx context.Context, id, domainID uint64, opts ...schema.RoleQueryOptions) (*schema.Role, error)
- func (a *RoleSrv) Query(ctx context.Context, params schema.RoleQueryParam, ...) (*schema.RoleQueryResult, error)
- func (a *RoleSrv) QueryRoleMenus(ctx context.Context, roleID uint64) (schema.RoleMenus, error)
- func (a *RoleSrv) QueryShows(ctx context.Context, params schema.RoleQueryParam, ...) (*schema.RoleShowQueryResult, error)
- func (a *RoleSrv) Update(ctx context.Context, id, domainID uint64, item schema.Role) error
- func (a *RoleSrv) UpdateStatus(ctx context.Context, id, domainID uint64, status int) error
- type UserAccount
- type UserMobile
- type UserSrv
- func (a *UserSrv) Create(ctx context.Context, item schema.User) (*schema.IDResult, error)
- func (a *UserSrv) Delete(ctx context.Context, userID uint64) error
- func (a *UserSrv) Get(ctx context.Context, id uint64, opts ...schema.UserQueryOptions) (*schema.User, error)
- func (a *UserSrv) GetByTeethlinkID(ctx context.Context, id uint64) (*schema.User, error)
- func (a *UserSrv) Query(ctx context.Context, params schema.UserQueryParam, ...) (*schema.UserShowQueryResult, error)
- func (a *UserSrv) Update(ctx context.Context, id uint64, item schema.User) error
- func (a *UserSrv) UpdateAccount(ctx context.Context, id uint64, item schema.AccountChange) error
- func (a *UserSrv) UpdateStatus(ctx context.Context, id uint64, status int) error
- type UsertagSrv
- func (a *UsertagSrv) Create(ctx context.Context, item schema.Usertag) (*schema.IDResult, error)
- func (a *UsertagSrv) Delete(ctx context.Context, userID uint64) error
- func (a *UsertagSrv) Get(ctx context.Context, id uint64, opts ...schema.UsertagQueryOptions) (*schema.Usertag, error)
- func (a *UsertagSrv) Query(ctx context.Context, params schema.UsertagQueryParam, ...) (*schema.UsertagQueryResult, error)
- func (a *UsertagSrv) Update(ctx context.Context, id uint64, item schema.Usertag) error
- func (a *UsertagSrv) UpdateStatus(ctx context.Context, id uint64, status int) error
Constants ¶
View Source
const DomainAdminRole = "admin"
Variables ¶
View Source
var AgentConfigSet = wire.NewSet(wire.Struct(new(AgentConfigSrv), "*"))
View Source
var ServiceSet = wire.NewSet( MenuSet, RoleSet, MemberSet, LoginSet, DomainSet, UserSet, UsertagSet, AgentConfigSet, AgentSet, ) // end
View Source
var UsertagSet = wire.NewSet(wire.Struct(new(UsertagSrv), "*"))
Functions ¶
func CreateOrderInTeethlink ¶
func CreateOrderInTeethlink(item schema.AccountChange, id uint64, memberID uint64) error
func UpdateUserAccountInTeethlink ¶
func UpdateUserAccountInTeethlink(id uint64, userAccount UserAccount) error
Types ¶
type AgentConfigSrv ¶
type AgentConfigSrv struct { TransRepo *dao.TransRepo AgentConfigRepo *dao.AgentConfigRepo }
func (*AgentConfigSrv) Create ¶
func (a *AgentConfigSrv) Create(ctx context.Context, item schema.AgentConfig) (*schema.IDResult, error)
func (*AgentConfigSrv) Delete ¶
func (a *AgentConfigSrv) Delete(ctx context.Context, userID uint64) error
func (*AgentConfigSrv) Get ¶
func (a *AgentConfigSrv) Get(ctx context.Context, id uint64, opts ...schema.AgentConfigQueryOptions) (*schema.AgentConfig, error)
func (*AgentConfigSrv) Query ¶
func (a *AgentConfigSrv) Query(ctx context.Context, params schema.AgentConfigQueryParam, opts ...schema.AgentConfigQueryOptions) (*schema.AgentConfigQueryResult, error)
func (*AgentConfigSrv) Update ¶
func (a *AgentConfigSrv) Update(ctx context.Context, id uint64, item schema.AgentConfig) error
func (*AgentConfigSrv) UpdateStatus ¶
type AgentSrv ¶
type AgentSrv struct { TransRepo *dao.TransRepo MemberRepo *dao.MemberRepo UserRepo *dao.UserRepo AgentConfigRepo *dao.AgentConfigRepo }
func (*AgentSrv) QueryOrderInfoFromClient ¶
func (*AgentSrv) QueryShow ¶
func (a *AgentSrv) QueryShow(ctx context.Context, params schema.MemberQueryParam, opts ...schema.MemberQueryOptions) (*schema.AgentShowQueryResult, error)
type DomainSrv ¶
type DomainSrv struct { Enforcer *casbin.SyncedEnforcer RoleSrv *RoleSrv MemberSrv *MemberSrv TransRepo *dao.TransRepo DomainRepo *dao.DomainRepo MenuActionRepo *dao.MenuActionRepo MemberRoleRepo *dao.MemberRoleRepo }
func (*DomainSrv) Query ¶
func (a *DomainSrv) Query(ctx context.Context, params schema.DomainQueryParam, opts ...schema.DomainQueryOptions) (*schema.DomainQueryResult, error)
type LoginSrv ¶
type LoginSrv struct { Auth auth.Auther MemberRepo *dao.MemberRepo MemberRoleRepo *dao.MemberRoleRepo RoleRepo *dao.RoleRepo RoleMenuRepo *dao.RoleMenuRepo MenuRepo *dao.MenuRepo DomainRepo *dao.DomainRepo MenuActionRepo *dao.MenuActionRepo }
func (*LoginSrv) DestroyToken ¶
func (*LoginSrv) GenerateToken ¶
func (*LoginSrv) GetCaptcha ¶
func (*LoginSrv) GetLoginInfo ¶
func (*LoginSrv) QueryMemberMenuTree ¶
func (*LoginSrv) ResCaptcha ¶
func (*LoginSrv) UpdatePassword ¶
type MemberSrv ¶
type MemberSrv struct { Enforcer *casbin.SyncedEnforcer TransRepo *dao.TransRepo MemberRepo *dao.MemberRepo MemberRoleRepo *dao.MemberRoleRepo RoleRepo *dao.RoleRepo }
func (*MemberSrv) DeleteByDomainID ¶
func (*MemberSrv) Query ¶
func (a *MemberSrv) Query(ctx context.Context, params schema.MemberQueryParam, opts ...schema.MemberQueryOptions) (*schema.MemberQueryResult, error)
func (*MemberSrv) QueryShow ¶
func (a *MemberSrv) QueryShow(ctx context.Context, params schema.MemberQueryParam, opts ...schema.MemberQueryOptions) (*schema.MemberShowQueryResult, error)
func (*MemberSrv) UpdateAgentPart ¶
UpdateAgentPart 更新agent部分的数据
type MenuSrv ¶
type MenuSrv struct { TransRepo *dao.TransRepo MenuRepo *dao.MenuRepo MenuActionRepo *dao.MenuActionRepo MenuActionResourceRepo *dao.MenuActionResourceRepo }
func (*MenuSrv) Query ¶
func (a *MenuSrv) Query(ctx context.Context, params schema.MenuQueryParam, opts ...schema.MenuQueryOptions) (*schema.MenuQueryResult, error)
func (*MenuSrv) QueryActions ¶
type Order ¶
type Order struct { Id uint64 `json:"id,string"` // 唯一标识 Status *int `json:"status" binding:"required,max=1,min=0"` // 用户状态(1:启用 0:停用) PayTypeCode string `json:"pay_type_code"` //支付产品编码 PayTypeName string `json:"pay_type_name"` //支付产品名称 OrderKind OrderType `json:"order_kind"` //订单类型 OrderAmount float32 `json:"order_amount"` //订单提交的金额 FactAmount float64 `json:"fact_amount"` //用户实际支付金额 Discount float64 `json:"discount"` // 该订单的折扣 CreatedAt time.Time `json:"created_at"` // 创建时间 ReturnUrl string `json:"return_url"` //支付完跳转地址 AccountID uint64 `json:"account_id,string"` //账户ID MemberID uint64 `json:"member_id"` // 产生订单时,他的经销商ID OrderStaus string `json:"order_staus"` //订单的状态 Origin *int `json:"origin" form:"origin"` // origin 0. 自己;1. 其他平台 }
type RoleSrv ¶
type RoleSrv struct { Enforcer *casbin.SyncedEnforcer TransRepo *dao.TransRepo RoleRepo *dao.RoleRepo RoleMenuRepo *dao.RoleMenuRepo UserRepo *dao.MemberRepo MenuActionResourceRepo *dao.MenuActionResourceRepo RoleMemberRepo *dao.MemberRoleRepo }
func (*RoleSrv) DeleteByDomainID ¶
func (*RoleSrv) Query ¶
func (a *RoleSrv) Query(ctx context.Context, params schema.RoleQueryParam, opts ...schema.RoleQueryOptions) (*schema.RoleQueryResult, error)
func (*RoleSrv) QueryRoleMenus ¶
func (*RoleSrv) QueryShows ¶
func (a *RoleSrv) QueryShows(ctx context.Context, params schema.RoleQueryParam, opts ...schema.RoleQueryOptions) (*schema.RoleShowQueryResult, error)
type UserAccount ¶
type UserAccount struct { Mobile string `form:"mobile" json:"mobile" binding:"required"` UserName string `form:"username" json:"username" binding:"required"` Passwd string `form:"passwd" json:"passwd" binding:"max=20,min=0"` Money *float32 `form:"money" json:"money" binding:"numeric"` Origin *int `json:"origin" form:"origin" binding:"numeric"` // origin 0. 自己;1. 其他平台 Status *int `json:"status" form:"money" binding:"numeric"` MemberID uint64 `json:"member_id" form:"member_id"` }
type UserMobile ¶
type UserMobile struct { Mobile string `form:"mobile" json:"mobile" binding:"required"` UserName string `form:"username" json:"username" binding:"required"` Passwd string `form:"passwd" json:"passwd" binding:"required,max=20,min=6"` Code string `form:"code" json:"code" binding:"required,len=6"` Type *int `form:"type" json:"type" binding:"numeric"` Country string `form:"country" json:"country" binding:"required"` Money *float32 `form:"money" json:"money" binding:"numeric"` Origin *int `json:"origin" form:"origin" binding:"numeric"` // origin 0. 自己;1. 其他平台 MemberID uint64 `json:"member_id,string" form:"member_id"` }
UserMobile 这个实际是copy自teethlink,考虑要不要import
type UserSrv ¶
type UserSrv struct { TransRepo *dao.TransRepo UserRepo *dao.UserRepo UsertagRepo *dao.UsertagRepo }
func (*UserSrv) GetByTeethlinkID ¶
func (*UserSrv) Query ¶
func (a *UserSrv) Query(ctx context.Context, params schema.UserQueryParam, opts ...schema.UserQueryOptions) (*schema.UserShowQueryResult, error)
func (*UserSrv) UpdateAccount ¶
type UsertagSrv ¶
type UsertagSrv struct { Enforcer *casbin.SyncedEnforcer TransRepo *dao.TransRepo UsertagRepo *dao.UsertagRepo }
func (*UsertagSrv) Get ¶
func (a *UsertagSrv) Get(ctx context.Context, id uint64, opts ...schema.UsertagQueryOptions) (*schema.Usertag, error)
func (*UsertagSrv) Query ¶
func (a *UsertagSrv) Query(ctx context.Context, params schema.UsertagQueryParam, opts ...schema.UsertagQueryOptions) (*schema.UsertagQueryResult, error)
func (*UsertagSrv) UpdateStatus ¶
Click to show internal directories.
Click to hide internal directories.