|
|
@@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
9
|
9
|
import com.ruoyi.common.config.RuoYiConfig;
|
|
10
|
10
|
import com.ruoyi.common.constant.CacheConstants;
|
|
11
|
11
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
12
|
+import com.ruoyi.common.core.domain.entity.SysRole;
|
|
12
|
13
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
13
|
14
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
|
14
|
15
|
import com.ruoyi.common.core.redis.RedisCache;
|
|
|
@@ -16,7 +17,9 @@ import com.ruoyi.common.utils.SecurityUtils;
|
|
16
|
17
|
import com.ruoyi.common.utils.SmsUtils;
|
|
17
|
18
|
import com.ruoyi.common.utils.StringUtils;
|
|
18
|
19
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
|
|
20
|
+import com.ruoyi.system.mapper.SysRoleMapper;
|
|
19
|
21
|
import com.ruoyi.system.mapper.SysUserMapper;
|
|
|
22
|
+import com.ruoyi.system.mapper.SysUserRoleMapper;
|
|
20
|
23
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
|
21
|
24
|
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
|
22
|
25
|
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
|
|
@@ -56,6 +59,7 @@ import java.util.concurrent.ExecutorService;
|
|
56
|
59
|
import java.util.concurrent.Executors;
|
|
57
|
60
|
import java.util.concurrent.TimeUnit;
|
|
58
|
61
|
|
|
|
62
|
+import static com.ruoyi.common.core.domain.AjaxResult.success;
|
|
59
|
63
|
import static com.ruoyi.common.utils.file.FileUploadUtils.getAbsoluteFile;
|
|
60
|
64
|
import static com.ruoyi.common.utils.file.FileUploadUtils.getPathFileName;
|
|
61
|
65
|
|
|
|
@@ -83,6 +87,8 @@ public class VideoServiceImpl implements VideoService {
|
|
83
|
87
|
private CaseApplicationMapper caseApplicationMapper;
|
|
84
|
88
|
@Autowired
|
|
85
|
89
|
private CaseAttachMapper caseAttachMapper;
|
|
|
90
|
+ @Autowired
|
|
|
91
|
+ private SysRoleMapper roleMapper;
|
|
86
|
92
|
|
|
87
|
93
|
/**
|
|
88
|
94
|
* 功能:第三方回调sign校验
|
|
|
@@ -137,7 +143,7 @@ public class VideoServiceImpl implements VideoService {
|
|
137
|
143
|
@Override
|
|
138
|
144
|
public AjaxResult bindCaseId(Long caseId, String roomId) {
|
|
139
|
145
|
caseApplicationMapper .bindCaseId(caseId,roomId);
|
|
140
|
|
- return AjaxResult.success();
|
|
|
146
|
+ return success();
|
|
141
|
147
|
}
|
|
142
|
148
|
|
|
143
|
149
|
@Override
|
|
|
@@ -147,7 +153,7 @@ public class VideoServiceImpl implements VideoService {
|
|
147
|
153
|
caseApplication.setAnnexType(9);
|
|
148
|
154
|
List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
|
|
149
|
155
|
if(CollectionUtil.isEmpty(caseAttachList)){
|
|
150
|
|
- return AjaxResult.success();
|
|
|
156
|
+ return success();
|
|
151
|
157
|
}
|
|
152
|
158
|
for (CaseAttach caseAttach : caseAttachList) {
|
|
153
|
159
|
String annexName = caseAttach.getAnnexName();
|
|
|
@@ -162,7 +168,7 @@ public class VideoServiceImpl implements VideoService {
|
|
162
|
168
|
caseAttach.setAnnexName(annexNamenew);
|
|
163
|
169
|
}
|
|
164
|
170
|
}
|
|
165
|
|
- return AjaxResult.success(caseAttachList);
|
|
|
171
|
+ return success(caseAttachList);
|
|
166
|
172
|
}
|
|
167
|
173
|
|
|
168
|
174
|
/**
|
|
|
@@ -227,7 +233,7 @@ public class VideoServiceImpl implements VideoService {
|
|
227
|
233
|
// 返回的resp是一个CreateCloudRecordingResponse的实例,与请求对象对应
|
|
228
|
234
|
CreateCloudRecordingResponse resp = client.CreateCloudRecording(req);
|
|
229
|
235
|
|
|
230
|
|
- return AjaxResult.success((JSONObject) JSON.toJSON(resp));
|
|
|
236
|
+ return success((JSONObject) JSON.toJSON(resp));
|
|
231
|
237
|
} catch (TencentCloudSDKException e) {
|
|
232
|
238
|
return AjaxResult.error(e.toString());
|
|
233
|
239
|
}
|
|
|
@@ -259,7 +265,7 @@ public class VideoServiceImpl implements VideoService {
|
|
259
|
265
|
// 返回的resp是一个DeleteCloudRecordingResponse的实例,与请求对象对应
|
|
260
|
266
|
DeleteCloudRecordingResponse resp = client.DeleteCloudRecording(req);
|
|
261
|
267
|
// 输出json格式的字符串回包
|
|
262
|
|
- return AjaxResult.success((JSONObject) JSON.toJSON(resp));
|
|
|
268
|
+ return success((JSONObject) JSON.toJSON(resp));
|
|
263
|
269
|
} catch (TencentCloudSDKException e) {
|
|
264
|
270
|
return AjaxResult.error(e.toString());
|
|
265
|
271
|
}
|
|
|
@@ -282,13 +288,30 @@ public class VideoServiceImpl implements VideoService {
|
|
282
|
288
|
req.setRoomId(roomId);
|
|
283
|
289
|
try {
|
|
284
|
290
|
DismissRoomResponse resp = client.DismissRoom(req);
|
|
285
|
|
- return AjaxResult.success((JSONObject) JSON.toJSON(resp));
|
|
|
291
|
+ return success((JSONObject) JSON.toJSON(resp));
|
|
286
|
292
|
} catch (TencentCloudSDKException e) {
|
|
287
|
293
|
return AjaxResult.error("解散房间失败");
|
|
288
|
294
|
}
|
|
289
|
295
|
|
|
290
|
296
|
}
|
|
291
|
297
|
|
|
|
298
|
+ @Override
|
|
|
299
|
+ public AjaxResult secretaryRoleByUserId(Long userId) {
|
|
|
300
|
+ List<SysRole> roles = roleMapper.selectRolePermissionByUserId(userId);
|
|
|
301
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
302
|
+ boolean isSecretaryRole=false;
|
|
|
303
|
+ if(CollectionUtil.isNotEmpty(roles)){
|
|
|
304
|
+ for (SysRole role : roles) {
|
|
|
305
|
+ if("法律顾问".equals(role.getRoleName()) || "秘书".equals(role.getRoleName())){
|
|
|
306
|
+ isSecretaryRole=true;
|
|
|
307
|
+ break;
|
|
|
308
|
+ }
|
|
|
309
|
+ }
|
|
|
310
|
+ }
|
|
|
311
|
+ jsonObject.put("isSecretaryRole",isSecretaryRole);
|
|
|
312
|
+ return success(jsonObject);
|
|
|
313
|
+ }
|
|
|
314
|
+
|
|
292
|
315
|
|
|
293
|
316
|
/**
|
|
294
|
317
|
* 查询出音视频集合,并下载,在将云点播上面的音视频删除
|