作者 yangfu

修改:分红占比计算修改,公司简称

... ... @@ -8,6 +8,8 @@ type Company struct {
Id int64 `json:"id"`
// 名称
Name string `json:"name"`
// 公司简称
Abbreviation string `json:"abbreviation"`
// 手机号码
Phone string `json:"phone"`
// 公司logo
... ...
... ... @@ -117,8 +117,8 @@ func (svr *PgLoginService) PartnerStaticInfo() (interface{}, error) {
bonus, _ := OrderDao.OrderBonusStatics(domain.OrderBonusQuery{PartnerId: partner.Id, OrderType: domain.OrderReal})
item := &Company{
CompanyBase: newCompanyBase(c),
IncomePercent: computeBonusPercent(totalBonus.Bonus*100, bonus.Bonus),
DividendMoney: bonus.Bonus,
IncomePercent: computeBonusPercent(totalBonus.Bonus, bonus.Bonus*100),
DividendMoney: utils.Decimal(bonus.Bonus),
JoinWays: svr.GetJoinWays(allPartnerCategory, partner, bonus.Bonus),
}
//当所有公司的总收入都为0时,
... ... @@ -252,7 +252,7 @@ func newCompanyBase(company *domain.Company) protocol.CompanyBase {
return protocol.CompanyBase{
Id: company.Id,
Name: company.Name,
ShortName: "TODO",
ShortName: company.Abbreviation,
Image: protocol.NewImage(company.Logo),
Phone: company.Phone,
}
... ...
... ... @@ -9,6 +9,8 @@ type Company struct {
Id int64
// 名称
Name string
// 公司简称
Abbreviation string
// 手机号码
Phone string
// 公司logo
... ...