Beispiel #1
0
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
}
Beispiel #2
0
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
}
Beispiel #3
0
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
}
Beispiel #4
0
//注册会员
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
}