修改代码中"0"、"1"等改为静态常量
This commit is contained in:
+4
-3
@@ -2,6 +2,7 @@ package com.jero.modules.projectLibrary.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.modules.projectLibrary.entity.LawsAssess;
|
||||
import com.jero.modules.projectLibrary.mapper.LawsAssessMapper;
|
||||
import com.jero.modules.projectLibrary.service.ILawsAssessService;
|
||||
@@ -96,7 +97,7 @@ public class LawsAssessServiceImpl extends ServiceImpl<LawsAssessMapper, LawsAss
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
LawsAssess lawsAssess = getById(id);
|
||||
lawsAssess.setDelFlag("1");
|
||||
lawsAssess.setDelFlag(CommonConstant.DEL_FLAG_1.toString());
|
||||
updateById(lawsAssess);
|
||||
}
|
||||
|
||||
@@ -118,7 +119,7 @@ public class LawsAssessServiceImpl extends ServiceImpl<LawsAssessMapper, LawsAss
|
||||
}
|
||||
LambdaQueryWrapper<LawsAssess> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(LawsAssess::getProjectId, projectId);
|
||||
wrapper.eq(LawsAssess::getDelFlag, "0");
|
||||
wrapper.eq(LawsAssess::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
|
||||
return list(wrapper);
|
||||
}
|
||||
|
||||
@@ -129,7 +130,7 @@ public class LawsAssessServiceImpl extends ServiceImpl<LawsAssessMapper, LawsAss
|
||||
}
|
||||
LambdaQueryWrapper<LawsAssess> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(LawsAssess::getProjectId, projectId);
|
||||
wrapper.eq(LawsAssess::getDelFlag, "1");
|
||||
wrapper.eq(LawsAssess::getDelFlag, CommonConstant.DEL_FLAG_1.toString());
|
||||
return list(wrapper);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@ package com.jero.modules.projectLibrary.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.modules.projectLibrary.entity.LawsProjectLibrary;
|
||||
import com.jero.modules.projectLibrary.mapper.LawsProjectLibraryMapper;
|
||||
import com.jero.modules.projectLibrary.service.ILawsProjectLibraryService;
|
||||
@@ -87,7 +88,7 @@ public class LawsProjectLibraryServiceImpl extends ServiceImpl<LawsProjectLibrar
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
LawsProjectLibrary projectLibrary = getById(id);
|
||||
projectLibrary.setDelFlag("1");
|
||||
projectLibrary.setDelFlag(CommonConstant.DEL_FLAG_1.toString());
|
||||
updateById(projectLibrary);
|
||||
}
|
||||
|
||||
@@ -98,7 +99,7 @@ public class LawsProjectLibraryServiceImpl extends ServiceImpl<LawsProjectLibrar
|
||||
public void deleteByIds(List<String> ids) {
|
||||
LambdaUpdateWrapper<LawsProjectLibrary> wrapper = new LambdaUpdateWrapper<>();
|
||||
wrapper.in(LawsProjectLibrary::getId, ids);
|
||||
wrapper.set(LawsProjectLibrary::getDelFlag, "1");
|
||||
wrapper.set(LawsProjectLibrary::getDelFlag, CommonConstant.DEL_FLAG_1.toString());
|
||||
update(wrapper);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user