主管理员 1 month ago
parent
commit
07ebf19146
8 changed files with 621 additions and 458 deletions
  1. +19
    -0
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/controller/AppletApiBooksController.java
  2. +5
    -0
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/service/AppletApiBooksService.java
  3. +22
    -0
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/service/impl/AppletApiBooksServiceImpl.java
  4. +1
    -1
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletCourse/controller/AppletCourseController.java
  5. +2
    -3
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletCoursePage/controller/AppletCoursePageController.java
  6. +7
    -2
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletCoursePage/entity/AppletCoursePage.java
  7. +14
    -0
      jeecgboot-vue3/src/views/applet/course-page/AppletCoursePage.api.ts
  8. +551
    -452
      jeecgboot-vue3/src/views/applet/course-page/AppletCoursePageList.vue

+ 19
- 0
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/controller/AppletApiBooksController.java View File

@ -12,6 +12,7 @@ import org.jeecg.modules.demo.appletBookStand.entity.AppletBookStand;
import org.jeecg.modules.demo.appletBooks.entity.AppletBooks;
import org.jeecg.modules.demo.appletCategorize.entity.AppletCategorize;
import org.jeecg.modules.demo.appletCourse.entity.AppletCourse;
import org.jeecg.modules.demo.appletCoursePage.entity.AppletCoursePage;
import org.jeecg.modules.demo.appletLabel.entity.AppletLabel;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -154,4 +155,22 @@ public class AppletApiBooksController {
return Result.OK(Courses);
}
@IgnoreAuth
@Operation(summary = "获取课程页面列表", description = "根据课程id获取页面列表")
@GetMapping(value = "/coursePage")
public Result<List<AppletCoursePage>> coursePage(@Parameter(description = "课程id") String id) {
List<AppletCoursePage> Courses = appletApiBooksService.getCoursesPage(id);
return Result.OK(Courses);
}
@IgnoreAuth
@Operation(summary = "获取课程页面详情", description = "页面id")
@GetMapping(value = "/coursesPageDetail")
public Result<AppletCoursePage> getCoursesPageDetail(@Parameter(description = "页面id") String id) {
AppletCoursePage Courses = appletApiBooksService.getCoursesPageDetail(id);
return Result.OK(Courses);
}
}

+ 5
- 0
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/service/AppletApiBooksService.java View File

@ -6,6 +6,7 @@ import org.jeecg.modules.demo.appletBookStand.entity.AppletBookStand;
import org.jeecg.modules.demo.appletBooks.entity.AppletBooks;
import org.jeecg.modules.demo.appletCategorize.entity.AppletCategorize;
import org.jeecg.modules.demo.appletCourse.entity.AppletCourse;
import org.jeecg.modules.demo.appletCoursePage.entity.AppletCoursePage;
import org.jeecg.modules.demo.appletLabel.entity.AppletLabel;
import java.util.List;
@ -47,6 +48,10 @@ public interface AppletApiBooksService {
*/
IPage<AppletCourse> getCourses(Page<AppletCourse> coursePage, String id);
List<AppletCoursePage> getCoursesPage(String id);
AppletCoursePage getCoursesPageDetail(String id);
List<AppletLabel> getLabel();
List<AppletCategorize> category();


+ 22
- 0
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/service/impl/AppletApiBooksServiceImpl.java View File

@ -18,6 +18,8 @@ import org.jeecg.modules.demo.appletCategorize.entity.AppletCategorize;
import org.jeecg.modules.demo.appletCategorize.service.IAppletCategorizeService;
import org.jeecg.modules.demo.appletCourse.entity.AppletCourse;
import org.jeecg.modules.demo.appletCourse.service.IAppletCourseService;
import org.jeecg.modules.demo.appletCoursePage.entity.AppletCoursePage;
import org.jeecg.modules.demo.appletCoursePage.service.IAppletCoursePageService;
import org.jeecg.modules.demo.appletLabel.entity.AppletLabel;
import org.jeecg.modules.demo.appletLabel.service.IAppletLabelService;
import org.jeecg.modules.demo.appletVip.service.IAppletVipService;
@ -45,6 +47,8 @@ public class AppletApiBooksServiceImpl implements AppletApiBooksService {
private IAppletCategorizeService appletCategorizeService;
@Autowired
private IAppletVipService appletVipService;
@Autowired
private IAppletCoursePageService appletCoursePageService;
/**
* 查询书籍列表
@ -236,4 +240,22 @@ public class AppletApiBooksServiceImpl implements AppletApiBooksService {
return book;
}
@Override
public List<AppletCoursePage> getCoursesPage(String id){
return appletCoursePageService.lambdaQuery()
.eq(AppletCoursePage::getCourseId, id)
.eq(AppletCoursePage::getStatus, "Y")
.orderByAsc(AppletCoursePage::getSort)
.select(AppletCoursePage::getId,
AppletCoursePage::getTitle,
AppletCoursePage::getPay
)
.list();
}
@Override
public AppletCoursePage getCoursesPageDetail(String id){
return appletCoursePageService.getById(id);
}
}

+ 1
- 1
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletCourse/controller/AppletCourseController.java View File

@ -110,7 +110,7 @@ public class AppletCourseController extends JeecgController<AppletCourse, IApple
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody AppletCourse appletCourse) {
appletCourseService.updateById(appletCourse);
return Result.OK("编辑成功!");
return Result.OK("保存成功!");
}
/**


+ 2
- 3
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletCoursePage/controller/AppletCoursePageController.java View File

@ -86,10 +86,9 @@ public class AppletCoursePageController extends JeecgController<AppletCoursePage
@Operation(summary="课程分页-添加")
@RequiresPermissions("appletCoursePage:applet_course_page:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody AppletCoursePage appletCoursePage) {
public Result<AppletCoursePage> add(@RequestBody AppletCoursePage appletCoursePage) {
appletCoursePageService.save(appletCoursePage);
return Result.OK("添加成功!");
return Result.OK(appletCoursePage);
}
/**


+ 7
- 2
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletCoursePage/entity/AppletCoursePage.java View File

@ -64,13 +64,18 @@ public class AppletCoursePage implements Serializable {
@Excel(name = "付费", width = 15,replace = {"是_Y","否_N"} )
@Schema(description = "付费")
private java.lang.String pay;
/**内容*/
@Excel(name = "内容", width = 15)
/**标题*/
@Excel(name = "标题", width = 15)
@Schema(description = "标题")
private java.lang.String title;
/**内容*/
@Excel(name = "内容", width = 15)
@Schema(description = "内容")
private java.lang.String content;
/**类型*/
@Excel(name = "类型", width = 15)
@Schema(description = "类型")
@Dict(dicCode = "applet_course_page_type")
private java.lang.String type;
/**课程*/
@Excel(name = "课程", width = 15)


+ 14
- 0
jeecgboot-vue3/src/views/applet/course-page/AppletCoursePage.api.ts View File

@ -52,6 +52,20 @@ export const batchDelete = (params, handleSuccess) => {
}
});
}
/**
*
*/
export const add = (params) => {
return defHttp.post({url: Api.save, params});
}
/**
*
*/
export const edit = (params) => {
return defHttp.post({url: Api.edit, params});
}
/**
*
*/


+ 551
- 452
jeecgboot-vue3/src/views/applet/course-page/AppletCoursePageList.vue
File diff suppressed because it is too large
View File


Loading…
Cancel
Save