package com.xxx.service;
import java.util.List;
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.SpringRunner;
import com.xxx.common.datasource.DynamicDataSourceHolder;
import com.xxx.customer.CustomerServer;
import com.xxx.customer.service.CustomerLabelService;
import com.xxx.domain.core.customer.label.CustomerLabelInfoVo;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = { CustomerServer.class }) // 指定启动类
public class CustomerLabelServiceImplTest {
@Autowired
CustomerLabelService customerLabelService;
@Test
public void testOne() {
System.out.println("test hello 1");
}
@Test
public void testSelectCustomerLabelInfo() {
DynamicDataSourceHolder.set("RH");
List<CustomerLabelInfoVo> res = customerLabelService.selectCustomerLabelInfo(1, "1", 1);
System.out.println(res);
DynamicDataSourceHolder.remove();
}
}
package com.xxx.service;
import java.util.List