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