示例#1
0
文件: member.go 项目: jacobxk/go2o
func (this *memberClient) SaveBankInfo(memberId int, token string, v *member.BankInfo) error {
	var result jsv.Result
	err := this.conn.WriteAndDecode([]byte(fmt.Sprintf(
		`{"member_id":"%d","token":"%s","json":%s}>>Member.SaveBankInfo`,
		memberId, token, jsv.MarshalString(v))), &result, -1)
	if err != nil {
		return err
	}
	return err
}
示例#2
0
文件: member.go 项目: jacobxk/go2o
func (this *memberClient) SaveMember(m *member.ValueMember, token string) (b bool, err error) {
	var result jsv.Result
	err = this.conn.WriteAndDecode([]byte(fmt.Sprintf(
		`{"member_id":"%d","token":"%s","json":%s}>>Member.SaveMember`,
		m.Id, token, jsv.MarshalString(m))), &result, -1)
	if err != nil {
		return false, err
	}
	return result.Result, err
}
示例#3
0
文件: member.go 项目: jacobxk/go2o
func (this *memberClient) SaveDeliverAddr(memberId int, token string, e *member.DeliverAddress) (b bool, err error) {
	var result jsv.Result
	err = this.conn.WriteAndDecode([]byte(fmt.Sprintf(
		`{"member_id":"%d","token":"%s","json":%s}>>Member.SaveDeliverAddr`,
		memberId, token, jsv.MarshalString(e))), &result, -1)
	if err != nil {
		return false, err
	}
	return result.Result, err
}
示例#4
0
文件: partner.go 项目: jacobxk/go2o
//注册会员
func (this *partnerClient) RegisterMember(m *member.ValueMember, ptId, tgId int, cardId string) (
	b bool, err error) {
	var result jsv.Result
	err = this.conn.WriteAndDecode([]byte(fmt.Sprintf(
		`{"partner_id":"%d","tg_id":"%d","card_id":"%s","json":%s}>>Partner.RegisterMember`,
		ptId, tgId, cardId, jsv.MarshalString(m))), &result, -1)
	if err != nil {
		return false, err
	}
	return result.Result, err
}