Skip to content

Commit 435ea37

Browse files
committed
opt
1 parent 04ac7d2 commit 435ea37

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

services/groupservice.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"github.com/juggleim/commons/ctxs"
99
"github.com/juggleim/commons/errs"
1010
"github.com/juggleim/commons/imsdk"
11-
"github.com/juggleim/commons/tools"
1211
utils "github.com/juggleim/commons/tools"
1312
apimodels "github.com/juggleim/jugglechat-server/apis/models"
1413
"github.com/juggleim/jugglechat-server/storages"
@@ -512,7 +511,7 @@ func GroupConfirm(ctx context.Context, req *apimodels.GroupConfirm) errs.IMError
512511
appkey := ctxs.GetAppKeyFromCtx(ctx)
513512
//TODO check admin
514513
storage := storages.NewGrpApplicationStorage()
515-
id, err := tools.DecodeInt(req.ApplicationId)
514+
id, err := utils.DecodeInt(req.ApplicationId)
516515
if err != nil || id <= 0 {
517516
return errs.IMErrorCode_APP_REQ_BODY_ILLEGAL
518517
}
@@ -1008,7 +1007,7 @@ func QryGrpApplications(ctx context.Context, startTime int64, count int32, order
10081007
if err == nil {
10091008
grpInfo := GetGroupInfo(ctx, groupId)
10101009
for _, application := range applications {
1011-
idStr, _ := tools.EncodeInt(application.ID)
1010+
idStr, _ := utils.EncodeInt(application.ID)
10121011

10131012
ret.Items = append(ret.Items, &apimodels.GrpApplicationItem{
10141013
ApplicationId: idStr,

services/userservice.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"github.com/juggleim/commons/ctxs"
1111
"github.com/juggleim/commons/errs"
1212
"github.com/juggleim/commons/imsdk"
13-
"github.com/juggleim/commons/tools"
1413
utils "github.com/juggleim/commons/tools"
1514
apimodels "github.com/juggleim/jugglechat-server/apis/models"
1615
"github.com/juggleim/jugglechat-server/events"
@@ -387,15 +386,15 @@ func QryBlockUsers(ctx context.Context, limit int64, offset string) (errs.IMErro
387386
}
388387
var startId int64 = 0
389388
if offset != "" {
390-
intVal, err := tools.DecodeInt(offset)
389+
intVal, err := utils.DecodeInt(offset)
391390
if err == nil && intVal > 0 {
392391
startId = intVal
393392
}
394393
}
395394
users, err := storage.QryBlockUsers(appkey, userId, limit, startId)
396395
if err == nil {
397396
for _, user := range users {
398-
o, err := tools.EncodeInt(user.ID)
397+
o, err := utils.EncodeInt(user.ID)
399398
if err == nil && o != "" {
400399
ret.Offset = o
401400
}

0 commit comments

Comments
 (0)