Beispiel #1
0
// 保存实名认证信息
func (this *profileManagerImpl) SaveTrustedInfo(v *member.TrustedInfo) error {
	this.GetTrustedInfo()
	v.TrustImage = strings.TrimSpace(v.TrustImage)
	v.BodyNumber = strings.TrimSpace(v.BodyNumber)
	v.RealName = strings.TrimSpace(v.RealName)
	if len(v.TrustImage) == 0 || len(v.RealName) == 0 ||
		len(v.BodyNumber) == 0 {
		return member.ErrMissingTrustedInfo
	}
	this.copyTrustedInfo(v, this._trustedInfo)
	this._trustedInfo.IsHandle = 0 //标记为未处理
	this._trustedInfo.UpdateTime = time.Now().Unix()
	_, _, err := tmp.Db().GetOrm().Save(nil, this._trustedInfo)
	return err
}
Beispiel #2
0
// 拷贝认证信息
func (this *profileManagerImpl) copyTrustedInfo(src, dst *member.TrustedInfo) {
	dst.RealName = src.RealName
	dst.BodyNumber = src.BodyNumber
	dst.TrustImage = src.TrustImage
}