对一大波idea提醒需要优化的地方进行处理

This commit is contained in:
handy
2023-11-23 16:25:59 +08:00
parent 8b1fb129ce
commit efa2538736
98 changed files with 195 additions and 289 deletions

View File

@@ -32,7 +32,7 @@ import java.util.Objects;
*/
@RestController
public class LoginController {
private static Logger logger = LoggerFactory.getLogger(LoginController.class);
private static final Logger logger = LoggerFactory.getLogger(LoginController.class);
@Resource
private UserInfoService userInfoService;

View File

@@ -2,7 +2,6 @@ package com.zyplayer.doc.manage.web;
import com.zyplayer.doc.core.json.DocResponseJson;
import com.zyplayer.doc.core.json.ResponseJson;
import com.zyplayer.doc.manage.framework.config.ZyplayerDocConfig;
import com.zyplayer.doc.manage.framework.config.ZyplayerModuleKeeper;
import com.zyplayer.doc.manage.framework.upgrade.UpgradeUtil;
import org.springframework.web.bind.annotation.GetMapping;

View File

@@ -11,7 +11,6 @@ import com.zyplayer.doc.data.repository.manage.entity.UserAuth;
import com.zyplayer.doc.data.repository.support.consts.DocAuthConst;
import com.zyplayer.doc.data.service.manage.AuthInfoService;
import com.zyplayer.doc.data.service.manage.UserAuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

View File

@@ -119,7 +119,7 @@ public class UserInfoController {
if (StringUtils.isBlank(userInfo.getUserName())) {
return DocResponseJson.warn("用户名必填");
}
Long userId = Optional.ofNullable(userInfo.getId()).orElse(0L);
long userId = Optional.ofNullable(userInfo.getId()).orElse(0L);
QueryWrapper<UserInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_no", userInfo.getUserNo());
queryWrapper.ne(userId > 0, "id", userInfo.getId());