statistics_person.go 1.8 KB
package service

import (
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command"
)

// 个人端统计
type PersonStatisticsService struct {
}

// IndexStatistics  TODO:个人端 - 首页统计 (入口页面统计数据)
func (srv PersonStatisticsService) IndexStatistics(userMenusCommand *command.IndexStatisticsCommand) (interface{}, error) {
	//creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
	//	userMenusCommand.Operator)
	//resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
	//	UserId: int(userMenusCommand.Operator.UserId),
	//})
	//if err != nil {
	//	return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
	//}
	return map[string]interface{}{
		"overview": map[string]interface{}{
			"contractSum":        60,
			"contractStoppedSum": 70,
			"companySum":         6,
		},
		"dividendStatistics": map[string]interface{}{
			"creditAccount":     1000,
			"dividendsEstimate": 2000,
			"orderAmount":       7000,
		},
	}, nil
}

// CompanyStatistics  共创用户-共创企业统计
func (srv PersonStatisticsService) CompanyStatistics(userMenusCommand *command.CooperationPersonStatisticsCommand) (interface{}, error) {
	return map[string]interface{}{}, nil
}

// CompanyDividendStatistics  共创用户-共创企业分红统计
func (srv PersonStatisticsService) CompanyDividendStatistics(userMenusCommand *command.CooperationPersonStatisticsCommand) (interface{}, error) {
	return map[string]interface{}{}, nil
}

// CooperationProjectRecommend  猜你喜欢(共创项目)
func (srv PersonStatisticsService) CooperationProjectRecommend(userMenusCommand *command.GoodsStatisticsCommand) (interface{}, error) {
	return map[string]interface{}{}, nil
}