Browse Source

默认设置:培训计划,年度计划和期,为空字符串时,也保存=清空设置

lrf 1 year ago
parent
commit
71f85926d6
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/service/setting.js

+ 3 - 3
app/service/setting.js

@@ -23,13 +23,13 @@ class SettingService extends CrudService {
     if (!setting) {
       throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '设置信息不存在');
     }
-    if (planyearid) {
+    if (planyearid || planyearid === '') {
       setting.planyearid = planyearid;
     }
-    if (planid) {
+    if (planid || planid === '') {
       setting.planid = planid;
     }
-    if (termid) {
+    if (termid || termid === '') {
       setting.termid = termid;
     }
     if (user_email) {