前台商城品牌接口修改
This commit is contained in:
@@ -4,7 +4,7 @@ import com.macro.mall.common.api.CommonPage;
|
|||||||
import com.macro.mall.common.api.CommonResult;
|
import com.macro.mall.common.api.CommonResult;
|
||||||
import com.macro.mall.model.PmsBrand;
|
import com.macro.mall.model.PmsBrand;
|
||||||
import com.macro.mall.model.PmsProduct;
|
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.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
@@ -19,20 +19,20 @@ import java.util.List;
|
|||||||
* Created by macro on 2020/5/15.
|
* Created by macro on 2020/5/15.
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@Api(tags = "PortalBrandController")
|
@Api(tags = "PmsPortalBrandService")
|
||||||
@Tag(name = "PortalBrandController", description = "前台品牌管理")
|
@Tag(name = "PmsPortalBrandService", description = "前台品牌管理")
|
||||||
@RequestMapping("/brand")
|
@RequestMapping("/brand")
|
||||||
public class PortalBrandController {
|
public class PmsPortalBrandController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private PortalBrandService homeBrandService;
|
private PmsPortalBrandService portalBrandService;
|
||||||
|
|
||||||
@ApiOperation("分页获取推荐品牌")
|
@ApiOperation("分页获取推荐品牌")
|
||||||
@RequestMapping(value = "/recommendList", method = RequestMethod.GET)
|
@RequestMapping(value = "/recommendList", method = RequestMethod.GET)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public CommonResult<List<PmsBrand>> recommendList(@RequestParam(value = "pageSize", defaultValue = "6") Integer pageSize,
|
public CommonResult<List<PmsBrand>> recommendList(@RequestParam(value = "pageSize", defaultValue = "6") Integer pageSize,
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
@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);
|
return CommonResult.success(brandList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ public class PortalBrandController {
|
|||||||
@RequestMapping(value = "/detail/{brandId}", method = RequestMethod.GET)
|
@RequestMapping(value = "/detail/{brandId}", method = RequestMethod.GET)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public CommonResult<PmsBrand> detail(@PathVariable Long brandId) {
|
public CommonResult<PmsBrand> detail(@PathVariable Long brandId) {
|
||||||
PmsBrand brand = homeBrandService.detail(brandId);
|
PmsBrand brand = portalBrandService.detail(brandId);
|
||||||
return CommonResult.success(brand);
|
return CommonResult.success(brand);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ public class PortalBrandController {
|
|||||||
public CommonResult<CommonPage<PmsProduct>> productList(@RequestParam Long brandId,
|
public CommonResult<CommonPage<PmsProduct>> productList(@RequestParam Long brandId,
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||||
@RequestParam(value = "pageSize", defaultValue = "6") Integer pageSize) {
|
@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);
|
return CommonResult.success(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,7 +10,7 @@ import java.util.List;
|
|||||||
* 前台品牌管理Service
|
* 前台品牌管理Service
|
||||||
* Created by macro on 2020/5/15.
|
* Created by macro on 2020/5/15.
|
||||||
*/
|
*/
|
||||||
public interface PortalBrandService {
|
public interface PmsPortalBrandService {
|
||||||
/**
|
/**
|
||||||
* 分页获取推荐品牌
|
* 分页获取推荐品牌
|
||||||
*/
|
*/
|
||||||
@@ -8,7 +8,7 @@ import com.macro.mall.model.PmsBrand;
|
|||||||
import com.macro.mall.model.PmsProduct;
|
import com.macro.mall.model.PmsProduct;
|
||||||
import com.macro.mall.model.PmsProductExample;
|
import com.macro.mall.model.PmsProductExample;
|
||||||
import com.macro.mall.portal.dao.HomeDao;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ import java.util.List;
|
|||||||
* Created by macro on 2020/5/15.
|
* Created by macro on 2020/5/15.
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class PortalBrandServiceImpl implements PortalBrandService {
|
public class PmsPortalBrandServiceImpl implements PmsPortalBrandService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private HomeDao homeDao;
|
private HomeDao homeDao;
|
||||||
@Autowired
|
@Autowired
|
||||||
Reference in New Issue
Block a user