BusiAssistantApplyMerchantServiceTest.java
2.77 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package cn.com.glsx.busassistant.service;
import cn.com.glsx.busassistant.model.request.activity.MerchantBySceneRemoteRpcRequest;
import cn.com.glsx.busassistant.model.request.merchant.MerchantApplyPageRequest;
import cn.com.glsx.busassistant.model.request.merchant.MerchantApplyRpcRequest;
import cn.com.glsx.busassistant.model.request.merchant.MerchantConfirmRpcRequest;
import cn.com.glsx.busassistant.model.response.merchant.MerchantResponse;
import cn.com.glsx.busassistant.service.merchant.BusiAssistantApplyMerchantService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Author xiongzs
* @Description 门店申请服务测试类
* @date 2022/10/9 19:46
* @Version 1.0
*/
@Slf4j
public class BusiAssistantApplyMerchantServiceTest extends BaseServiceTest{
@Autowired
private BusiAssistantApplyMerchantService applyMerchantService;
@Test
public void testGetApplyMerchantPage(){
MerchantApplyPageRequest condition = new MerchantApplyPageRequest();
condition.setServiceMerchantName("xzs");
condition.setStatus(0);
System.out.println(applyMerchantService.getApplyMerchantPage(condition));
}
@Test
public void testConfirmMerchant(){
MerchantConfirmRpcRequest rpcRequest = new MerchantConfirmRpcRequest();
rpcRequest.setId(25);
rpcRequest.setMerchantId(44211546);
rpcRequest.setMerchantName("晨星直营服务商");
System.out.println(applyMerchantService.confirmMerchant(rpcRequest));
}
@Test
public void testAddApplyMerchant(){
MerchantApplyRpcRequest request = new MerchantApplyRpcRequest();
// 服务商信息
request.setServiceMerchantId(44211459);
request.setServiceMerchantName("xzsgc");
request.setServiceMerchantPhone("15079168013");
// 申请门店信息
request.setApplyMerchantName("测试一下哈");
request.setCarType("车型");
request.setBaseCustomer("几盘客户");
request.setPhone("19527148013");
request.setMerchantContact("门店联系人");
System.out.println(applyMerchantService.addApplyMerchant(request));
}
@Test
public void testGetMerchantDetailByMerchantNo(){
MerchantResponse merchantDetailByMerchantNo = applyMerchantService.getMerchantDetailByMerchantNo(44211514);
System.out.println(merchantDetailByMerchantNo);
}
@Test
public void getMerchantListBySceneRemote(){
MerchantBySceneRemoteRpcRequest request = new MerchantBySceneRemoteRpcRequest();
request.setServiceMerchantId(44209845);
System.out.println(applyMerchantService.getMerchantListBySceneRemote(request));
}
}