作者 yangfu

用户禁用

@@ -49,6 +49,9 @@ func (l *MiniUserApplyJoinCompanyLogic) MiniUserApplyJoinCompany(req *types.Mini @@ -49,6 +49,9 @@ func (l *MiniUserApplyJoinCompanyLogic) MiniUserApplyJoinCompany(req *types.Mini
49 return nil, xerr.NewErrMsgErr("申请失败", err) 49 return nil, xerr.NewErrMsgErr("申请失败", err)
50 } 50 }
51 if user != nil { 51 if user != nil {
  52 + if user.Enable != domain.UserEnable {
  53 + return nil, xerr.NewErrMsgErr("账号不可用", err)
  54 + }
52 token, err = generateToken(l.svcCtx, user) 55 token, err = generateToken(l.svcCtx, user)
53 if err != nil { 56 if err != nil {
54 return nil, xerr.NewErrMsgErr("登录失败", err) 57 return nil, xerr.NewErrMsgErr("登录失败", err)
@@ -74,3 +74,19 @@ CREATE INDEX IF NOT EXISTS idx_message_system_company_id ON "public"."message_sy @@ -74,3 +74,19 @@ CREATE INDEX IF NOT EXISTS idx_message_system_company_id ON "public"."message_sy
74 -- 业务消息表 74 -- 业务消息表
75 -- (公司ID)索引 75 -- (公司ID)索引
76 CREATE INDEX IF NOT EXISTS idx_message_business_company_id ON "public"."message_business" USING btree(company_id); 76 CREATE INDEX IF NOT EXISTS idx_message_business_company_id ON "public"."message_business" USING btree(company_id);
  77 +
  78 +
  79 +-- 迁移准备
  80 +-- 修改起始的id序号
  81 +select setval('user_id_seq',10000);
  82 +select setval('department_id_seq',10000);
  83 +select setval('role_id_seq',10000);
  84 +select setval('company_id_seq',10000);
  85 +
  86 +select setval('article_id_seq',100000);
  87 +select setval('article_and_tag_id_seq',100000);
  88 +select setval('article_backup_id_seq',100000);
  89 +select setval('article_comment_id_seq',100000);
  90 +select setval('article_draft_id_seq',100000);
  91 +select setval('article_section_id_seq',100000);
  92 +select setval('article_tag_id_seq',100000);