|
@@ -0,0 +1,122 @@
|
|
1
|
+package com.oqpo.api.web.controller.system;
|
|
2
|
+
|
|
3
|
+import com.oqpo.api.enums.DataMessageCode;
|
|
4
|
+import com.oqpo.api.enums.SystemMessageCode;
|
|
5
|
+import com.oqpo.api.mapper.system.VerInfoMapper;
|
|
6
|
+import com.oqpo.api.service.system.JobService;
|
|
7
|
+import com.oqpo.api.service.system.VerInfoService;
|
|
8
|
+import com.oqpo.api.web.dto.request.VerInfo.SaveVerInfoRequest;
|
|
9
|
+import com.oqpo.api.web.dto.request.VerInfo.VerInfoGridRequest;
|
|
10
|
+import com.oqpo.api.web.dto.request.code.SaveCodeRequest;
|
|
11
|
+import com.oqpo.api.web.dto.request.job.JobGridRequest;
|
|
12
|
+import com.oqpo.api.web.dto.response.DataResponse;
|
|
13
|
+import com.oqpo.api.web.dto.response.GridResponse;
|
|
14
|
+import com.oqpo.api.web.dto.response.SaveResponse;
|
|
15
|
+import com.oqpo.api.web.dto.response.stinfo.store.StoreInfoResponse;
|
|
16
|
+import com.oqpo.api.web.dto.response.ver.VerInfoResponse;
|
|
17
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
18
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
19
|
+import io.swagger.annotations.ApiOperation;
|
|
20
|
+import lombok.extern.slf4j.Slf4j;
|
|
21
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
22
|
+import org.springframework.http.ResponseEntity;
|
|
23
|
+import org.springframework.web.bind.annotation.*;
|
|
24
|
+import springfox.documentation.annotations.ApiIgnore;
|
|
25
|
+
|
|
26
|
+import javax.validation.Valid;
|
|
27
|
+
|
|
28
|
+@Slf4j
|
|
29
|
+@RestController
|
|
30
|
+@RequestMapping("/api/verinfo")
|
|
31
|
+public class VerInfoController {
|
|
32
|
+ @Autowired
|
|
33
|
+ private VerInfoService verInfoService;
|
|
34
|
+
|
|
35
|
+ /**
|
|
36
|
+ * 설명 : 앱버전 상세 그리드 리스트
|
|
37
|
+ *
|
|
38
|
+ * @param verInfoGridRequest
|
|
39
|
+ * @return
|
|
40
|
+ * @throws Exception
|
|
41
|
+ */
|
|
42
|
+ @ApiImplicitParams({
|
|
43
|
+ @ApiImplicitParam(name = "X-AUTH-TOKEN", value = "CONN-KEY", required = true, dataType = "String", paramType = "header")
|
|
44
|
+ })
|
|
45
|
+ @ApiOperation(value = "앱버전 그리드 리스트")
|
|
46
|
+ @PostMapping("/detail-grid-list")
|
|
47
|
+ public ResponseEntity<GridResponse> appVerGridList(@RequestBody @Valid VerInfoGridRequest verInfoGridRequest) throws Exception {
|
|
48
|
+ return ResponseEntity.ok(verInfoService.appVerGridList( verInfoGridRequest.toDTO(verInfoGridRequest)));
|
|
49
|
+ }
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+ /**
|
|
53
|
+ * 설명 : 앱버전정보 저장
|
|
54
|
+ *
|
|
55
|
+ * @param userId
|
|
56
|
+ * @param saveVerInfoRequest
|
|
57
|
+ * @return SaveResponse
|
|
58
|
+ * @throws Exception
|
|
59
|
+ */
|
|
60
|
+ @ApiImplicitParams({
|
|
61
|
+ @ApiImplicitParam(name = "X-AUTH-TOKEN", value = "CONN-KEY", required = true, dataType = "String", paramType = "header")
|
|
62
|
+ })
|
|
63
|
+ @ApiOperation(value = "앱버전정보 저장")
|
|
64
|
+ @PostMapping("/save-verinfo")
|
|
65
|
+ public ResponseEntity<SaveResponse> saveVerInfo(@ApiIgnore String userId, @RequestBody @Valid SaveVerInfoRequest saveVerInfoRequest) throws Exception {
|
|
66
|
+ verInfoService.saveAppVer(userId, saveVerInfoRequest);
|
|
67
|
+ return ResponseEntity.ok(SaveResponse.toDTO(SystemMessageCode.SAVE_OK));
|
|
68
|
+ }
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+ /**
|
|
72
|
+ * 설명 : 앱버전 정보
|
|
73
|
+ *
|
|
74
|
+ * @param appNo
|
|
75
|
+ * @return
|
|
76
|
+ * @throws Exception
|
|
77
|
+ */
|
|
78
|
+ @ApiImplicitParams({
|
|
79
|
+ @ApiImplicitParam(name = "X-AUTH-TOKEN", value = "CONN-KEY", required = true, dataType = "String", paramType = "header"),
|
|
80
|
+ @ApiImplicitParam(name = "appNo", value = "앱버전번호", required = true, dataType = "String", paramType = "query")
|
|
81
|
+ })
|
|
82
|
+ @ApiOperation(value = "앱버전 정보")
|
|
83
|
+ @GetMapping("/info-verinfo")
|
|
84
|
+ public ResponseEntity<VerInfoResponse> infoVerInfo(@RequestParam(value = "appNo") String appNo) throws Exception {
|
|
85
|
+ return ResponseEntity.ok(verInfoService.selectVerAppInfo(appNo));
|
|
86
|
+ }
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+ /**
|
|
90
|
+ * 설명 : 앱버전정보 삭제
|
|
91
|
+ *
|
|
92
|
+ * @param userId
|
|
93
|
+ * @param appNo
|
|
94
|
+ * @return SaveResponse
|
|
95
|
+ * @throws Exception
|
|
96
|
+ */
|
|
97
|
+ @ApiImplicitParams({
|
|
98
|
+ @ApiImplicitParam(name = "X-AUTH-TOKEN", value = "CONN-KEY", required = true, dataType = "String", paramType = "header"),
|
|
99
|
+ @ApiImplicitParam(name = "appNo", value = "앱버전번호", required = true, dataType = "String", paramType = "query")
|
|
100
|
+ })
|
|
101
|
+ @ApiOperation(value = "앱버전정보 삭제")
|
|
102
|
+ @PostMapping("/del-verinfo")
|
|
103
|
+ public ResponseEntity<SaveResponse> delVerInfo(@ApiIgnore String userId,@RequestParam(value = "appNo") String appNo ) throws Exception {
|
|
104
|
+ verInfoService.delAppVer(userId, appNo);
|
|
105
|
+ return ResponseEntity.ok(SaveResponse.toDTO(SystemMessageCode.DELETE_OK));
|
|
106
|
+ }
|
|
107
|
+
|
|
108
|
+ /**
|
|
109
|
+ * 설명 : 앱 최신버전정보
|
|
110
|
+ *
|
|
111
|
+ * @param
|
|
112
|
+ * @return
|
|
113
|
+ * @throws Exception
|
|
114
|
+ */
|
|
115
|
+ @ApiOperation(value = "앱 최신버전정보")
|
|
116
|
+ @GetMapping("/info-lastver")
|
|
117
|
+ public ResponseEntity<VerInfoResponse> selectLastVer() throws Exception {
|
|
118
|
+ return ResponseEntity.ok(verInfoService.selectLastVerInfo());
|
|
119
|
+ }
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+}
|