Compare commits
2 Commits
24bb7b5eac
...
fdb3e7a4bd
| Author | SHA1 | Date | |
|---|---|---|---|
| fdb3e7a4bd | |||
| 3cfd76e6f1 |
@@ -148,6 +148,17 @@ public class CourseController {
|
|||||||
return R.ok().put("data",chapterDetail);
|
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
|
* @param map
|
||||||
|
|||||||
@@ -10,4 +10,5 @@ public interface CourseCatalogueChapterService extends IService<CourseCatalogueC
|
|||||||
List<CourseCatalogueChapterEntity> getCourseCatalogueChapterList(int id);
|
List<CourseCatalogueChapterEntity> getCourseCatalogueChapterList(int id);
|
||||||
|
|
||||||
Map<String,Object> getChapterDetail(Integer chapterId);
|
Map<String,Object> getChapterDetail(Integer chapterId);
|
||||||
|
Map<String, Object> getNextChapterDetail(Integer chapterId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,6 +83,23 @@ public class CourseCatalogueChapterServiceImpl extends ServiceImpl<CourseCatalog
|
|||||||
return flag;
|
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){
|
private int getCurrentVideo(Integer chapterId){
|
||||||
MPJLambdaWrapper<CourseCatalogueChapterVideoEntity> wrapper = new MPJLambdaWrapper<>();
|
MPJLambdaWrapper<CourseCatalogueChapterVideoEntity> wrapper = new MPJLambdaWrapper<>();
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ spring:
|
|||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
druid:
|
druid:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
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
|
# username: root
|
||||||
# password: HSXY1234hsxy
|
# password: HSXY1234hsxy
|
||||||
# password: Jgll2023Nutty
|
# password: Jgll2023Nutty
|
||||||
@@ -53,10 +53,10 @@ spring:
|
|||||||
initSQL: SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci
|
initSQL: SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci
|
||||||
|
|
||||||
rabbitmq:
|
rabbitmq:
|
||||||
host: 127.0.0.1
|
host: 47.93.127.115
|
||||||
port: 5672
|
port: 5672
|
||||||
username: guest
|
username: admin
|
||||||
password: guest
|
password: 751019
|
||||||
virtualHost: /
|
virtualHost: /
|
||||||
aliyun:
|
aliyun:
|
||||||
oss:
|
oss:
|
||||||
@@ -98,18 +98,18 @@ wxpay:
|
|||||||
mchId: 1612860909
|
mchId: 1612860909
|
||||||
serialNo: 679AECB2F7AC4183033F713828892BA640E4EEE3
|
serialNo: 679AECB2F7AC4183033F713828892BA640E4EEE3
|
||||||
apiV3Key: 4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF
|
apiV3Key: 4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF
|
||||||
wechatPayCertificateUrl: F:\hs\nuttyreading-server\src\main\resources\cent\wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem
|
wechatPayCertificateUrl: F:\hs\nuttyreading-java\src\main\resources\cent\wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem
|
||||||
privateKeyUrl: F:\hs\nuttyreading-server\src\main\resources\cent\apiclient_key.pem
|
privateKeyUrl: F:\hs\nuttyreading-java\src\main\resources\cent\apiclient_key.pem
|
||||||
keyPemPath: F:\hs\nuttyreading-server\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
|
notifyUrl: http://z6f8f828.natappfree.cc/pb/pay/payNotify
|
||||||
refundNotifyUrl: https://testapi.nuttyreading.com/pay/refundNotify
|
refundNotifyUrl: https://testapi.nuttyreading.com/pay/refundNotify
|
||||||
#灵枢商户号
|
#灵枢商户号
|
||||||
lsMchId: 1700371158
|
lsMchId: 1700371158
|
||||||
lsSerialNo: 3132D23C3130B74B87890DC6E7C80256C75113B9
|
lsSerialNo: 3132D23C3130B74B87890DC6E7C80256C75113B9
|
||||||
lsApiV3Key: 4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF
|
lsApiV3Key: 4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF
|
||||||
lsWechatPayCertificateUrl: F:\hs\nuttyreading-server\src\main\resources\cent\lscent\wechatpay_30CFE19A12EDB4D9E0C7DF01DBF457C657566D04.pem
|
lsWechatPayCertificateUrl: F:\hs\nuttyreading-java\src\main\resources\cent\lscent\wechatpay_30CFE19A12EDB4D9E0C7DF01DBF457C657566D04.pem
|
||||||
lsPrivateKeyUrl: F:\hs\nuttyreading-server\src\main\resources\cent\lscent\apiclient_key.pem
|
lsPrivateKeyUrl: F:\hs\nuttyreading-java\src\main\resources\cent\lscent\apiclient_key.pem
|
||||||
lsKeyPemPath: F:\hs\nuttyreading-server\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
|
lsNotifyUrl: http://z6f8f828.natappfree.cc/pb/pay/lsPayNotify
|
||||||
lsRefundNotifyUrl: https://testapi.nuttyreading.com/pay/refundNotify
|
lsRefundNotifyUrl: https://testapi.nuttyreading.com/pay/refundNotify
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user