前台商城品牌接口修改

This commit is contained in:
macro
2022-12-23 16:20:01 +08:00
parent fed8f5b02c
commit e6bd6a334e
3 changed files with 11 additions and 11 deletions

View File

@@ -4,7 +4,7 @@ import com.macro.mall.common.api.CommonPage;
import com.macro.mall.common.api.CommonResult;
import com.macro.mall.model.PmsBrand;
import com.macro.mall.model.PmsProduct;
import com.macro.mall.portal.service.PortalBrandService;
import com.macro.mall.portal.service.PmsPortalBrandService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
@@ -19,20 +19,20 @@ import java.util.List;
* Created by macro on 2020/5/15.
*/
@Controller
@Api(tags = "PortalBrandController")
@Tag(name = "PortalBrandController", description = "前台品牌管理")
@Api(tags = "PmsPortalBrandService")
@Tag(name = "PmsPortalBrandService", description = "前台品牌管理")
@RequestMapping("/brand")
public class PortalBrandController {
public class PmsPortalBrandController {
@Autowired
private PortalBrandService homeBrandService;
private PmsPortalBrandService portalBrandService;
@ApiOperation("分页获取推荐品牌")
@RequestMapping(value = "/recommendList", method = RequestMethod.GET)
@ResponseBody
public CommonResult<List<PmsBrand>> recommendList(@RequestParam(value = "pageSize", defaultValue = "6") Integer pageSize,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
List<PmsBrand> brandList = homeBrandService.recommendList(pageNum, pageSize);
List<PmsBrand> brandList = portalBrandService.recommendList(pageNum, pageSize);
return CommonResult.success(brandList);
}
@@ -40,7 +40,7 @@ public class PortalBrandController {
@RequestMapping(value = "/detail/{brandId}", method = RequestMethod.GET)
@ResponseBody
public CommonResult<PmsBrand> detail(@PathVariable Long brandId) {
PmsBrand brand = homeBrandService.detail(brandId);
PmsBrand brand = portalBrandService.detail(brandId);
return CommonResult.success(brand);
}
@@ -50,7 +50,7 @@ public class PortalBrandController {
public CommonResult<CommonPage<PmsProduct>> productList(@RequestParam Long brandId,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(value = "pageSize", defaultValue = "6") Integer pageSize) {
CommonPage<PmsProduct> result = homeBrandService.productList(brandId,pageNum, pageSize);
CommonPage<PmsProduct> result = portalBrandService.productList(brandId,pageNum, pageSize);
return CommonResult.success(result);
}
}

View File

@@ -10,7 +10,7 @@ import java.util.List;
* 前台品牌管理Service
* Created by macro on 2020/5/15.
*/
public interface PortalBrandService {
public interface PmsPortalBrandService {
/**
* 分页获取推荐品牌
*/

View File

@@ -8,7 +8,7 @@ import com.macro.mall.model.PmsBrand;
import com.macro.mall.model.PmsProduct;
import com.macro.mall.model.PmsProductExample;
import com.macro.mall.portal.dao.HomeDao;
import com.macro.mall.portal.service.PortalBrandService;
import com.macro.mall.portal.service.PmsPortalBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -19,7 +19,7 @@ import java.util.List;
* Created by macro on 2020/5/15.
*/
@Service
public class PortalBrandServiceImpl implements PortalBrandService {
public class PmsPortalBrandServiceImpl implements PmsPortalBrandService {
@Autowired
private HomeDao homeDao;
@Autowired