Compare commits

..

2 Commits

Author SHA1 Message Date
fdb3e7a4bd chore: 合并 2026-08-06 15:57:58 +08:00
3cfd76e6f1 feat:增加获取课程下一章节详情接口 2026-08-06 15:47:26 +08:00
4 changed files with 39 additions and 10 deletions

View File

@@ -148,6 +148,17 @@ public class CourseController {
return R.ok().put("data",chapterDetail);
}
/**
* 获取下一章节详情
* @param param
* @return
*/
@RequestMapping("/getNextCourseCatalogueChapter")
public R getNextCourseCatalogueChapter(@RequestBody ParamTo param){
Map<String, Object> chapterDetail = courseCatalogueChapterService.getNextChapterDetail(param.getId());
return R.ok().put("data",chapterDetail);
}
/**
* 开通免费课程
* @param map

View File

@@ -10,4 +10,5 @@ public interface CourseCatalogueChapterService extends IService<CourseCatalogueC
List<CourseCatalogueChapterEntity> getCourseCatalogueChapterList(int id);
Map<String,Object> getChapterDetail(Integer chapterId);
Map<String, Object> getNextChapterDetail(Integer chapterId);
}

View File

@@ -83,6 +83,23 @@ public class CourseCatalogueChapterServiceImpl extends ServiceImpl<CourseCatalog
return flag;
}
@Override
public Map<String, Object> getNextChapterDetail(Integer chapterId) {
CourseCatalogueChapterEntity currentChapter = this.getById(chapterId);
if (currentChapter==null) return null;
CourseCatalogueChapterEntity nextChapter = this.getOne(
new LambdaQueryWrapper<CourseCatalogueChapterEntity>()
.eq(CourseCatalogueChapterEntity::getCatalogueId, currentChapter.getCatalogueId())
.gt(CourseCatalogueChapterEntity::getSort, currentChapter.getSort() )
.orderByAsc(CourseCatalogueChapterEntity::getSort)
.last("limit 1")
);
if (nextChapter==null) return null;
return getChapterDetail(nextChapter.getId());
}
private int getCurrentVideo(Integer chapterId){
MPJLambdaWrapper<CourseCatalogueChapterVideoEntity> wrapper = new MPJLambdaWrapper<>();

View File

@@ -17,7 +17,7 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
druid:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://rm-2zev4157t67trxuu3yo.mysql.rds.aliyuncs.com:3306/e_book_test2?rewriteBatchedStatements=true
url: jdbc:mysql://rm-2zev4157t67trxuu3yo.mysql.rds.aliyuncs.com:3306/e_book_test?rewriteBatchedStatements=true
# username: root
# password: HSXY1234hsxy
# password: Jgll2023Nutty
@@ -53,10 +53,10 @@ spring:
initSQL: SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci
rabbitmq:
host: 127.0.0.1
host: 47.93.127.115
port: 5672
username: guest
password: guest
username: admin
password: 751019
virtualHost: /
aliyun:
oss:
@@ -98,18 +98,18 @@ wxpay:
mchId: 1612860909
serialNo: 679AECB2F7AC4183033F713828892BA640E4EEE3
apiV3Key: 4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF
wechatPayCertificateUrl: F:\hs\nuttyreading-server\src\main\resources\cent\wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem
privateKeyUrl: F:\hs\nuttyreading-server\src\main\resources\cent\apiclient_key.pem
keyPemPath: F:\hs\nuttyreading-server\src\main\resources\cent\apiclient_key.pem
wechatPayCertificateUrl: F:\hs\nuttyreading-java\src\main\resources\cent\wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem
privateKeyUrl: F:\hs\nuttyreading-java\src\main\resources\cent\apiclient_key.pem
keyPemPath: F:\hs\nuttyreading-java\src\main\resources\cent\apiclient_key.pem
notifyUrl: http://z6f8f828.natappfree.cc/pb/pay/payNotify
refundNotifyUrl: https://testapi.nuttyreading.com/pay/refundNotify
#灵枢商户号
lsMchId: 1700371158
lsSerialNo: 3132D23C3130B74B87890DC6E7C80256C75113B9
lsApiV3Key: 4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF
lsWechatPayCertificateUrl: F:\hs\nuttyreading-server\src\main\resources\cent\lscent\wechatpay_30CFE19A12EDB4D9E0C7DF01DBF457C657566D04.pem
lsPrivateKeyUrl: F:\hs\nuttyreading-server\src\main\resources\cent\lscent\apiclient_key.pem
lsKeyPemPath: F:\hs\nuttyreading-server\src\main\resources\cent\lscent\apiclient_key.pem
lsWechatPayCertificateUrl: F:\hs\nuttyreading-java\src\main\resources\cent\lscent\wechatpay_30CFE19A12EDB4D9E0C7DF01DBF457C657566D04.pem
lsPrivateKeyUrl: F:\hs\nuttyreading-java\src\main\resources\cent\lscent\apiclient_key.pem
lsKeyPemPath: F:\hs\nuttyreading-java\src\main\resources\cent\lscent\apiclient_key.pem
lsNotifyUrl: http://z6f8f828.natappfree.cc/pb/pay/lsPayNotify
lsRefundNotifyUrl: https://testapi.nuttyreading.com/pay/refundNotify