MerchantMissionController.java
5.54 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
package cn.com.glsx.stoassistant.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.stoassistant.model.response.mission.PlatformMerchantMissionInfoResponse;
import cn.com.glsx.stoassistant.model.response.mission.PlatformMerchantStaffMissionDetailResponse;
import cn.com.glsx.stoassistant.model.response.mission.StaffMissionDateResponse;
import cn.com.glsx.stoassistant.request.activity.ActivityMissionInfoRopRequest;
import cn.com.glsx.stoassistant.request.mission.StaffMissionListRopRequest;
import cn.com.glsx.stoassistant.request.mission.StaffMissionRopRequest;
import cn.com.glsx.stoassistant.request.userInfo.MerchantUserFollowInfoRopRequest;
import cn.com.glsx.stoassistant.service.MerchantMissionService;
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;
import java.util.List;
/**
* @BelongsProject: 20221031
* @BelongsPackage: cn.com.glsx.stoassistant.controller
* @Author: 11
* @CreateTime: 2022-10-18 09:51
* @Description: TODO
* @Version: 1.0
*/
@Slf4j
@Api("任务中心门店助手接口")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
public class MerchantMissionController {
@Autowired
private MerchantMissionService merchantMissionService;
/**
* 查询任务,链接跳转
*
* @param staffMissionRopRequest 入参
* @return
*/
@ServiceMethod(method = "stoassistant.api.mission.getMissionById", needInSession = NeedInSessionType.YES)
@ApiOperation("查询任务,链接跳转")
public RopResponse<PlatformMerchantStaffMissionDetailResponse> getMissionById(StaffMissionRopRequest staffMissionRopRequest) {
try {
PlatformMerchantStaffMissionDetailResponse response = merchantMissionService.getMissionById(staffMissionRopRequest);
return RopResponse.success(response);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__getMissionById__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询任务,分享任务
*
* @param staffMissionRopRequest 入参
* @return
*/
@ServiceMethod(method = "stoassistant.api.mission.getMissionByIdAndNoSession", needInSession = NeedInSessionType.NO)
@ApiOperation("查询任务,链接跳转")
public RopResponse<PlatformMerchantStaffMissionDetailResponse> getMissionByIdAndNoSession(StaffMissionRopRequest staffMissionRopRequest) {
try {
PlatformMerchantStaffMissionDetailResponse response = merchantMissionService.getMissionByIdAndNoSession(staffMissionRopRequest);
return RopResponse.success(response);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__getMissionByIdAndNoSession__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询活动
*
* @param staffMissionRopRequest 入参
* @return
*/
@ServiceMethod(method = "stoassistant.api.mission.findStaffMissionList", needInSession = NeedInSessionType.YES)
@ApiOperation("查询活动")
public RopResponse<List<StaffMissionDateResponse>> findStaffMissionList(StaffMissionListRopRequest staffMissionRopRequest) {
try {
List<StaffMissionDateResponse> response = merchantMissionService.findStaffMissionList(staffMissionRopRequest);
return RopResponse.success(response);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__findStaffMissionList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 保存用户跟进线索
*
* @param request 入参
* @return
*/
@ServiceMethod(method = "stoassistant.api.mission.saveMerchantUserFollowInfo", needInSession = NeedInSessionType.YES)
@ApiOperation("保存用户跟进线索")
public RopResponse<Boolean> saveMerchantUserFollowInfo(MerchantUserFollowInfoRopRequest request) {
try {
merchantMissionService.saveMerchantUserFollowInfo(request);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__saveMerchantUserFollowInfo__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 根据活动id查询任务详情
*
* @param activityIdRequest 入参
* @return
*/
@ServiceMethod(method = "stoassistant.api.mission.findMissionByActiviyId", needInSession = NeedInSessionType.YES)
@ApiOperation("根据活动id查询任务详情")
public RopResponse<PlatformMerchantMissionInfoResponse> findMissionByActiviyId(ActivityMissionInfoRopRequest activityIdRequest) {
try {
return RopResponse.success(merchantMissionService.findMissionByActiviyId(activityIdRequest));
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__findMissionByActiviyId__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}