|
|
@@ -22,11 +22,14 @@ import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.ui.Model;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.servlet.ModelAndView;
|
|
|
import vip.xiaonuo.auth.core.util.StpLoginUserUtil;
|
|
|
import vip.xiaonuo.common.annotation.CommonLog;
|
|
|
import vip.xiaonuo.common.pojo.CommonResult;
|
|
|
@@ -87,6 +90,12 @@ public class ResourceRecordController {
|
|
|
@Resource
|
|
|
private PinyinUtils pinyinUtils;
|
|
|
|
|
|
+ @Value("${resource.sharelink.stu}")
|
|
|
+ private String stuResourceShareLink;
|
|
|
+
|
|
|
+ @Value("${resource.sharelink.tea}")
|
|
|
+ private String teaResourceShareLink;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 资源管理-课程下拉列表
|
|
|
@@ -158,6 +167,8 @@ public class ResourceRecordController {
|
|
|
@GetMapping("/disk/resourcecentre/page")
|
|
|
public CommonResult<Page<Map<String,Object>>> resourcecentrePage(CourseAuditRecordPageParam courseAuditRecordPageParam, HttpServletRequest req) {
|
|
|
Map param =new HashMap();
|
|
|
+ param.put("startTime", req.getParameter("startTime"));
|
|
|
+ param.put("endTime", req.getParameter("endTime"));
|
|
|
//资源中心排序标识,0最新,1热门,默认为0
|
|
|
String sortflag="0";
|
|
|
if(StringUtils.isNotEmpty(req.getParameter("sortflag")))sortflag=req.getParameter("sortflag");
|
|
|
@@ -401,9 +412,10 @@ public class ResourceRecordController {
|
|
|
public CommonResult<Map<String,Object>> getShareLink(@Valid CourseAuditRecordIdParam courseAuditRecordIdParam, HttpServletRequest req) {
|
|
|
Map result=new HashMap();
|
|
|
String id=req.getParameter("id");
|
|
|
- CourseAuditRecord courseAuditRecord=courseAuditRecordService.queryEntity(id);
|
|
|
- String userfileId=courseAuditRecord.getUserfileId();
|
|
|
- String shareLink="/api/webapp/resourceFile/downloadfile?userFileId="+userfileId+"&admin=true";
|
|
|
+// CourseAuditRecord courseAuditRecord=courseAuditRecordService.queryEntity(id);
|
|
|
+// String userfileId=courseAuditRecord.getUserfileId();
|
|
|
+// String shareLink="/api/webapp/resourceFile/downloadfile?userFileId="+userfileId+"&admin=true";
|
|
|
+ String shareLink="/api/webapp/disk/courseauditrecord/getShareInfoPage?id="+id;
|
|
|
result.put("shareLink", shareLink);
|
|
|
return CommonResult.data(result);
|
|
|
}
|
|
|
@@ -588,4 +600,24 @@ public class ResourceRecordController {
|
|
|
return CommonResult.data(result);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 资源管理-获取分享链接页面
|
|
|
+ *
|
|
|
+ */
|
|
|
+ @ApiOperationSupport(order = 5)
|
|
|
+ @ApiOperation("资源管理-获取分享链接页面")
|
|
|
+ @GetMapping("/disk/courseauditrecord/getShareInfoPage")
|
|
|
+ public ModelAndView getShareInfoPage(HttpServletRequest req) { // 返回ModelAndView
|
|
|
+ String id = req.getParameter("id");
|
|
|
+ String stuShareLink = stuResourceShareLink + "?id=" + id;
|
|
|
+ String teaShareLink = teaResourceShareLink + "?id=" + id;
|
|
|
+
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ mav.setViewName("share-page"); // 设置视图名称
|
|
|
+ mav.addObject("stuLink", stuShareLink); // 添加数据
|
|
|
+ mav.addObject("tealink", teaShareLink);
|
|
|
+
|
|
|
+ return mav; // 返回ModelAndView对象
|
|
|
+ }
|
|
|
+
|
|
|
}
|