MerchantServiceTest.java
2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package cn.com.glsx.entmicro.service;
import cn.com.glsx.entmicro.Main;
import cn.com.glsx.entmicro.model.MerchantRopResponse;
import cn.com.glsx.entmicro.model.request.FindMerchantByPageRequest;
import cn.com.glsx.entmicro.model.response.subscribe.SubscribeMerchantResponse;
import cn.com.glsx.scrm.proxy.dto.merchant.ListMerchantRequest;
import com.github.pagehelper.Page;
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 scala.Int;
import java.util.ArrayList;
import java.util.List;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = Main.class)
public class MerchantServiceTest {
@Autowired
private MerchantService merchantService;
@Test
public void updateMerchantByMerchantNo() {
merchantService.updateMerchantByMerchantNo(10001001,"测试企微---修改");
}
@Test
public void staffDetailByMerchantIdTest(){
System.out.println(merchantService.staffDetailByMerchantId(44211227));
}
@Test
public void findMerchantByMerchantName(){
ListMerchantRequest listMerchantRequest = new ListMerchantRequest();
listMerchantRequest.setMerchantNoOrName("10001");
List<MerchantRopResponse> xzs = merchantService.findMerchantListByCondition(listMerchantRequest);
System.out.println(xzs);
}
@Test
public void findMerchantByPageTest(){
FindMerchantByPageRequest request = new FindMerchantByPageRequest();
request.setPageNum(1);
request.setPageSize(10);
// request.setIsRelevance(0);
// request.setChannelId(1);
// request.setMerchantAccountLevel(4);
// request.setAccountOrPhone(0);
Page<SubscribeMerchantResponse> merchantByPage = merchantService.findMerchantByPage(request);
System.out.println("merchantByPage============" + merchantByPage);
}
}