Skip to content

Commit

Permalink
优化代码返回命名
Browse files Browse the repository at this point in the history
  • Loading branch information
Brother-Dragon committed Jul 4, 2022
1 parent 888d41e commit aabf533
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public class IndexImgController {
@GetMapping("/page")
@PreAuthorize("@pms.hasPermission('admin:indexImg:page')")
public ResponseEntity<IPage<IndexImg>> page(IndexImg indexImg, PageParam<IndexImg> page) {
IPage<IndexImg> indexImgIPage = indexImgService.page(page,
IPage<IndexImg> indexImgPage = indexImgService.page(page,
new LambdaQueryWrapper<IndexImg>()
.eq(indexImg.getStatus() != null, IndexImg::getStatus, indexImg.getStatus())
.orderByDesc(IndexImg::getSeq));
return ResponseEntity.ok(indexImgIPage);
return ResponseEntity.ok(indexImgPage);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
import java.util.List;
import java.util.stream.Collectors;

/**
* @author lgh on 2018/11/26.
*/
@RestController
@RequestMapping("/prod")
@Api(tags = "商品接口")
Expand All @@ -61,8 +64,8 @@ public class ProdController {
})
public ResponseEntity<IPage<ProductDto>> prodList(
@RequestParam(value = "categoryId") Long categoryId,PageParam<ProductDto> page) {
IPage<ProductDto> productDtoIPage = prodService.pageByCategoryId(page, categoryId);
return ResponseEntity.ok(productDtoIPage);
IPage<ProductDto> productPage = prodService.pageByCategoryId(page, categoryId);
return ResponseEntity.ok(productPage);
}

@GetMapping("/prodInfo")
Expand Down Expand Up @@ -98,8 +101,8 @@ public ResponseEntity<ProductDto> prodInfo(Long prodId) {
@ApiImplicitParams({
})
public ResponseEntity<IPage<ProductDto>> lastedProdPage(PageParam<ProductDto> page) {
IPage<ProductDto> productDtoIPage = prodService.pageByPutawayTime(page);
return ResponseEntity.ok(productDtoIPage);
IPage<ProductDto> productPage = prodService.pageByPutawayTime(page);
return ResponseEntity.ok(productPage);
}

@GetMapping("/prodListByTagId")
Expand All @@ -109,16 +112,16 @@ public ResponseEntity<IPage<ProductDto>> lastedProdPage(PageParam<ProductDto> pa
})
public ResponseEntity<IPage<ProductDto>> prodListByTagId(
@RequestParam(value = "tagId") Long tagId,PageParam<ProductDto> page) {
IPage<ProductDto> productDtoIPage = prodService.pageByTagId(page, tagId);
return ResponseEntity.ok(productDtoIPage);
IPage<ProductDto> productPage = prodService.pageByTagId(page, tagId);
return ResponseEntity.ok(productPage);
}

@GetMapping("/moreBuyProdList")
@ApiOperation(value = "每日疯抢", notes = "获取销量最多的商品列表")
@ApiImplicitParams({})
public ResponseEntity<IPage<ProductDto>> moreBuyProdList(PageParam<ProductDto> page) {
IPage<ProductDto> productDtoIPage = prodService.moreBuyProdList(page);
return ResponseEntity.ok(productDtoIPage);
IPage<ProductDto> productPage = prodService.moreBuyProdList(page);
return ResponseEntity.ok(productPage);
}

@GetMapping("/tagProdList")
Expand Down

0 comments on commit aabf533

Please sign in to comment.