ActivityServiceTest.java
2.66 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
77
78
79
package cn.com.glsx.dj.weapp.service;
import cn.com.glsx.dj.marketing.dto.ShopActivityOperationLogDTO;
import cn.com.glsx.dj.marketing.model.ShopActivityInfo;
import cn.com.glsx.dj.marketing.model.ShopActivityOperationLog;
import cn.com.glsx.dj.weapp.vo.ActivityVO;
import cn.com.glsx.dj.weapp.vo.LogRecordVO;
import cn.com.glsx.dj.weapp.vo.MyActivityDetailVO;
import cn.com.glsx.dj.weapp.vo.ShopActivityInfoVO;
import cn.com.glsx.framework.core.beans.ResultEntity;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
public class ActivityServiceTest extends BaseServiceTest {
@Autowired
private ActivityService activityService;
@Test
public void listActivityByStatusTest(){
ActivityVO vo = new ActivityVO();
vo.setMerchantId(122913);
ResultEntity<RpcPagination<ShopActivityInfo>> resultEntity = activityService.listActivityByStatus(vo);
System.out.println(resultEntity);
}
@Test
public void detailTest(){
Integer merchantId = 122913;
Integer activityId = 245;
Integer userId = 1;
MyActivityDetailVO detailVO = new MyActivityDetailVO();
ResultEntity<ShopActivityInfoVO> resultEntity = activityService.detail(detailVO);
System.out.println(resultEntity);
}
@Test
public void createLogRecordTest(){
ShopActivityOperationLogDTO dto = new ShopActivityOperationLogDTO();
Integer merchantId = 122913;
Integer activityId = 245;
Integer employeId = 2;
Integer referActivityId = 245;
String phone = "15827414292";
Integer operationType = 4;
String wechatName = "yangjia";
String wechatLogon = "xxxxx";
dto.setMerchantId(merchantId);
dto.setActivityId(activityId.longValue());
dto.setEmployeeId(employeId);
dto.setReferActivityId(referActivityId.longValue());
dto.setOperationType(operationType);
dto.setWechatName(wechatName);
dto.setWechatLogo(wechatLogon);
dto.setCreatedBy(phone);
dto.setMobile(phone);
dto.setUserId(1);
ResultEntity<Integer> resultEntity = activityService.createLogRecord(dto);
System.out.println(resultEntity);
}
@Test
public void listLogRecordTest(){
LogRecordVO vo = new LogRecordVO();
Integer merchantId = 122913;
Integer activityId = 245;
vo.setActivityId(activityId);
vo.setMerchantId(merchantId);
ResultEntity<RpcPagination<ShopActivityOperationLog>> resultEntity = activityService.listLogRecord(vo);
System.out.println(resultEntity);
}
}