Преглед изворни кода

wip:常用功能数量限制修改

wangkaiyue пре 1 година
родитељ
комит
61a09f3e6b
2 измењених фајлова са 3 додато и 3 уклоњено
  1. 2 2
      entity/workDesktop.go
  2. 1 1
      rpc/internal/logic/identitybyentuseridlogic.go

+ 2 - 2
entity/workDesktop.go

@@ -410,13 +410,13 @@ func CommonlyUpdate(in *pb.WorkDesktopComprehensiveReq) (B bool, M string) {
 		if mid == "" {
 			continue
 		}
+		//id 解密
+		ids = append(ids, encrypt.SE.DecodeString(mid))
 		mk++
 		//常用功能数量限制
 		if ConfigJson.CommonlySize > 0 && mk >= int(ConfigJson.CommonlySize) {
 			break
 		}
-		//id 解密
-		ids = append(ids, encrypt.SE.DecodeString(mid))
 	}
 	//更新此用户设置的常用功能
 	if B = BaseMysql.ExecTx("常用功能批量更新", func(tx *sql.Tx) bool {

+ 1 - 1
rpc/internal/logic/identitybyentuseridlogic.go

@@ -26,5 +26,5 @@ func NewIdentityByEntUserIdLogic(ctx context.Context, svcCtx *svc.ServiceContext
 
 // 根据企业员工id获取身份信息
 func (l *IdentityByEntUserIdLogic) IdentityByEntUserId(in *pb.IdentityReq) (*pb.Identity, error) {
-	return IdentityByEntUserId(entity.BaseMysql, in.Id), nil
+	return IdentityByEntUserId(entity.BaseMysql, &entity.Mgo, in.Id), nil
 }