Browse Source

chore(miniapp): remove group and cssg1 star shortcuts

apple 21 hours ago
parent
commit
21c9fd9526

+ 84 - 0
docs/24_星级班班主任移动报表/2026-12-01_小程序团体入口与cssg1星级班入口移除记录.md

@@ -0,0 +1,84 @@
+# 2026-12-01 小程序团体入口与 cssg1 星级班入口移除记录
+
+## 1. 实施结论
+
+已同时处理测试环境 `PMS_TEST` 和正式环境 `C##DC`:
+
+| 项目 | 测试环境 | 正式环境 |
+|---|---:|---:|
+| 小程序“团体”快捷入口剩余 | 0 | 0 |
+| `cssg1` 个人“星级班”入口剩余 | 0 | 0 |
+| 其他账号星级班入口 | 保留 | 保留 |
+| 团体业务和 PC 团体菜单 | 保留 | 保留 |
+
+本次只移除小程序快捷入口,不删除团体业务数据,也不修改宿管岗位或其他账号的星级班服务权限。
+
+## 2. 删除的入口
+
+### 2.1 团体入口
+
+按 `GRJJ.DXM='xsh'` 删除全部小程序“团体”入口。
+
+测试环境删除 3 条:
+
+```text
+106185  宿管模板
+106387  教官模板
+106228  cssg1 个人入口
+```
+
+正式环境删除 3 条:
+
+```text
+106185  宿管模板
+106287  教官模板
+106268  cssg1 个人入口
+```
+
+### 2.2 cssg1 星级班入口
+
+只删除 `cssg1` 的个人快捷入口:
+
+```text
+测试环境:GRJJID=106247
+正式环境:GRJJID=106272
+```
+
+条件为:
+
+```text
+YYRYID=111157142
+BJM=mp_bj_starClassSummary
+```
+
+没有修改宿管岗位 `1015504` 的共享权限,也没有删除其他账号或模板的星级班入口。
+
+## 3. 备份
+
+```text
+PMS_TEST.BAK_20261201_GRJJ_GROUP_STAR_REMOVE
+C##DC.BAK_20261201_GRJJ_GROUP_STAR_REMOVE
+```
+
+两个备份表各保存 4 条原入口记录。
+
+## 4. 验证结果
+
+```text
+PROD  GROUP_ENTRIES=0  CSSG1_STAR=0  ALL_STAR=3
+TEST  GROUP_ENTRIES=0  CSSG1_STAR=0  ALL_STAR=3
+```
+
+`ALL_STAR=3` 表示其他账号和模板的星级班入口仍保留。
+
+## 5. 生效方式
+
+小程序快捷入口在登录时重新读取。已经登录的用户需要退出小程序并重新登录后,入口列表才会刷新;不需要重新发布小程序版本。
+
+## 6. 脚本
+
+```text
+docs/24_星级班班主任移动报表/sql/2026-12-01_移除小程序团体入口与cssg1星级班入口.sql
+docs/24_星级班班主任移动报表/sql/2026-12-01_移除小程序团体入口与cssg1星级班入口_验证.sql
+docs/24_星级班班主任移动报表/sql/2026-12-01_移除小程序团体入口与cssg1星级班入口_回滚.sql
+```

+ 69 - 0
docs/24_星级班班主任移动报表/sql/2026-12-01_移除小程序团体入口与cssg1星级班入口.sql

@@ -0,0 +1,69 @@
+set define off
+set serveroutput on
+whenever sqlerror exit sql.sqlcode
+
+alter session set container=ORCLPDB;
+
+-- 正式环境备份
+create table C##DC.BAK_20261201_GRJJ_GROUP_STAR_REMOVE as
+select *
+  from C##DC.GRJJ
+ where DXM = 'xsh'
+    or (YYRYID = 111157142 and BJM = 'mp_bj_starClassSummary');
+
+-- 测试环境备份
+create table PMS_TEST.BAK_20261201_GRJJ_GROUP_STAR_REMOVE as
+select *
+  from PMS_TEST.GRJJ
+ where DXM = 'xsh'
+    or (YYRYID = 111157142 and BJM = 'mp_bj_starClassSummary');
+
+declare
+  v_group_count number;
+  v_star_count number;
+begin
+  -- 移除全部小程序“团体”快捷入口,不删除团体业务和权限。
+  delete from C##DC.GRJJ where DXM = 'xsh';
+  v_group_count := sql%rowcount;
+  if v_group_count <> 3 then
+    raise_application_error(-20001, '正式环境团体入口删除数量异常: ' || v_group_count);
+  end if;
+
+  -- 只移除 cssg1 的个人“星级班”入口,保留其他账号和模板入口。
+  delete from C##DC.GRJJ
+   where YYRYID = 111157142
+     and BJM = 'mp_bj_starClassSummary';
+  v_star_count := sql%rowcount;
+  if v_star_count <> 1 then
+    raise_application_error(-20002, '正式环境cssg1星级班入口删除数量异常: ' || v_star_count);
+  end if;
+
+  delete from PMS_TEST.GRJJ where DXM = 'xsh';
+  v_group_count := sql%rowcount;
+  if v_group_count <> 3 then
+    raise_application_error(-20003, '测试环境团体入口删除数量异常: ' || v_group_count);
+  end if;
+
+  delete from PMS_TEST.GRJJ
+   where YYRYID = 111157142
+     and BJM = 'mp_bj_starClassSummary';
+  v_star_count := sql%rowcount;
+  if v_star_count <> 1 then
+    raise_application_error(-20004, '测试环境cssg1星级班入口删除数量异常: ' || v_star_count);
+  end if;
+end;
+/
+
+commit;
+
+select 'PROD_GROUP' ITEM, count(*) CNT from C##DC.GRJJ where DXM='xsh'
+union all
+select 'PROD_CSSG1_STAR', count(*) from C##DC.GRJJ
+ where YYRYID=111157142 and BJM='mp_bj_starClassSummary'
+union all
+select 'TEST_GROUP', count(*) from PMS_TEST.GRJJ where DXM='xsh'
+union all
+select 'TEST_CSSG1_STAR', count(*) from PMS_TEST.GRJJ
+ where YYRYID=111157142 and BJM='mp_bj_starClassSummary';
+
+exit;

+ 29 - 0
docs/24_星级班班主任移动报表/sql/2026-12-01_移除小程序团体入口与cssg1星级班入口_回滚.sql

@@ -0,0 +1,29 @@
+set define off
+whenever sqlerror exit sql.sqlcode
+
+alter session set container=ORCLPDB;
+
+insert into C##DC.GRJJ (
+       GRJJID, GRJJMBID, YYRYID, XH, MC, BJM, TBM, DXM,
+       FWM, JLZTM, CJRYID, GLRYID, GLBMID, FWSBLBM, GNM, ZTFWM
+)
+select GRJJID, GRJJMBID, YYRYID, XH, MC, BJM, TBM, DXM,
+       FWM, JLZTM, CJRYID, GLRYID, GLBMID, FWSBLBM, GNM, ZTFWM
+  from C##DC.BAK_20261201_GRJJ_GROUP_STAR_REMOVE b
+ where not exists (
+       select 1 from C##DC.GRJJ g where g.GRJJID = b.GRJJID
+       );
+
+insert into PMS_TEST.GRJJ (
+       GRJJID, GRJJMBID, YYRYID, XH, MC, BJM, TBM, DXM,
+       FWM, JLZTM, CJRYID, GLRYID, GLBMID, FWSBLBM, GNM, ZTFWM
+)
+select GRJJID, GRJJMBID, YYRYID, XH, MC, BJM, TBM, DXM,
+       FWM, JLZTM, CJRYID, GLRYID, GLBMID, FWSBLBM, GNM, ZTFWM
+  from PMS_TEST.BAK_20261201_GRJJ_GROUP_STAR_REMOVE b
+ where not exists (
+       select 1 from PMS_TEST.GRJJ g where g.GRJJID = b.GRJJID
+       );
+
+commit;
+exit;

+ 17 - 0
docs/24_星级班班主任移动报表/sql/2026-12-01_移除小程序团体入口与cssg1星级班入口_验证.sql

@@ -0,0 +1,17 @@
+set pagesize 100 heading on feedback off verify off
+
+alter session set container=ORCLPDB;
+
+select 'PROD' ENV,
+       sum(case when DXM='xsh' then 1 else 0 end) GROUP_ENTRIES,
+       sum(case when YYRYID=111157142 and BJM='mp_bj_starClassSummary' then 1 else 0 end) CSSG1_STAR,
+       sum(case when BJM='mp_bj_starClassSummary' then 1 else 0 end) ALL_STAR
+  from C##DC.GRJJ
+union all
+select 'TEST',
+       sum(case when DXM='xsh' then 1 else 0 end),
+       sum(case when YYRYID=111157142 and BJM='mp_bj_starClassSummary' then 1 else 0 end),
+       sum(case when BJM='mp_bj_starClassSummary' then 1 else 0 end)
+  from PMS_TEST.GRJJ;
+
+exit;