package com.trade.client;

import com.trade.client.enterprise.companyrelated.service.CBizEntityRelatedService;
import com.trade.common.utils.StringUtils;
import com.trade.service.enterprise.companyrelated.domain.BizEntityRelated;
import com.trade.service.enterprise.companyrelated.service.BizEntityRelatedService;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import javax.annotation.Resource;
import java.util.List;

/**
 * 关联企业测试类
 */
@SpringBootTest
public class CompanyRelatedTest {

    @Resource
    private BizEntityRelatedService bizEntityRelatedService;
    @Resource
    private CBizEntityRelatedService cBizEntityRelatedService;

    @Test
    public void testQueryCompanyRelatedListByUserId() {
        List<BizEntityRelated> list = bizEntityRelatedService.getRelatedListByUserId(123L);
        list.forEach(e -> System.out.println(e.getCertNo()));
    }

    @Test
    public void testDeleteCompanyRelatedById() {
        cBizEntityRelatedService.deleteByBizEntityId(1L);
    }

    @Test
    public void phoneNoUtilTest() {
        System.out.println(StringUtils.isChinaPhone("13319182932"));
    }
}
