BatchMomentController.java
3.71 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
package cn.com.glsx.entmicro.controller.wechatcloudcontrol;
import cn.com.glsx.entmicro.request.wechatcloudcontrol.batchmoment.BatchMomentCreateRopRequest;
import cn.com.glsx.entmicro.request.wechatcloudcontrol.batchmoment.BatchMomentQueryRopRequest;
import cn.com.glsx.entmicro.request.wechatcloudcontrol.batchmoment.BatchMomentStaffRecordQueryRopRequest;
import cn.com.glsx.entmicro.response.wechatcloudcontrol.batchmoment.BatchMomentRopResponse;
import cn.com.glsx.entmicro.response.wechatcloudcontrol.batchmoment.BatchMomentStaffRecordRopResponse;
import cn.com.glsx.entmicro.service.wechatcloudcontrol.BatchMomentService;
import cn.com.glsx.entmicro.utils.Pagination;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Author yelq
* @Version 1.0
* @Description: 朋友圈群发
* @Date 2022/9/16 17:11
*/
@Slf4j
@Api("朋友圈群发任务")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
public class BatchMomentController {
@Autowired
private BatchMomentService batchMomentService;
@ServiceMethod(method = "entmicro.api.wechatcloudcontrol.batchmoment.save")
@ApiOperation("朋友圈群发任务创建")
public RopResponse<Boolean> batchMomentSave(BatchMomentCreateRopRequest request) {
try {
return RopResponse.success(batchMomentService.batchMomentSave(request));
} catch (RpcServiceException e) {
log.info("=======BatchMomentController_batchMomentSave_invoke__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.wechatcloudcontrol.batchmoment.condition.page")
@ApiOperation("朋友圈群发任务多条件分页查询")
public RopResponse<Pagination<BatchMomentRopResponse>> batchMomentConditionPage(BatchMomentQueryRopRequest request) {
try {
return RopResponse.success(batchMomentService.batchMomentConditionPage(request));
} catch (RpcServiceException e) {
log.info("=======BatchMomentController_batchMomentConditionPage_invoke__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.wechatcloudcontrol.batchmoment.record.page")
@ApiOperation("发送记录分页查询")
public RopResponse<Pagination<BatchMomentStaffRecordRopResponse>> batchMomentStaffRecordPage(BatchMomentStaffRecordQueryRopRequest request) {
try {
return RopResponse.success(batchMomentService.batchMomentStaffRecordPage(request));
} catch (RpcServiceException e) {
log.info("=======BatchMomentController_batchMomentStaffRecordPage_invoke__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.wechatcloudcontrol.batchmoment.send.stop")
@ApiOperation("朋友圈停止发送")
public RopResponse<Boolean> stopBatchMomentSend(BatchMomentStaffRecordQueryRopRequest request) {
try {
return RopResponse.success(batchMomentService.stopBatchMomentSend(request));
} catch (RpcServiceException e) {
log.info("=======BatchMomentController_stopBatchMomentSend_invoke__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}