Update SmsHomeNewProductController.java

This commit is contained in:
macro
2021-04-01 21:01:33 +08:00
parent 66e6e874ba
commit f0675db804

View File

@@ -26,8 +26,8 @@ public class SmsHomeNewProductController {
@ApiOperation("添加首页推荐品牌") @ApiOperation("添加首页推荐品牌")
@RequestMapping(value = "/create", method = RequestMethod.POST) @RequestMapping(value = "/create", method = RequestMethod.POST)
@ResponseBody @ResponseBody
public CommonResult create(@RequestBody List<SmsHomeNewProduct> homeBrandList) { public CommonResult create(@RequestBody List<SmsHomeNewProduct> homeNewProductList) {
int count = homeNewProductService.create(homeBrandList); int count = homeNewProductService.create(homeNewProductList);
if (count > 0) { if (count > 0) {
return CommonResult.success(count); return CommonResult.success(count);
} }
@@ -74,7 +74,7 @@ public class SmsHomeNewProductController {
@RequestParam(value = "recommendStatus", required = false) Integer recommendStatus, @RequestParam(value = "recommendStatus", required = false) Integer recommendStatus,
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
List<SmsHomeNewProduct> homeBrandList = homeNewProductService.list(productName, recommendStatus, pageSize, pageNum); List<SmsHomeNewProduct> homeNewProductList = homeNewProductService.list(productName, recommendStatus, pageSize, pageNum);
return CommonResult.success(CommonPage.restPage(homeBrandList)); return CommonResult.success(CommonPage.restPage(homeNewProductList));
} }
} }