Selaa lähdekoodia

屏蔽DICT_CODE为-999的数据

yuejiaying 4 vuotta sitten
vanhempi
commit
5d79800abc

+ 4 - 1
user_auth/src/main/java/com/huaxu/controller/UserController.java

@@ -16,6 +16,7 @@ import com.huaxu.util.UserUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.oauth2.common.OAuth2AccessToken;
 import org.springframework.web.bind.annotation.*;
@@ -120,8 +121,10 @@ public class UserController {
     @RequestMapping(value = "insertRegister", method = RequestMethod.POST)
     @ApiOperation(value = "插入注册申请")
     public AjaxMessage<Integer> insertRegister(@ApiParam(value = "注册申请信息", required = true) @RequestBody User user) {
+        if(StringUtils.isEmpty(user.getUsername())||StringUtils.isEmpty(user.getPhone())||StringUtils.isEmpty(user.getUserType())) {
+            return new AjaxMessage<>(ResultStatus.PARAM_ERROR);
+        }
         int result = userService.insertRegister(user);
-
         return new AjaxMessage<>(ResultStatus.OK, result);
     }
 

+ 2 - 0
user_center/src/main/resources/mapper/DictMapper.xml

@@ -59,6 +59,7 @@
                 and PARENT_DICT_ID in (select ID from uims_dict where DICT_CODE=#{parentDictCode})
             </if>
             and STATUS =1
+            and DICT_CODE!='-999'
         </where>
         order by DICT_NAME,DICT_VALUE
     </select>
@@ -173,6 +174,7 @@
                 and PARENT_DICT_ID IS NULL
             </if>
             and STATUS =1
+            and DICT_CODE!='-999'
         </where>
         order by DICT_NAME,DICT_VALUE
     </select>