LiveCodeController.java
1.58 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
package cn.com.glsx.stoassistant.controller;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.stoassistant.request.LiveCodeRequest;
import cn.com.glsx.stoassistant.response.LiveCodeResponse;
import cn.com.glsx.stoassistant.service.LiveCodeService;
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;
/**
* 活码管理
*/
@Slf4j
@Api("活码管理")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
public class LiveCodeController {
@Autowired
private LiveCodeService liveCodeService;
/**
* 获取群活码(车主扫码分配真实企微群)
*/
@ServiceMethod(method = "scrm.api.stoassistant.livecode.get", needInSession = NeedInSessionType.YES)
@ApiOperation("获取群活码")
public RopResponse<LiveCodeResponse> getLiveCode(LiveCodeRequest request) {
try {
if (request == null || request.getReportUuidId() == null || request.getReportUuidId().trim().isEmpty()) {
return RopResponse.error("AI收车报告唯一ID不能为空");
}
LiveCodeResponse response = liveCodeService.getLiveCode(request);
return RopResponse.success(response);
} catch (Exception e) {
log.error("获取群活码失败", e);
return RopResponse.error(e.getMessage());
}
}
}