新增接口 分类列表(包括子分类)
This commit is contained in:
@@ -65,6 +65,16 @@ public class ProductController {
|
||||
return productService.queryCategory(shopId,page,pageSize);
|
||||
}
|
||||
|
||||
@GetMapping(value = "queryAllCategory")
|
||||
public Result queryAllCategory(
|
||||
@RequestParam("shopId") String shopId,
|
||||
@RequestParam(value = "page", required = false, defaultValue = "1")int page,
|
||||
@RequestParam(value = "pageSize", required = false, defaultValue = "10")int pageSize
|
||||
){
|
||||
|
||||
return productService.queryAllCategory(shopId,page,pageSize);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("queryProductSku")
|
||||
public Result queryProductSku(@RequestHeader("token") String token,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.chaozhanggui.system.cashierservice.dao;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopCategory;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.ShopCategoryVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -22,4 +23,5 @@ public interface TbShopCategoryMapper {
|
||||
int updateByPrimaryKey(TbShopCategory record);
|
||||
|
||||
List<TbShopCategory> selectByAll(String shopId);
|
||||
List<ShopCategoryVo> queryAllCategory(String shopId);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.chaozhanggui.system.cashierservice.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ShopCategoryVo {
|
||||
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
private List<ShopCategoryVo> childs;
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.chaozhanggui.system.cashierservice.service;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.chaozhanggui.system.cashierservice.dao.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.ShopCategoryVo;
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import com.chaozhanggui.system.cashierservice.util.DateUtils;
|
||||
@@ -44,6 +45,13 @@ public class ProductService {
|
||||
return Result.success(CodeEnum.SUCCESS,pageInfo);
|
||||
}
|
||||
|
||||
public Result queryAllCategory(String shopId,Integer page,Integer pageSize){
|
||||
PageHelper.startPage(page, pageSize);
|
||||
List<ShopCategoryVo> list=tbShopCategoryMapper.queryAllCategory(shopId);
|
||||
PageInfo pageInfo=new PageInfo(list);
|
||||
return Result.success(CodeEnum.SUCCESS,pageInfo);
|
||||
}
|
||||
|
||||
|
||||
public Result queryCommodityInfo(String shopId, String categoryId, String commdityName, Integer page, Integer pageSize, String masterId){
|
||||
List<TbProductWithBLOBs> tbProductWithBLOBs=null;
|
||||
|
||||
Reference in New Issue
Block a user