任教课程-进入课程接口 sql增加删除状态筛选
This commit is contained in:
parent
e1cbeecf8b
commit
eb6f1e59dd
|
@ -112,7 +112,7 @@ public class KcKechengbiaoController extends JeecgController<KcKechengbiao, IKcK
|
|||
IPage<KcKechengbiao> pageList = kcKechengbiaoService.listGroupBy(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
|
@ -127,7 +127,7 @@ public class KcKechengbiaoController extends JeecgController<KcKechengbiao, IKcK
|
|||
kcKechengbiaoService.save(kcKechengbiao);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
|
@ -187,7 +187,7 @@ public class KcKechengbiaoController extends JeecgController<KcKechengbiao, IKcK
|
|||
kcKechengbiaoService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
|
@ -202,7 +202,7 @@ public class KcKechengbiaoController extends JeecgController<KcKechengbiao, IKcK
|
|||
this.kcKechengbiaoService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
|
@ -331,6 +331,7 @@ public class KcKechengbiaoController extends JeecgController<KcKechengbiao, IKcK
|
|||
QueryWrapper<KcKechengbiao> kcKechengbiaoQueryWrapper = new QueryWrapper<>();
|
||||
kcKechengbiaoQueryWrapper.eq("rwbh",rwbh);
|
||||
kcKechengbiaoQueryWrapper.eq("xqxn",xqxn);
|
||||
kcKechengbiaoQueryWrapper.eq("flag","0");
|
||||
kcKechengbiaoQueryWrapper.last("limit 1");
|
||||
KcKechengbiao kcKechengbiao = kcKechengbiaoService.getOne(kcKechengbiaoQueryWrapper);
|
||||
return Result.OK(kcKechengbiao);
|
||||
|
|
|
@ -31,100 +31,29 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: kc_casusers
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-05-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
* @Description: kc_casusers
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-05-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/v3/3rd")
|
||||
@Slf4j
|
||||
public class WpsController extends JeecgController<KcCasusers, IKcCasusersService> {
|
||||
@Autowired
|
||||
private IZyInfoStudentService zyInfoStudentService;
|
||||
@Autowired
|
||||
private IZyInfoStudentService zyInfoStudentService;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
/**
|
||||
* 文档预览
|
||||
*
|
||||
* @param fileId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/files/{fileId}", method = {RequestMethod.GET})
|
||||
public Map<String,Object> files(@PathVariable("fileId") String fileId) {
|
||||
|
||||
ZyInfoStudent zyInfoStudent = zyInfoStudentService.getById(fileId);
|
||||
WpsEnti map = new WpsEnti();
|
||||
map.setId(zyInfoStudent.getId());
|
||||
map.setName(zyInfoStudent.getFilePath());
|
||||
map.setVersion(1);
|
||||
map.setSize(1);
|
||||
map.setName(zyInfoStudent.getFilePath().substring(zyInfoStudent.getFilePath().lastIndexOf("/")+1));
|
||||
Long createTime = zyInfoStudent.getCreateTime().getTime()/1000;
|
||||
Long updateTime = zyInfoStudent.getUpdateTime().getTime()/1000;
|
||||
map.setCreate_time(Integer.parseInt(createTime+""));
|
||||
map.setModify_time(Integer.parseInt(updateTime+""));
|
||||
map.setCreator_id(zyInfoStudent.getCreateBy());
|
||||
map.setModifier_id(zyInfoStudent.getUpdateBy());
|
||||
Map<String,Object> mapRet = new HashMap<>();
|
||||
mapRet.put("code",0);
|
||||
mapRet.put("data",map);
|
||||
return mapRet;
|
||||
}
|
||||
|
||||
/**
|
||||
* 文件下载地址
|
||||
* @param fileId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/files/{fileId}/download", method = {RequestMethod.GET})
|
||||
public Map<String,Object> download(@PathVariable("fileId") String fileId) {
|
||||
ZyInfoStudent zyInfoStudent = zyInfoStudentService.getById(fileId);
|
||||
Map<String,Object> mapRet = new HashMap<>();
|
||||
Map<String,Object> mapRet2 = new HashMap<>();
|
||||
// https://kczxcs.nenu.edu.cn/jeecg-boot/sys/common/static/temp/QA%E4%BD%9C%E4%B8%9A%E7%B3%BB%E7%BB%9F%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98_1733101749150.docx
|
||||
mapRet2.put("url","https://kczxcs.nenu.edu.cn/jeecg-boot/sys/common/static/"+zyInfoStudent.getFilePath());
|
||||
mapRet.put("code",0);
|
||||
mapRet.put("data",mapRet2);
|
||||
return mapRet;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取文档用户权限
|
||||
* @param fileId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/files/{fileId}/permission", method = {RequestMethod.GET})
|
||||
public Map<String,Object> permission(@PathVariable("fileId") String fileId) {
|
||||
ZyInfoStudent zyInfoStudent = zyInfoStudentService.getById(fileId);
|
||||
Map<String,Object> mapRet = new HashMap<>();
|
||||
Map<String,Object> mapRet2 = new HashMap<>();
|
||||
mapRet.put("code",0);
|
||||
mapRet2.put("comment",1);
|
||||
// mapRet2.put("copy",1);
|
||||
mapRet2.put("download",1);
|
||||
mapRet2.put("history",1);
|
||||
mapRet2.put("print",1);
|
||||
mapRet2.put("read",1);
|
||||
// mapRet2.put("rename",1);
|
||||
// mapRet2.put("saveas",1);
|
||||
mapRet2.put("update",1);
|
||||
mapRet2.put("user_id",zyInfoStudent.getCreateBy());
|
||||
|
||||
mapRet.put("data",mapRet2);
|
||||
return mapRet;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 文档预览
|
||||
* @param fileId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/files/{fileId}/versions", method = {RequestMethod.GET})
|
||||
public Map<String,Object> versions(@PathVariable("fileId") String fileId) {
|
||||
@RequestMapping(value = "/files/{fileId}", method = {RequestMethod.GET})
|
||||
public Map<String, Object> files(@PathVariable("fileId") String fileId) {
|
||||
|
||||
ZyInfoStudent zyInfoStudent = zyInfoStudentService.getById(fileId);
|
||||
WpsEnti map = new WpsEnti();
|
||||
|
@ -132,91 +61,168 @@ public class WpsController extends JeecgController<KcCasusers, IKcCasusersServic
|
|||
map.setName(zyInfoStudent.getFilePath());
|
||||
map.setVersion(1);
|
||||
map.setSize(1);
|
||||
map.setName(zyInfoStudent.getFilePath().substring(zyInfoStudent.getFilePath().lastIndexOf("/")+1));
|
||||
Long createTime = zyInfoStudent.getCreateTime().getTime()/1000;
|
||||
Long updateTime = zyInfoStudent.getUpdateTime().getTime()/1000;
|
||||
map.setCreate_time(Integer.parseInt(createTime+""));
|
||||
map.setModify_time(Integer.parseInt(updateTime+""));
|
||||
map.setName(zyInfoStudent.getFilePath().substring(zyInfoStudent.getFilePath().lastIndexOf("/") + 1));
|
||||
Long createTime = zyInfoStudent.getCreateTime().getTime() / 1000;
|
||||
Long updateTime = zyInfoStudent.getUpdateTime().getTime() / 1000;
|
||||
map.setCreate_time(Integer.parseInt(createTime + ""));
|
||||
map.setModify_time(Integer.parseInt(updateTime + ""));
|
||||
map.setCreator_id(zyInfoStudent.getCreateBy());
|
||||
map.setModifier_id(zyInfoStudent.getUpdateBy());
|
||||
Map<String,Object> mapRet = new HashMap<>();
|
||||
mapRet.put("code",0);
|
||||
mapRet.put("data",map);
|
||||
Map<String, Object> mapRet = new HashMap<>();
|
||||
mapRet.put("code", 0);
|
||||
mapRet.put("data", map);
|
||||
return mapRet;
|
||||
}
|
||||
|
||||
/**
|
||||
* 文件下载地址
|
||||
*
|
||||
* @param fileId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/files/{fileId}/download", method = {RequestMethod.GET})
|
||||
public Map<String, Object> download(@PathVariable("fileId") String fileId) {
|
||||
ZyInfoStudent zyInfoStudent = zyInfoStudentService.getById(fileId);
|
||||
Map<String, Object> mapRet = new HashMap<>();
|
||||
Map<String, Object> mapRet2 = new HashMap<>();
|
||||
// https://kczxcs.nenu.edu.cn/jeecg-boot/sys/common/static/temp/QA%E4%BD%9C%E4%B8%9A%E7%B3%BB%E7%BB%9F%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98_1733101749150.docx
|
||||
mapRet2.put("url", "https://kczxcs.nenu.edu.cn/jeecg-boot/sys/common/static/" + zyInfoStudent.getFilePath());
|
||||
mapRet.put("code", 0);
|
||||
mapRet.put("data", mapRet2);
|
||||
return mapRet;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取文档用户权限
|
||||
*
|
||||
* @param fileId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/files/{fileId}/permission", method = {RequestMethod.GET})
|
||||
public Map<String, Object> permission(@PathVariable("fileId") String fileId,
|
||||
@RequestHeader(value = "X-WebOffice-Token", required = false) String webOfficeToken) {
|
||||
ZyInfoStudent zyInfoStudent = zyInfoStudentService.getById(fileId);
|
||||
Map<String, Object> mapRet = new HashMap<>();
|
||||
Map<String, Object> mapRet2 = new HashMap<>();
|
||||
mapRet.put("code", 0);
|
||||
mapRet2.put("comment", 1);
|
||||
// mapRet2.put("copy",1);
|
||||
mapRet2.put("download", 1);
|
||||
mapRet2.put("history", 1);
|
||||
mapRet2.put("print", 1);
|
||||
mapRet2.put("read", 1);
|
||||
// mapRet2.put("rename",1);
|
||||
// mapRet2.put("saveas",1);
|
||||
mapRet2.put("update", webOfficeToken.equals(zyInfoStudent.getCreateBy()) ? 0 : 1);
|
||||
// mapRet2.put("user_id",zyInfoStudent.getCreateBy());
|
||||
mapRet2.put("user_id", webOfficeToken);
|
||||
mapRet.put("data", mapRet2);
|
||||
return mapRet;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 文档预览
|
||||
*
|
||||
* @param fileId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/files/{fileId}/versions", method = {RequestMethod.GET})
|
||||
public Map<String, Object> versions(@PathVariable("fileId") String fileId) {
|
||||
|
||||
ZyInfoStudent zyInfoStudent = zyInfoStudentService.getById(fileId);
|
||||
WpsEnti map = new WpsEnti();
|
||||
map.setId(zyInfoStudent.getId());
|
||||
map.setName(zyInfoStudent.getFilePath());
|
||||
map.setVersion(1);
|
||||
map.setSize(1);
|
||||
map.setName(zyInfoStudent.getFilePath().substring(zyInfoStudent.getFilePath().lastIndexOf("/") + 1));
|
||||
Long createTime = zyInfoStudent.getCreateTime().getTime() / 1000;
|
||||
Long updateTime = zyInfoStudent.getUpdateTime().getTime() / 1000;
|
||||
map.setCreate_time(Integer.parseInt(createTime + ""));
|
||||
map.setModify_time(Integer.parseInt(updateTime + ""));
|
||||
map.setCreator_id(zyInfoStudent.getCreateBy());
|
||||
map.setModifier_id(zyInfoStudent.getUpdateBy());
|
||||
Map<String, Object> mapRet = new HashMap<>();
|
||||
mapRet.put("code", 0);
|
||||
mapRet.put("data", map);
|
||||
return mapRet;
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(value = "/users")
|
||||
public Map<String, Object> users(@RequestParam(name="user_ids",required=true) String user_ids) {
|
||||
public Map<String, Object> users(@RequestParam(name = "user_ids", required = true) String user_ids) {
|
||||
System.out.println("user_ids : " + user_ids);
|
||||
String userIds[] = user_ids.split(",");
|
||||
List<Map<String,Object>> list = new ArrayList<>();
|
||||
Map<String,Object> mapRet = new HashMap<>();
|
||||
mapRet.put("code",0);
|
||||
for(String userId : userIds){
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
Map<String, Object> mapRet = new HashMap<>();
|
||||
mapRet.put("code", 0);
|
||||
for (String userId : userIds) {
|
||||
SysUser sysUser = sysUserService.getUserByName(userId);
|
||||
System.out.println("sysUser : " + sysUser);
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("id",sysUser.getUsername());
|
||||
map.put("name",sysUser.getRealname());
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("id", sysUser.getUsername());
|
||||
map.put("name", sysUser.getRealname());
|
||||
list.add(map);
|
||||
}
|
||||
|
||||
mapRet.put("data",list);
|
||||
mapRet.put("data", list);
|
||||
return mapRet;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 准备上传阶段
|
||||
*
|
||||
* @param fileId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/files/{fileId}/upload/prepare", method = {RequestMethod.GET})
|
||||
public Map<String,Object> prepare(@PathVariable("fileId") String fileId) {
|
||||
Map<String,Object> mapRet = new HashMap<>();
|
||||
mapRet.put("code",0);
|
||||
Map<String,Object> mapRet2 = new HashMap<>();
|
||||
String jmArr[] = {"sha1"};
|
||||
mapRet2.put("digest_types",jmArr);
|
||||
mapRet.put("data",mapRet2);
|
||||
mapRet.put("message","");
|
||||
return mapRet;
|
||||
}
|
||||
@RequestMapping(value = "/files/{fileId}/upload/prepare", method = {RequestMethod.GET})
|
||||
public Map<String, Object> prepare(@PathVariable("fileId") String fileId) {
|
||||
Map<String, Object> mapRet = new HashMap<>();
|
||||
mapRet.put("code", 0);
|
||||
Map<String, Object> mapRet2 = new HashMap<>();
|
||||
String jmArr[] = {"sha1"};
|
||||
mapRet2.put("digest_types", jmArr);
|
||||
mapRet.put("data", mapRet2);
|
||||
mapRet.put("message", "");
|
||||
return mapRet;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/files/{fileId}/upload/address", method = {RequestMethod.POST})
|
||||
public Map<String,Object> address(@PathVariable("fileId") String fileId, @RequestBody WpsUploadEnti wpsUploadEnti) {
|
||||
ZyInfoStudent zyInfoStudent = zyInfoStudentService.getById(fileId);
|
||||
Map<String,Object> mapRet = new HashMap<>();
|
||||
mapRet.put("code",0);
|
||||
Map<String,Object> mapRet2 = new HashMap<>();
|
||||
mapRet2.put("url","https://kczxcs.nenu.edu.cn/jeecg-boot/sys/common/static/"+zyInfoStudent.getFilePath());
|
||||
mapRet2.put("method","POST");
|
||||
mapRet.put("data",mapRet2);
|
||||
mapRet.put("message","");
|
||||
return mapRet;
|
||||
}
|
||||
@RequestMapping(value = "/files/{fileId}/upload/address", method = {RequestMethod.POST})
|
||||
public Map<String, Object> address(@PathVariable("fileId") String fileId, @RequestBody WpsUploadEnti wpsUploadEnti) {
|
||||
ZyInfoStudent zyInfoStudent = zyInfoStudentService.getById(fileId);
|
||||
Map<String, Object> mapRet = new HashMap<>();
|
||||
mapRet.put("code", 0);
|
||||
Map<String, Object> mapRet2 = new HashMap<>();
|
||||
mapRet2.put("url", "https://kczxcs.nenu.edu.cn/jeecg-boot/sys/common/static/" + zyInfoStudent.getFilePath());
|
||||
mapRet2.put("method", "POST");
|
||||
mapRet.put("data", mapRet2);
|
||||
mapRet.put("message", "");
|
||||
return mapRet;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/files/{fileId}/upload/complete", method = {RequestMethod.POST})
|
||||
public Map<String,Object> complete(@PathVariable("fileId") String fileId, @RequestBody WpsUploadEnti wpsUploadEnti,HttpServletRequest request, HttpServletResponse response) {
|
||||
public Map<String, Object> complete(@PathVariable("fileId") String fileId, @RequestBody WpsUploadEnti wpsUploadEnti, HttpServletRequest request, HttpServletResponse response) {
|
||||
ZyInfoStudent zyInfoStudent = zyInfoStudentService.getById(fileId);
|
||||
Map<String,Object> mapRet = new HashMap<>();
|
||||
mapRet.put("code",0);
|
||||
Map<String, Object> mapRet = new HashMap<>();
|
||||
mapRet.put("code", 0);
|
||||
WpsEnti map = new WpsEnti();
|
||||
map.setId(zyInfoStudent.getId());
|
||||
map.setName(zyInfoStudent.getFilePath());
|
||||
map.setVersion(2);
|
||||
map.setSize(1);
|
||||
map.setName(zyInfoStudent.getFilePath().substring(zyInfoStudent.getFilePath().lastIndexOf("/")+1));
|
||||
Long createTime = zyInfoStudent.getCreateTime().getTime()/1000;
|
||||
Long updateTime = zyInfoStudent.getUpdateTime().getTime()/1000;
|
||||
map.setCreate_time(Integer.parseInt(createTime+""));
|
||||
map.setModify_time(Integer.parseInt(updateTime+""));
|
||||
map.setName(zyInfoStudent.getFilePath().substring(zyInfoStudent.getFilePath().lastIndexOf("/") + 1));
|
||||
Long createTime = zyInfoStudent.getCreateTime().getTime() / 1000;
|
||||
Long updateTime = zyInfoStudent.getUpdateTime().getTime() / 1000;
|
||||
map.setCreate_time(Integer.parseInt(createTime + ""));
|
||||
map.setModify_time(Integer.parseInt(updateTime + ""));
|
||||
map.setCreator_id(zyInfoStudent.getCreateBy());
|
||||
map.setModifier_id(zyInfoStudent.getUpdateBy());
|
||||
mapRet.put("data",map);
|
||||
mapRet.put("message","");
|
||||
mapRet.put("data", map);
|
||||
mapRet.put("message", "");
|
||||
return mapRet;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue