package com.liquidnet.service.goblin.test;


import com.liquidnet.service.goblin.param.shouqianba.request.CommonRequest;
import com.liquidnet.service.goblin.param.shouqianba.request.MallListQueryRequest;
import com.liquidnet.service.goblin.param.shouqianba.response.data.MallListQueryData;
import com.liquidnet.service.goblin.service.IGoblinShouQianBaService;
import lombok.extern.slf4j.Slf4j;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

@Slf4j
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
public class GoblinShouQianBaServiceImplTest {

    @Autowired
    private IGoblinShouQianBaService goblinShouQianBaService;


    @Test
    public void queryMallListTest(){

        CommonRequest.Seller seller = new CommonRequest.Seller();
        seller.setRole("super_admin");
        seller.setMerchantId("fd567f94-9a44-4ae5-879f-9acc919d0f89");
        seller.setMerchantUserId("42c556cc-1509-4de0-bfc3-dfbcb48eae57");

        MallListQueryRequest.Filter filter = new MallListQueryRequest.Filter();
        filter.setSeller(seller);

        MallListQueryRequest mallListQueryRequest = new MallListQueryRequest();
        mallListQueryRequest.setAppid("2025082700005615");
        mallListQueryRequest.setFilter(filter);

        List<MallListQueryData> mallListQueryData = goblinShouQianBaService.queryMallList(mallListQueryRequest);
        Assert.assertNotNull(mallListQueryData);
    }

}
