refactor project
This commit is contained in:
@@ -93,7 +93,7 @@ public class BookController {
|
||||
wrapper.eq(ShopProductToLabelEntity::getDelFlag,0);
|
||||
List<Integer> pIds = shopProductToLabelService.getBaseMapper().selectList(wrapper).stream().map(ShopProductToLabelEntity::getProductId).collect(Collectors.toList());
|
||||
|
||||
List<ShopProductEntity> shopProductEntities = shopProductService.getBaseMapper().selectList(new LambdaQueryWrapper<ShopProductEntity>().in(ShopProductEntity::getProductId, pIds));
|
||||
List<ShopProduct> shopProductEntities = shopProductService.getBaseMapper().selectList(new LambdaQueryWrapper<ShopProduct>().in(ShopProduct::getProductId, pIds));
|
||||
return R.ok().put("Products",shopProductEntities);
|
||||
}
|
||||
|
||||
@@ -177,10 +177,10 @@ public class BookController {
|
||||
String publisherId = book.getPublisherId();
|
||||
String[] publisherIds = publisherId.split(",");
|
||||
List<String> publisherList = Arrays.asList(publisherIds);
|
||||
List<PublisherEntity> publisherEntities = publisherService.getBaseMapper().selectList(new QueryWrapper<PublisherEntity>().in("id", publisherList));
|
||||
List<Publisher> publisherEntities = publisherService.getBaseMapper().selectList(new QueryWrapper<Publisher>().in("id", publisherList));
|
||||
|
||||
for (PublisherEntity publisherEntity : publisherEntities) {
|
||||
publisherName += "," + publisherEntity.getPublisherName();
|
||||
for (Publisher publisher : publisherEntities) {
|
||||
publisherName += "," + publisher.getPublisherName();
|
||||
}
|
||||
publisherName = publisherName.startsWith(",") ? publisherName.substring(1) : publisherName;
|
||||
|
||||
@@ -553,10 +553,10 @@ public class BookController {
|
||||
String publisherId = book.getPublisherId();
|
||||
String[] publisherIds = publisherId.split(",");
|
||||
List<String> publisherList = Arrays.asList(publisherIds);
|
||||
List<PublisherEntity> publisherEntities = publisherService.getBaseMapper().selectList(new QueryWrapper<PublisherEntity>().in("id", publisherList));
|
||||
List<Publisher> publisherEntities = publisherService.getBaseMapper().selectList(new QueryWrapper<Publisher>().in("id", publisherList));
|
||||
|
||||
for (PublisherEntity publisherEntity : publisherEntities) {
|
||||
publisherName += "," + publisherEntity.getPublisherName();
|
||||
for (Publisher publisher : publisherEntities) {
|
||||
publisherName += "," + publisher.getPublisherName();
|
||||
}
|
||||
publisherName = publisherName.startsWith(",") ? publisherName.substring(1) : publisherName;
|
||||
|
||||
@@ -594,10 +594,10 @@ public class BookController {
|
||||
String publisherId = book.getPublisherId();
|
||||
String[] publisherIds = publisherId.split(",");
|
||||
List<String> publisherList = Arrays.asList(publisherIds);
|
||||
List<PublisherEntity> publisherEntities = publisherService.getBaseMapper().selectList(new QueryWrapper<PublisherEntity>().in("id", publisherList));
|
||||
List<Publisher> publisherEntities = publisherService.getBaseMapper().selectList(new QueryWrapper<Publisher>().in("id", publisherList));
|
||||
|
||||
for (PublisherEntity publisherEntity : publisherEntities) {
|
||||
publisherName += "," + publisherEntity.getPublisherName();
|
||||
for (Publisher publisher : publisherEntities) {
|
||||
publisherName += "," + publisher.getPublisherName();
|
||||
}
|
||||
publisherName = publisherName.startsWith(",") ? publisherName.substring(1) : publisherName;
|
||||
|
||||
@@ -634,10 +634,10 @@ public class BookController {
|
||||
String publisherId = book.getPublisherId();
|
||||
String[] publisherIds = publisherId.split(",");
|
||||
List<String> publisherList = Arrays.asList(publisherIds);
|
||||
List<PublisherEntity> publisherEntities = publisherService.getBaseMapper().selectList(new QueryWrapper<PublisherEntity>().in("id", publisherList));
|
||||
List<Publisher> publisherEntities = publisherService.getBaseMapper().selectList(new QueryWrapper<Publisher>().in("id", publisherList));
|
||||
|
||||
for (PublisherEntity publisherEntity : publisherEntities) {
|
||||
publisherName += "," + publisherEntity.getPublisherName();
|
||||
for (Publisher publisher : publisherEntities) {
|
||||
publisherName += "," + publisher.getPublisherName();
|
||||
}
|
||||
publisherName = publisherName.startsWith(",") ? publisherName.substring(1) : publisherName;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user