本文整理汇总了Golang中go2o/core/domain/interface/member.IMember.Profile方法的典型用法代码示例。如果您正苦于以下问题:Golang IMember.Profile方法的具体用法?Golang IMember.Profile怎么用?Golang IMember.Profile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类go2o/core/domain/interface/member.IMember
的用法示例。
在下文中一共展示了IMember.Profile方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: backFor3R
// 三级返现
func (o *subOrderImpl) backFor3R(mch merchant.IMerchant, m member.IMember,
back_fee float32, unixTime int64) (err error) {
if back_fee > 0 {
i := 0
mName := m.Profile().GetProfile().Name
saleConf := mch.ConfManager().GetSaleConf()
percent := saleConf.CashBackTg2Percent
for i < 2 {
rl := m.GetRelation()
if rl == nil || rl.RefereesId == 0 {
break
}
m = o._memberRep.GetMember(rl.RefereesId)
if m == nil {
break
}
if i == 1 {
percent = saleConf.CashBackTg1Percent
}
err = o.updateMemberAccount(m, mch.GetValue().Name, mName,
back_fee*percent, unixTime)
if err != nil {
domain.HandleError(err, "domain")
break
}
i++
}
}
return err
}
示例2: GetMemberSummary
// 获取会员汇总信息
func (this *memberService) GetMemberSummary(memberId int) *dto.MemberSummary {
var m member.IMember = this._rep.GetMember(memberId)
if m != nil {
mv := m.GetValue()
acv := m.GetAccount().GetValue()
lv := m.GetLevel()
pro := m.Profile().GetProfile()
return &dto.MemberSummary{
Id: m.GetAggregateRootId(),
Usr: mv.Usr,
Name: pro.Name,
Avatar: format.GetResUrl(pro.Avatar),
Exp: mv.Exp,
Level: mv.Level,
LevelName: lv.Name,
Integral: acv.Integral,
Balance: acv.Balance,
PresentBalance: acv.PresentBalance,
GrowBalance: acv.GrowBalance,
GrowAmount: acv.GrowAmount,
GrowEarnings: acv.GrowEarnings,
GrowTotalEarnings: acv.GrowTotalEarnings,
UpdateTime: mv.UpdateTime,
}
}
return nil
}
示例3: GetSettleData
// 获取结算数据
func (this *cartImpl) GetSettleData() (s shop.IShop, d member.IDeliverAddress,
paymentOpt, deliverOpt int) {
//var err error
if this._value.ShopId > 0 && this._shop == nil {
//var pt merchant.IMerchant
//pt, err = this._partnerRep.GetMerchant(this._merchantId)
//if err == nil {
// this._shop = pt.ShopManager().GetShop(this._value.ShopId)
//}
//todo: not implement
}
if this._value.DeliverId > 0 && this._deliver == nil {
var m member.IMember
m = this._memberRep.GetMember(this._value.BuyerId)
if m != nil {
this._deliver = m.Profile().GetDeliver(this._value.DeliverId)
}
}
return this._shop, this._deliver, this._value.PaymentOpt, this._value.DeliverOpt
}
示例4: SettlePersist
// 结算数据持久化
func (this *cartImpl) SettlePersist(shopId, paymentOpt, deliverOpt, deliverId int) error {
//var shop shop.IShop
var deliver member.IDeliverAddress
var err error
if shopId > 0 {
//var mch merchant.IMerchant
//mch, err = this._partnerRep.GetMerchant(this._merchantId)
//if err != nil {
// return err
//}
//shop = mch.ShopManager().GetShop(shopId)
//if shop == nil {
// return merchant.ErrNoSuchShop
//}
//this._shop = shop
//this._value.ShopId = shopId
//todo: not implement
return err
}
if this._value.BuyerId > 0 && deliverId > 0 {
var m member.IMember = this._memberRep.GetMember(this._value.BuyerId)
if m == nil {
return member.ErrNoSuchMember
}
deliver = m.Profile().GetDeliver(deliverId)
if deliver == nil {
return member.ErrInvalidSession
}
this._deliver = deliver
this._value.DeliverId = deliverId
}
this._value.PaymentOpt = paymentOpt
this._value.DeliverOpt = deliverOpt
return nil
}