User dbUSer = userService.getById(id);
if(dbUser == null){
return "对象为空";
}
String username = dbUser.getUsername();
String str = "";
if (StringUtils.isEmpty(str)) {
//ToDo
}
List<Long> list = new ArrayList();
if (CollectionUtil.isEmpty(list)) {
//ToDo
}
int n = 1;
if (n == 0) {
//ToDo
}
Long n = 1L;
if (n == 0L) {
//ToDo
}
Long a = 1L;
Long b = 1L;
if (a.equals(b)) {
//ToDo
}
String a = "小白";
String b = "小白";
if (StringUtils.equals(a, b)) {
//ToDo
}
service的注入
@RequiredArgsConstructor
public class AppsController {
private final AppsGroupService appsGroupService;
}
mapper的注入
@RequiredArgsConstructor
public class appsServiceImpl extens appsService{
private final CmsArticleMapper cmsArticleMapper;
}