|
@@ -41,8 +41,7 @@ public class PoCollectionServiceImpl implements IPoCollectionService {
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<PoCollection> selectPoCollectionList(PoCollection poCollection)
|
|
|
- {
|
|
|
+ public List<PoCollection> selectPoCollectionList(PoCollection poCollection) {
|
|
|
return poCollectionMapper.selectPoCollectionList(poCollection);
|
|
|
}
|
|
|
|
|
@@ -68,7 +67,7 @@ public class PoCollectionServiceImpl implements IPoCollectionService {
|
|
|
@Override
|
|
|
public int insertCollection(PoCollection collection) {
|
|
|
List<PoCollection> poCollection = poCollectionMapper.selectPoCollectionList(collection);
|
|
|
- if (poCollection != null)
|
|
|
+ if (poCollection != null && !poCollection.isEmpty())
|
|
|
return -1;
|
|
|
return poCollectionMapper.insertPoCollection(collection);
|
|
|
}
|
|
@@ -83,9 +82,8 @@ public class PoCollectionServiceImpl implements IPoCollectionService {
|
|
|
public int batchInsertCollection(List<PoCollection> collection) {
|
|
|
for (PoCollection collection1 : collection) {
|
|
|
List<PoCollection> list = poCollectionMapper.selectPoCollectionList(collection1);
|
|
|
- if (list == null || list.isEmpty())
|
|
|
- continue;
|
|
|
- return -1;
|
|
|
+ if (list != null && !list.isEmpty())
|
|
|
+ return -1;
|
|
|
}
|
|
|
return poCollectionMapper.batchInsertPoCollection(collection);
|
|
|
}
|
|
@@ -108,8 +106,7 @@ public class PoCollectionServiceImpl implements IPoCollectionService {
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public int deletePoCollectionByCollectionIds(Long[] collectionIds)
|
|
|
- {
|
|
|
+ public int deletePoCollectionByCollectionIds(Long[] collectionIds) {
|
|
|
return poCollectionMapper.deletePoCollectionByCollectionIds(collectionIds);
|
|
|
}
|
|
|
|
|
@@ -120,8 +117,7 @@ public class PoCollectionServiceImpl implements IPoCollectionService {
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public int deletePoCollectionByCollectionId(Long collectionId)
|
|
|
- {
|
|
|
+ public int deletePoCollectionByCollectionId(Long collectionId) {
|
|
|
return poCollectionMapper.deletePoCollectionByCollectionId(collectionId);
|
|
|
}
|
|
|
}
|