@@ -33,7 +33,10 @@ type AccountAddSchema struct {
3333
3434// AccountAdd 添加客服账号
3535func (r * Client ) AccountAdd (options AccountAddOptions ) (info AccountAddSchema , err error ) {
36- data , err := util .HttpPost (fmt .Sprintf (accountAddAddr , r .accessToken ), options )
36+ target := fmt .Sprintf (accountAddAddr , r .accessToken )
37+ r .recordUpdate (target )
38+
39+ data , err := util .HttpPost (target , options )
3740 if err != nil {
3841 return info , err
3942 }
@@ -51,7 +54,10 @@ type AccountDelOptions struct {
5154
5255// AccountDel 删除客服账号
5356func (r * Client ) AccountDel (options AccountDelOptions ) (info BaseModel , err error ) {
54- data , err := util .HttpPost (fmt .Sprintf (accountDelAddr , r .accessToken ), options )
57+ target := fmt .Sprintf (accountDelAddr , r .accessToken )
58+ r .recordUpdate (target )
59+
60+ data , err := util .HttpPost (target , options )
5561 if err != nil {
5662 return info , err
5763 }
@@ -71,7 +77,10 @@ type AccountUpdateOptions struct {
7177
7278// AccountUpdate 修复客服账号
7379func (r * Client ) AccountUpdate (options AccountUpdateOptions ) (info BaseModel , err error ) {
74- data , err := util .HttpPost (fmt .Sprintf (accountUpdateAddr , r .accessToken ), options )
80+ target := fmt .Sprintf (accountUpdateAddr , r .accessToken )
81+ r .recordUpdate (target )
82+
83+ data , err := util .HttpPost (target , options )
7584 if err != nil {
7685 return info , err
7786 }
@@ -97,7 +106,10 @@ type AccountListSchema struct {
97106
98107// AccountList 获取客服账号列表
99108func (r * Client ) AccountList () (info AccountListSchema , err error ) {
100- data , err := util .HttpGet (fmt .Sprintf (accountListAddr , r .accessToken ))
109+ target := fmt .Sprintf (accountListAddr , r .accessToken )
110+ r .recordUpdate (target )
111+
112+ data , err := util .HttpGet (target )
101113 if err != nil {
102114 return info , err
103115 }
@@ -122,7 +134,10 @@ type AddContactWaySchema struct {
122134
123135// AddContactWay 获取客服账号链接
124136func (r * Client ) AddContactWay (options AddContactWayOptions ) (info AddContactWaySchema , err error ) {
125- data , err := util .HttpPost (fmt .Sprintf (addContactWayAddr , r .accessToken ), options )
137+ target := fmt .Sprintf (addContactWayAddr , r .accessToken )
138+ r .recordUpdate (target )
139+
140+ data , err := util .HttpPost (target , options )
126141 if err != nil {
127142 return info , err
128143 }
0 commit comments