|
@@ -12,6 +12,7 @@ import com.fs.common.core.page.TableDataInfo;
|
|
|
import com.fs.common.enums.BusinessType;
|
|
import com.fs.common.enums.BusinessType;
|
|
|
import com.fs.common.utils.ServletUtils;
|
|
import com.fs.common.utils.ServletUtils;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
|
|
+import com.fs.course.cache.PublicCourseAppCacheNames;
|
|
|
import com.fs.course.config.CourseConfig;
|
|
import com.fs.course.config.CourseConfig;
|
|
|
import com.fs.course.domain.FsUserCourse;
|
|
import com.fs.course.domain.FsUserCourse;
|
|
|
import com.fs.course.params.FsUserCourseConfigParam;
|
|
import com.fs.course.params.FsUserCourseConfigParam;
|
|
@@ -64,9 +65,12 @@ public class FsUserCourseController extends BaseController {
|
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
|
public TableDataInfo list(FsUserCourse fsUserCourse) {
|
|
public TableDataInfo list(FsUserCourse fsUserCourse) {
|
|
|
startPage();
|
|
startPage();
|
|
|
- applyCourseOwnerScope(fsUserCourse);
|
|
|
|
|
- if (fsUserCourse.getIsPrivate() == null) {
|
|
|
|
|
- fsUserCourse.setIsPrivate(1);
|
|
|
|
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
+ Long userId = loginUser.getUser().getUserId();
|
|
|
|
|
+ String json = configService.selectConfigByKey("course.config");
|
|
|
|
|
+ CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(config.getIsBound()) && config.getIsBound()) {
|
|
|
|
|
+ fsUserCourse.setUserId(userId);
|
|
|
}
|
|
}
|
|
|
List<FsUserCourseListPVO> list = fsUserCourseService.selectFsUserCourseListPVO(fsUserCourse);
|
|
List<FsUserCourseListPVO> list = fsUserCourseService.selectFsUserCourseListPVO(fsUserCourse);
|
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
@@ -79,30 +83,15 @@ public class FsUserCourseController extends BaseController {
|
|
|
@GetMapping("/publicList")
|
|
@GetMapping("/publicList")
|
|
|
public TableDataInfo publicList(FsUserCourse fsUserCourse) {
|
|
public TableDataInfo publicList(FsUserCourse fsUserCourse) {
|
|
|
startPage();
|
|
startPage();
|
|
|
- applyCourseOwnerScope(fsUserCourse);
|
|
|
|
|
- if (fsUserCourse.getIsPrivate() == null) {
|
|
|
|
|
- fsUserCourse.setIsPrivate(0);
|
|
|
|
|
- }
|
|
|
|
|
- List<FsUserCourseListPVO> list = fsUserCourseService.selectFsUserCourseListPVO(fsUserCourse);
|
|
|
|
|
- return getDataTable(list);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 课程配置开启「绑定创建人」时,按当前登录后台用户过滤课程归属
|
|
|
|
|
- */
|
|
|
|
|
- private void applyCourseOwnerScope(FsUserCourse query) {
|
|
|
|
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
- if (loginUser == null) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ Long userId = loginUser.getUser().getUserId();
|
|
|
String json = configService.selectConfigByKey("course.config");
|
|
String json = configService.selectConfigByKey("course.config");
|
|
|
- if (ObjectUtil.isEmpty(json)) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
|
|
CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
|
|
|
if (ObjectUtil.isNotEmpty(config.getIsBound()) && config.getIsBound()) {
|
|
if (ObjectUtil.isNotEmpty(config.getIsBound()) && config.getIsBound()) {
|
|
|
- query.setUserId(loginUser.getUserId());
|
|
|
|
|
|
|
+ fsUserCourse.setUserId(userId);
|
|
|
}
|
|
}
|
|
|
|
|
+ List<FsUserCourseListPVO> list = fsUserCourseService.selectFsUserCourseListPVO(fsUserCourse);
|
|
|
|
|
+ return getDataTable(list);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -112,17 +101,16 @@ public class FsUserCourseController extends BaseController {
|
|
|
@Log(title = "课程", businessType = BusinessType.EXPORT)
|
|
@Log(title = "课程", businessType = BusinessType.EXPORT)
|
|
|
@GetMapping("/export")
|
|
@GetMapping("/export")
|
|
|
public AjaxResult export(FsUserCourse fsUserCourse) {
|
|
public AjaxResult export(FsUserCourse fsUserCourse) {
|
|
|
-// com.fs.framework.security.LoginUser loginUser = (com.fs.framework.security.LoginUser) tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
-// Long userId = (loginUser.getCompanyUser() != null ? loginUser.getCompanyUser().getUserId() : null);
|
|
|
|
|
-// String json = configService.selectConfigByKey("course.config");
|
|
|
|
|
-// CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
|
|
|
|
|
-// if (ObjectUtil.isNotEmpty(config.getIsBound()) && config.getIsBound()) {
|
|
|
|
|
-// fsUserCourse.setUserId(userId);
|
|
|
|
|
-// }
|
|
|
|
|
-// List<FsUserCourse> list = fsUserCourseService.selectFsUserCourseList(fsUserCourse);
|
|
|
|
|
-// ExcelUtil<FsUserCourse> util = new ExcelUtil<FsUserCourse>(FsUserCourse.class);
|
|
|
|
|
-// return util.exportExcel(list, "课程数据");
|
|
|
|
|
- throw new RuntimeException("未实现");
|
|
|
|
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
+ Long userId = loginUser.getUser().getUserId();
|
|
|
|
|
+ String json = configService.selectConfigByKey("course.config");
|
|
|
|
|
+ CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(config.getIsBound()) && config.getIsBound()) {
|
|
|
|
|
+ fsUserCourse.setUserId(userId);
|
|
|
|
|
+ }
|
|
|
|
|
+ List<FsUserCourse> list = fsUserCourseService.selectFsUserCourseList(fsUserCourse);
|
|
|
|
|
+ ExcelUtil<FsUserCourse> util = new ExcelUtil<FsUserCourse>(FsUserCourse.class);
|
|
|
|
|
+ return util.exportExcel(list, "课程数据");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -132,17 +120,16 @@ public class FsUserCourseController extends BaseController {
|
|
|
@Log(title = "课程", businessType = BusinessType.EXPORT)
|
|
@Log(title = "课程", businessType = BusinessType.EXPORT)
|
|
|
@GetMapping("/publicExport")
|
|
@GetMapping("/publicExport")
|
|
|
public AjaxResult publicExport(FsUserCourse fsUserCourse) {
|
|
public AjaxResult publicExport(FsUserCourse fsUserCourse) {
|
|
|
-// com.fs.framework.security.LoginUser loginUser = (com.fs.framework.security.LoginUser) tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
-// Long userId = (loginUser.getCompanyUser() != null ? loginUser.getCompanyUser().getUserId() : null);
|
|
|
|
|
-// String json = configService.selectConfigByKey("course.config");
|
|
|
|
|
-// CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
|
|
|
|
|
-// if (ObjectUtil.isNotEmpty(config.getIsBound()) && config.getIsBound()) {
|
|
|
|
|
-// fsUserCourse.setUserId(userId);
|
|
|
|
|
-// }
|
|
|
|
|
-// List<FsUserCourse> list = fsUserCourseService.selectFsUserCourseList(fsUserCourse);
|
|
|
|
|
-// ExcelUtil<FsUserCourse> util = new ExcelUtil<FsUserCourse>(FsUserCourse.class);
|
|
|
|
|
-// return util.exportExcel(list, "课程数据");
|
|
|
|
|
- throw new RuntimeException("未实现");
|
|
|
|
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
+ Long userId = loginUser.getUser().getUserId();
|
|
|
|
|
+ String json = configService.selectConfigByKey("course.config");
|
|
|
|
|
+ CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(config.getIsBound()) && config.getIsBound()) {
|
|
|
|
|
+ fsUserCourse.setUserId(userId);
|
|
|
|
|
+ }
|
|
|
|
|
+ List<FsUserCourse> list = fsUserCourseService.selectFsUserCourseList(fsUserCourse);
|
|
|
|
|
+ ExcelUtil<FsUserCourse> util = new ExcelUtil<FsUserCourse>(FsUserCourse.class);
|
|
|
|
|
+ return util.exportExcel(list, "课程数据");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -170,18 +157,23 @@ public class FsUserCourseController extends BaseController {
|
|
|
@Log(title = "课程", businessType = BusinessType.INSERT)
|
|
@Log(title = "课程", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
@PostMapping
|
|
|
public AjaxResult add(@RequestBody FsUserCourse fsUserCourse) {
|
|
public AjaxResult add(@RequestBody FsUserCourse fsUserCourse) {
|
|
|
-// com.fs.framework.security.LoginUser loginUser = (com.fs.framework.security.LoginUser) tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
-// Long userId = (loginUser.getCompanyUser() != null ? loginUser.getCompanyUser().getUserId() : null);
|
|
|
|
|
-// String json = configService.selectConfigByKey("course.config");
|
|
|
|
|
-// CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
|
|
|
|
|
-// if (ObjectUtil.isNotEmpty(config.getIsBound()) && config.getIsBound()) {
|
|
|
|
|
-// fsUserCourse.setUserId(userId);
|
|
|
|
|
-// }
|
|
|
|
|
-// fsUserCourseService.insertFsUserCourse(fsUserCourse);
|
|
|
|
|
-// redisCacheUtil.delRedisKey("getCourseList");
|
|
|
|
|
-//
|
|
|
|
|
-// return toAjax(1);
|
|
|
|
|
- throw new RuntimeException("未实现");
|
|
|
|
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
+ Long userId = loginUser.getUser().getUserId();
|
|
|
|
|
+ String json = configService.selectConfigByKey("course.config");
|
|
|
|
|
+ CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(config.getIsBound()) && config.getIsBound()) {
|
|
|
|
|
+ fsUserCourse.setUserId(userId);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (fsUserCourse.getIsPrivate() == null) {
|
|
|
|
|
+ fsUserCourse.setIsPrivate(1);
|
|
|
|
|
+ }
|
|
|
|
|
+ fsUserCourseService.insertFsUserCourse(fsUserCourse,loginUser.getTenantId());
|
|
|
|
|
+ redisCacheUtil.delRedisKey("getCourseList");
|
|
|
|
|
+ if (fsUserCourse.getIsPrivate() != null && fsUserCourse.getIsPrivate() == 0) {
|
|
|
|
|
+ redisCacheUtil.delSpringCacheAllByName(PublicCourseAppCacheNames.COURSE_PUBLIC_APP_LIST);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return toAjax(1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -191,18 +183,22 @@ public class FsUserCourseController extends BaseController {
|
|
|
@Log(title = "课程", businessType = BusinessType.INSERT)
|
|
@Log(title = "课程", businessType = BusinessType.INSERT)
|
|
|
@PostMapping("/public")
|
|
@PostMapping("/public")
|
|
|
public AjaxResult publicAdd(@RequestBody FsUserCourse fsUserCourse) {
|
|
public AjaxResult publicAdd(@RequestBody FsUserCourse fsUserCourse) {
|
|
|
-// com.fs.framework.security.LoginUser loginUser = (com.fs.framework.security.LoginUser) tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
-// Long userId = (loginUser.getCompanyUser() != null ? loginUser.getCompanyUser().getUserId() : null);
|
|
|
|
|
-// String json = configService.selectConfigByKey("course.config");
|
|
|
|
|
-// CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
|
|
|
|
|
-// if (ObjectUtil.isNotEmpty(config.getIsBound()) && config.getIsBound()) {
|
|
|
|
|
-// fsUserCourse.setUserId(userId);
|
|
|
|
|
-// }
|
|
|
|
|
-// fsUserCourseService.insertFsUserCourse(fsUserCourse);
|
|
|
|
|
-// redisCacheUtil.delRedisKey("getCourseList");
|
|
|
|
|
-//
|
|
|
|
|
-// return toAjax(1);
|
|
|
|
|
- throw new RuntimeException("未实现");
|
|
|
|
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
+ Long userId = loginUser.getUser().getUserId();
|
|
|
|
|
+ String json = configService.selectConfigByKey("course.config");
|
|
|
|
|
+ CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(config.getIsBound()) && config.getIsBound()) {
|
|
|
|
|
+ fsUserCourse.setUserId(userId);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (fsUserCourse.getIsPrivate() == null) {
|
|
|
|
|
+ fsUserCourse.setIsPrivate(0);
|
|
|
|
|
+ }
|
|
|
|
|
+ fsUserCourseService.insertFsUserCourse(fsUserCourse,loginUser.getTenantId());
|
|
|
|
|
+ redisCacheUtil.delRedisKey("getCourseList");
|
|
|
|
|
+ if (fsUserCourse.getIsPrivate() != null && fsUserCourse.getIsPrivate() == 0) {
|
|
|
|
|
+ redisCacheUtil.delSpringCacheAllByName(PublicCourseAppCacheNames.COURSE_PUBLIC_APP_LIST);
|
|
|
|
|
+ }
|
|
|
|
|
+ return toAjax(1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -212,8 +208,11 @@ public class FsUserCourseController extends BaseController {
|
|
|
@Log(title = "课程", businessType = BusinessType.UPDATE)
|
|
@Log(title = "课程", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
@PutMapping
|
|
|
public AjaxResult edit(@RequestBody FsUserCourse fsUserCourse) {
|
|
public AjaxResult edit(@RequestBody FsUserCourse fsUserCourse) {
|
|
|
- fsUserCourseService.updateFsUserCourse(fsUserCourse);
|
|
|
|
|
|
|
+ fsUserCourseService.updateFsUserCourse(fsUserCourse,getLoginUser().getTenantId());
|
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
|
|
|
+ if (fsUserCourse.getIsPrivate() != null && fsUserCourse.getIsPrivate() == 0) {
|
|
|
|
|
+ redisCacheUtil.delSpringCacheAllByName(PublicCourseAppCacheNames.COURSE_PUBLIC_APP_LIST);
|
|
|
|
|
+ }
|
|
|
return toAjax(1);
|
|
return toAjax(1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -235,8 +234,11 @@ public class FsUserCourseController extends BaseController {
|
|
|
@Log(title = "课程", businessType = BusinessType.UPDATE)
|
|
@Log(title = "课程", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping("/public")
|
|
@PutMapping("/public")
|
|
|
public AjaxResult publicEdit(@RequestBody FsUserCourse fsUserCourse) {
|
|
public AjaxResult publicEdit(@RequestBody FsUserCourse fsUserCourse) {
|
|
|
- fsUserCourseService.updateFsUserCourse(fsUserCourse);
|
|
|
|
|
|
|
+ fsUserCourseService.updateFsUserCourse(fsUserCourse,getLoginUser().getTenantId());
|
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
|
|
|
+ if (fsUserCourse.getIsPrivate() != null && fsUserCourse.getIsPrivate() == 0) {
|
|
|
|
|
+ redisCacheUtil.delSpringCacheAllByName(PublicCourseAppCacheNames.COURSE_PUBLIC_APP_LIST);
|
|
|
|
|
+ }
|
|
|
return toAjax(1);
|
|
return toAjax(1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -247,7 +249,7 @@ public class FsUserCourseController extends BaseController {
|
|
|
@Log(title = "课程", businessType = BusinessType.DELETE)
|
|
@Log(title = "课程", businessType = BusinessType.DELETE)
|
|
|
@GetMapping("/copy/{courseId}")
|
|
@GetMapping("/copy/{courseId}")
|
|
|
public AjaxResult copy(@PathVariable Long courseId) {
|
|
public AjaxResult copy(@PathVariable Long courseId) {
|
|
|
- int i = fsUserCourseService.copyFsUserCourse(courseId);
|
|
|
|
|
|
|
+ int i = fsUserCourseService.copyFsUserCourse(courseId,getLoginUser().getTenantId());
|
|
|
return toAjax(i);
|
|
return toAjax(i);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -260,6 +262,8 @@ public class FsUserCourseController extends BaseController {
|
|
|
public AjaxResult remove(@PathVariable Long[] courseIds) {
|
|
public AjaxResult remove(@PathVariable Long[] courseIds) {
|
|
|
fsUserCourseService.deleteFsUserCourseByCourseIds(courseIds);
|
|
fsUserCourseService.deleteFsUserCourseByCourseIds(courseIds);
|
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
|
|
|
+ redisCacheUtil.delSpringCacheAllByName(PublicCourseAppCacheNames.COURSE_PUBLIC_APP_LIST);
|
|
|
|
|
+
|
|
|
return toAjax(1);
|
|
return toAjax(1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -272,6 +276,7 @@ public class FsUserCourseController extends BaseController {
|
|
|
public AjaxResult publicRemove(@PathVariable Long[] courseIds) {
|
|
public AjaxResult publicRemove(@PathVariable Long[] courseIds) {
|
|
|
fsUserCourseService.deleteFsUserCourseByCourseIds(courseIds);
|
|
fsUserCourseService.deleteFsUserCourseByCourseIds(courseIds);
|
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
|
|
|
+ redisCacheUtil.delSpringCacheAllByName(PublicCourseAppCacheNames.COURSE_PUBLIC_APP_LIST);
|
|
|
return toAjax(1);
|
|
return toAjax(1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -286,8 +291,11 @@ public class FsUserCourseController extends BaseController {
|
|
|
@Log(title = "课程上架", businessType = BusinessType.UPDATE)
|
|
@Log(title = "课程上架", businessType = BusinessType.UPDATE)
|
|
|
@PostMapping("/updateIsShow")
|
|
@PostMapping("/updateIsShow")
|
|
|
public AjaxResult updateIsShow(@RequestBody FsUserCourse fsUserCourse) {
|
|
public AjaxResult updateIsShow(@RequestBody FsUserCourse fsUserCourse) {
|
|
|
- fsUserCourseService.updateFsUserCourse(fsUserCourse);
|
|
|
|
|
|
|
+ fsUserCourseService.updateFsUserCourse(fsUserCourse,getLoginUser().getTenantId());
|
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
|
|
|
+ if (fsUserCourse.getIsPrivate() != null && fsUserCourse.getIsPrivate() == 0) {
|
|
|
|
|
+ redisCacheUtil.delSpringCacheAllByName(PublicCourseAppCacheNames.COURSE_PUBLIC_APP_LIST);
|
|
|
|
|
+ }
|
|
|
return toAjax(1);
|
|
return toAjax(1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -295,8 +303,11 @@ public class FsUserCourseController extends BaseController {
|
|
|
@Log(title = "课程上架", businessType = BusinessType.UPDATE)
|
|
@Log(title = "课程上架", businessType = BusinessType.UPDATE)
|
|
|
@PostMapping("/publicUpdateIsShow")
|
|
@PostMapping("/publicUpdateIsShow")
|
|
|
public AjaxResult publicUpdateIsShow(@RequestBody FsUserCourse fsUserCourse) {
|
|
public AjaxResult publicUpdateIsShow(@RequestBody FsUserCourse fsUserCourse) {
|
|
|
- fsUserCourseService.updateFsUserCourse(fsUserCourse);
|
|
|
|
|
|
|
+ fsUserCourseService.updateFsUserCourse(fsUserCourse,getLoginUser().getTenantId());
|
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
|
|
|
+ if (fsUserCourse.getIsPrivate() != null && fsUserCourse.getIsPrivate() == 0) {
|
|
|
|
|
+ redisCacheUtil.delSpringCacheAllByName(PublicCourseAppCacheNames.COURSE_PUBLIC_APP_LIST);
|
|
|
|
|
+ }
|
|
|
return toAjax(1);
|
|
return toAjax(1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -306,6 +317,9 @@ public class FsUserCourseController extends BaseController {
|
|
|
public AjaxResult putOn(@PathVariable Long[] courseIds) {
|
|
public AjaxResult putOn(@PathVariable Long[] courseIds) {
|
|
|
fsUserCourseService.updateFsUserCourseIsShow(courseIds, 1);
|
|
fsUserCourseService.updateFsUserCourseIsShow(courseIds, 1);
|
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
|
|
|
+
|
|
|
|
|
+ redisCacheUtil.delSpringCacheAllByName(PublicCourseAppCacheNames.COURSE_PUBLIC_APP_LIST);
|
|
|
|
|
+
|
|
|
return toAjax(1);
|
|
return toAjax(1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -315,6 +329,9 @@ public class FsUserCourseController extends BaseController {
|
|
|
public AjaxResult publicPutOn(@PathVariable Long[] courseIds) {
|
|
public AjaxResult publicPutOn(@PathVariable Long[] courseIds) {
|
|
|
fsUserCourseService.updateFsUserCourseIsShow(courseIds, 1);
|
|
fsUserCourseService.updateFsUserCourseIsShow(courseIds, 1);
|
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
|
|
|
+
|
|
|
|
|
+ redisCacheUtil.delSpringCacheAllByName(PublicCourseAppCacheNames.COURSE_PUBLIC_APP_LIST);
|
|
|
|
|
+
|
|
|
return toAjax(1);
|
|
return toAjax(1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -324,6 +341,9 @@ public class FsUserCourseController extends BaseController {
|
|
|
public AjaxResult pullOff(@PathVariable Long[] courseIds) {
|
|
public AjaxResult pullOff(@PathVariable Long[] courseIds) {
|
|
|
fsUserCourseService.updateFsUserCourseIsShow(courseIds, 0);
|
|
fsUserCourseService.updateFsUserCourseIsShow(courseIds, 0);
|
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
|
|
|
+
|
|
|
|
|
+ redisCacheUtil.delSpringCacheAllByName(PublicCourseAppCacheNames.COURSE_PUBLIC_APP_LIST);
|
|
|
|
|
+
|
|
|
return toAjax(1);
|
|
return toAjax(1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -333,6 +353,10 @@ public class FsUserCourseController extends BaseController {
|
|
|
public AjaxResult publicPutOff(@PathVariable Long[] courseIds) {
|
|
public AjaxResult publicPutOff(@PathVariable Long[] courseIds) {
|
|
|
fsUserCourseService.updateFsUserCourseIsShow(courseIds, 0);
|
|
fsUserCourseService.updateFsUserCourseIsShow(courseIds, 0);
|
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
redisCacheUtil.delRedisKey("getCourseList");
|
|
|
|
|
+
|
|
|
|
|
+ redisCacheUtil.delSpringCacheAllByName(PublicCourseAppCacheNames.COURSE_PUBLIC_APP_LIST);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
return toAjax(1);
|
|
return toAjax(1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -348,6 +372,9 @@ public class FsUserCourseController extends BaseController {
|
|
|
redisCacheUtil.delRedisKey("h5user:course:video:list:all");
|
|
redisCacheUtil.delRedisKey("h5user:course:video:list:all");
|
|
|
redisCacheUtil.delRedisKey("h5user:course:list:all");
|
|
redisCacheUtil.delRedisKey("h5user:course:list:all");
|
|
|
redisCacheUtil.delRedisKey("cache:video");
|
|
redisCacheUtil.delRedisKey("cache:video");
|
|
|
|
|
+
|
|
|
|
|
+ redisCacheUtil.delSpringCacheAllByName(PublicCourseAppCacheNames.COURSE_PUBLIC_APP_LIST);
|
|
|
|
|
+
|
|
|
return R.ok();
|
|
return R.ok();
|
|
|
}
|
|
}
|
|
|
|
|
|