package com.izouma.jiashanxia.service;

import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.izouma.jiashanxia.domain.SetGoods;
import com.izouma.jiashanxia.domain.UserSet;
import com.izouma.jiashanxia.domain.UserSetFlow;
import com.izouma.jiashanxia.dto.GoodsDTO;
import com.izouma.jiashanxia.dto.PageQuery;
import com.izouma.jiashanxia.enums.FlowType;
import com.izouma.jiashanxia.repo.SetGoodsRepo;
import com.izouma.jiashanxia.utils.JpaUtils;
import lombok.AllArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@AllArgsConstructor
public class SetGoodsService {

    private SetGoodsRepo setGoodsRepo;

    public Page<SetGoods> all(PageQuery pageQuery) {
        return setGoodsRepo.findAll(JpaUtils.toSpecification(pageQuery, SetGoods.class), JpaUtils.toPageRequest(pageQuery));
    }
}
