agentmgr.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. package agent
  2. var mgr *agentManager
  3. type agentManager struct {
  4. }
  5. func Run() {
  6. mgr = new(agentManager)
  7. }
  8. // 配置信息
  9. func (this *agentManager) getConfig() *configInfo {
  10. return getConfig()
  11. }
  12. // 修改配置
  13. func (this *agentManager) updateConfig(req *configUp_in) {
  14. updateConfig(req)
  15. }
  16. // 代理列表
  17. func (this *agentManager) getAgentList(req *request_base, sortType int) *agentList_out {
  18. return getAgentList(req)
  19. }
  20. // 申请列表
  21. func (this *agentManager) getApplyList(req *request_base) *applyList_out {
  22. return getAgentApplyList(req)
  23. }
  24. // 处理申请
  25. func (this *agentManager) dealApply(req *dealApply_req) int {
  26. return dealApply(req)
  27. }
  28. // 会员列表
  29. func (this *agentManager) getMemberList(req *request_base) *memberInfo_out {
  30. return getMemberList(req)
  31. }
  32. // 佣金日志
  33. func (this *agentManager) getCommissionLog(req *request_base) *commissionInfo_out {
  34. return getCommissionLog(req)
  35. }
  36. // 佣金排行榜
  37. func (this *agentManager) getCommissionRankList(userId int, beginTime, endTime string) []*commissionRankInfo {
  38. return getCommissionRankList(userId, beginTime, endTime)
  39. }
  40. // 创建代理
  41. func (this *agentManager) createAgent(opUserID int, opUserName string, userId, grade int, ipAddress string) int {
  42. return createAgent(opUserID, opUserName, userId, grade, ipAddress)
  43. }
  44. // 设置代理状态
  45. func (this *agentManager) setStatus(opUserID int, opUserName string, userId, enabled int) {
  46. setStatus(opUserID, opUserName, userId, enabled)
  47. }