.detailedListVision("v0")去掉

This commit is contained in:
yanyizhou
2021-08-19 14:51:10 +08:00
parent 7c7be1065c
commit 564d5657a0
@@ -91,8 +91,12 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
else if (addDetailedDto.getCarType() != null) {
//就判断页面的值和数据库里的值是否相等
for (int i = 0; i < sarLawsDetailedLists.size(); i++) {
//判断数据库里的数据的车型类别字段是否为空
if (null == sarLawsDetailedLists.get(i) || null == sarLawsDetailedLists.get(i).getCarType()){
System.out.println("数据库里第" + (i + 1) + "条的车型类别字段长度为空,不重复,目前可以添加");
}
//相等就不许添加
if (Objects.equals(addDetailedDto.getCarType(), sarLawsDetailedLists.get(i).getCarType())) {
else if (Objects.equals(addDetailedDto.getCarType(), sarLawsDetailedLists.get(i).getCarType())) {
System.out.println("数据库里第" + (i + 1) + "条的车型类别字段和页面一样,重复,不许添加");
carAddFlag = false;
}
@@ -205,7 +209,6 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
.sortKey(addDetailedDto.getSortKey())
.detailedListName(addDetailedDto.getDetailedListName())
.detailedListState("0")
.detailedListVision("v0")
.applicationScope(addDetailedDto.getApplicationScope())
.updateTime(new Date())
.updatePeople(addDetailedDto.getUpdatePeople())
@@ -337,10 +340,14 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
@Override
public String updateList(DetailedUpDto detailedUpDto) {
//list是数据库里根据id查出来的数据;detailedUpDto是页面传回来的数据
SarLawsDetailedList list = sarLawsDetailedListDao.selectById(detailedUpDto.getId());
//国家或地区
//如果页面的国家地区为空,就把数据库里的国家地区字段也设为空
if (StringUtils.isBlank(detailedUpDto.getCountryArea())) list.setCountryArea(null);
else if ("null".equals(detailedUpDto.getCountryArea())) ;
//把数据库里的国家地区字段设为页面的国家地区
else list.setCountryArea(detailedUpDto.getCountryArea());
//车型类别
if (StringUtils.isBlank(detailedUpDto.getCarType())) list.setCarType(null);