package com.sqx;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.ExcelWriter;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.sqx.modules.app.entity.UserEntity;
import com.sqx.modules.app.service.UserService;
import com.sqx.modules.pay.controller.app.WuyouController;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.Map;

@ActiveProfiles("dev")
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class Tets {
    @Autowired
    ApplicationContext applicationContext;
    @Autowired
    UserService userService;
    @Test
    public void test() {
//       }
        WuyouController proxy = applicationContext.getBean(WuyouController.class);
        UserEntity userEntity = userService.selectUserById(26972L);
        UserEntity byUser = userService.queryByInvitationCode(userEntity.getInviterCode());

//        proxy.activities(userEntity, byUser);
        System.out.println(proxy);
    }

    public static void main(String[] args) {

    }
}
