springboot项目之商品查询功能

实现查询商品列表功能

 public List getAllGoodListByMerch(String merchId) {
        MPJLambdaWrapper wrapper=new MPJLambdaWrapper()
                .selectAll(GoodListMangeDto.class)
                .selectAs(MarketGoodListDto::getGoodName,GoodListMangeDto::getGoodName)
                .selectAs(MarketGoodListDto::getGoodLogo,GoodListMangeDto::getGoodLogo)
                .selectAs(MarketGoodListDto::getMarketPrice,GoodListMangeDto::getMarketPrice)
                .leftJoin(MarketGoodListDto.class,MarketGoodListDto::getGoodId,GoodMangeDto::getGoodId)
                .eq(GoodListMangeDto::getMerchId,merchId);
        List list = goodListManagerDtoMapper.selectJoinList(GoodListMangeDto.class, wrapper);
        return list;
    }

你可能感兴趣的:(spring,boot,后端,java)