hurugang il y a 5 ans
Parent
commit
8bb932c420

+ 4 - 1
src/main/java/cn/hnthyy/thmz/controller/ConfigController.java

@@ -1,6 +1,7 @@
 package cn.hnthyy.thmz.controller;
 
 import cn.hnthyy.thmz.comment.UserLoginToken;
+import cn.hnthyy.thmz.common.Constants;
 import cn.hnthyy.thmz.entity.thmz.Config;
 import cn.hnthyy.thmz.service.thmz.ConfigService;
 import lombok.extern.slf4j.Slf4j;
@@ -73,7 +74,9 @@ public class ConfigController {
                 resultMap.put("message", "配置的键不能为空");
                 return resultMap;
             }
-            if (StringUtils.isBlank(config.getConfigValue())){
+            if (Constants.ALARM_USER_KEY.equals(config.getConfigKey()) && StringUtils.isBlank(config.getConfigValue())){
+                config.setConfigValue("");
+            }else if (!Constants.ALARM_USER_KEY.equals(config.getConfigKey()) && StringUtils.isBlank(config.getConfigValue())){
                 resultMap.put("code", -1);
                 resultMap.put("message", "配置的值不能为空");
                 return resultMap;

+ 1 - 1
src/main/resources/static/js/request-config.js

@@ -97,7 +97,7 @@ function initDeptSelect() {
                 window.location.href = '/thmz/login/view'
                 return;
             }
-            var html = '';
+            var html = '<option value=""></option>';
             $.each(data.data, function (commentIndex, comment) {
                 html += '<option value="' + comment.code + '">' + comment.name + '(' + comment.pyCode + ')</option>';
             });

+ 1 - 1
src/main/resources/templates/request-config.html

@@ -36,7 +36,7 @@
                                     class="required">*</span>
                             </label>
                             <div class="col-md-4 col-sm-4 col-xs-12">
-                                <select class="form-control selectpicker show-tick" multiple required="required"  title="请选择"
+                                <select class="form-control selectpicker show-tick" multiple required="required"  title="请选择" data-live-search="true"
                                         id="doctor">
                                 </select>
                             </div>