|
@@ -31,7 +31,7 @@ func NewQwRefreshLogic(ctx context.Context, svcCtx *svc.ServiceContext) *QwRefre
|
|
|
}
|
|
|
|
|
|
func (l *QwRefreshLogic) QwRefresh() (resp *types.BaseMsgResp, err error) {
|
|
|
- var result types.WorkPhoneGetWeChatsResp
|
|
|
+ var result types.WeworkGetResp
|
|
|
client := req.C().DevMode()
|
|
|
client.SetCommonRetryCount(2).
|
|
|
SetCommonRetryBackoffInterval(1*time.Second, 5*time.Second).
|
|
@@ -47,12 +47,12 @@ func (l *QwRefreshLogic) QwRefresh() (resp *types.BaseMsgResp, err error) {
|
|
|
}
|
|
|
|
|
|
for _, account := range result.Data {
|
|
|
- if account.Wechatid == "" {
|
|
|
+ if account.WxId == "" {
|
|
|
continue
|
|
|
}
|
|
|
wxinfo, err := l.svcCtx.DB.Wx.Query().
|
|
|
Where(
|
|
|
- wx.WxidEQ(account.Wechatid),
|
|
|
+ wx.WxidEQ(account.WxId),
|
|
|
wx.Ctype(3),
|
|
|
).
|
|
|
Only(l.ctx)
|
|
@@ -71,8 +71,8 @@ func (l *QwRefreshLogic) QwRefresh() (resp *types.BaseMsgResp, err error) {
|
|
|
SetServerID(0).
|
|
|
SetPort(account.Deviceid).
|
|
|
SetProcessID(strconv.FormatInt(account.Cid, 10)).
|
|
|
- SetAccount(account.Wechatno).
|
|
|
- SetNickname(account.Wechatnick).
|
|
|
+ SetAccount("").
|
|
|
+ SetNickname(account.Name).
|
|
|
SetHeadBig(account.Avatar).
|
|
|
SetStatus(status).
|
|
|
Exec(l.ctx)
|
|
@@ -86,10 +86,10 @@ func (l *QwRefreshLogic) QwRefresh() (resp *types.BaseMsgResp, err error) {
|
|
|
SetServerID(0).
|
|
|
SetPort(account.Deviceid).
|
|
|
SetProcessID(strconv.FormatInt(account.Cid, 10)).
|
|
|
- SetWxid(account.Wechatid).
|
|
|
- SetAccount(account.Wechatno).
|
|
|
+ SetWxid(account.WxId).
|
|
|
+ SetAccount("").
|
|
|
SetHeadBig(account.Avatar).
|
|
|
- SetNickname(account.Wechatnick).
|
|
|
+ SetNickname(account.Name).
|
|
|
SetStatus(status).
|
|
|
SetAllowList([]string{}).SetBlockList([]string{}).SetGroupAllowList([]string{}).SetGroupBlockList([]string{}).
|
|
|
Save(l.ctx)
|