go-common/app/job/main/member/service/member.go
2019-04-22 18:49:16 +08:00

25 lines
404 B
Go

package service
import (
"context"
"go-common/library/log"
)
// setName set user name.
func (s *Service) setName(mid int64) (err error) {
var (
name string
)
if name, err = s.dao.Name(context.TODO(), mid); err != nil {
log.Error("s.dao.Name(%d) error(%v)", mid, err)
return
}
if len(name) > 0 {
if err = s.dao.SetName(context.TODO(), mid, name); err != nil {
return
}
}
return
}