新版
This commit is contained in:
@@ -139,10 +139,10 @@ public class BookChapterController {
|
||||
|
||||
@RequestMapping("/updateBookChapter")
|
||||
public R updateBookChapter(@RequestBody BookChapterEntity bookChapter){
|
||||
BookChapterEntity old_info = bookChapterService.getById(bookChapter.getId());
|
||||
if(!old_info.getContent().equals(bookChapter.getContent())){
|
||||
bookChapter.setVoices(""); // 设置voices字段为空
|
||||
}
|
||||
// BookChapterEntity old_info = bookChapterService.getById(bookChapter.getId());
|
||||
// if(!old_info.getContent().equals(bookChapter.getContent())){
|
||||
// bookChapter.setVoices(""); // 设置voices字段为空
|
||||
// }
|
||||
bookChapterService.updateById(bookChapter);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@@ -692,7 +692,10 @@ public class BookController {
|
||||
|
||||
LambdaQueryWrapper<BookEntity> wrapper1 = new LambdaQueryWrapper<>();
|
||||
wrapper1.eq(BookEntity::getDelFlag,0);
|
||||
wrapper1.notIn(BookEntity::getId,bookIds);
|
||||
wrapper1.eq(BookEntity::getState,1);
|
||||
if(bookIds.size()>0){
|
||||
wrapper1.notIn(BookEntity::getId,bookIds);
|
||||
}
|
||||
Page<BookEntity> bookEntityPage = bookService.getBaseMapper().selectPage(new Page<>(page, limit), wrapper1);
|
||||
for (BookEntity b : bookEntityPage.getRecords()){
|
||||
b.setProductId(shopProudictBookService.getProductByBookId(b.getId()));
|
||||
|
||||
@@ -198,7 +198,7 @@ public class BookForumArticlesServiceController {
|
||||
wrapper.eq(BookForumCommentEntity::getDelflag,0);
|
||||
wrapper.eq(BookForumCommentEntity::getPid,0);
|
||||
wrapper.eq(BookForumCommentEntity::getBfaid,forumId);
|
||||
wrapper.orderByAsc(BookForumCommentEntity::getCreateTime);
|
||||
wrapper.orderByDesc(BookForumCommentEntity::getCreateTime);
|
||||
Page<BookForumCommentEntity> bookForumCommentEntityPage = bookForumCommenService.getBaseMapper().selectPage(new Page<>(page, limit), wrapper);
|
||||
for (BookForumCommentEntity b : bookForumCommentEntityPage.getRecords()){
|
||||
b.setComments(bookForumCommenService.getChildComments(b.getId()));
|
||||
@@ -256,7 +256,7 @@ public class BookForumArticlesServiceController {
|
||||
bookForumCommentEntity.setPid(pid);
|
||||
bookForumCommentEntity.setPuserid(puserId);
|
||||
bookForumCommenService.save(bookForumCommentEntity);
|
||||
return R.ok();
|
||||
return R.ok().put("comment",bookForumCommentEntity);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -126,10 +126,10 @@ public class BuyOrderController {
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
@RequestMapping("/buysave")
|
||||
@Transactional
|
||||
// @RequiresPermissions("book:buyorder:save")
|
||||
public R save(@RequestBody BuyOrderEntity buyOrder){
|
||||
public R buysave(@RequestBody BuyOrderEntity buyOrder){
|
||||
|
||||
|
||||
BigDecimal realMoney = new BigDecimal(0);
|
||||
@@ -151,14 +151,13 @@ public class BuyOrderController {
|
||||
BigDecimal activityPrice = product.getActivityPrice();
|
||||
BigDecimal big = new BigDecimal(0);
|
||||
BigDecimal price=null;
|
||||
//activityPrice等于0,则原价
|
||||
if (activityPrice == big) {
|
||||
price = product.getPrice();
|
||||
|
||||
//activityPrice等于0,则原价
|
||||
if (activityPrice.equals(big)||activityPrice==null) {
|
||||
price = product.getPrice();
|
||||
}else {
|
||||
price = product.getActivityPrice();
|
||||
}
|
||||
|
||||
Integer quantity = buyOrderDetail.getQuantity();
|
||||
BigDecimal bigDecimal = new BigDecimal(price.doubleValue() * quantity);
|
||||
System.out.println("bigDecimal=================bigDecimal======================"+bigDecimal);
|
||||
@@ -176,13 +175,8 @@ public class BuyOrderController {
|
||||
buyOrderDetailEntity.setProductPrice(product.getPrice());
|
||||
buyOrderDetailEntity.setAddressId(buyOrder.getAddressId());
|
||||
buyOrderDetailEntity.setProductUrl(product.getProductImages());
|
||||
System.out.println(buyOrder.getAddressId());
|
||||
buyOrderDetailEntity.setOrderStatus("0");
|
||||
list.add(buyOrderDetailEntity);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Integer couponId = buyOrder.getCouponId();
|
||||
@@ -201,15 +195,12 @@ public class BuyOrderController {
|
||||
|
||||
// 减去优惠券金额
|
||||
realMoney = buyOrder.getRealMoney();
|
||||
|
||||
if (bigDecimal1.compareTo(realMoney) == 0) {
|
||||
|
||||
//特定格式的时间ID
|
||||
//特定格式的时间ID
|
||||
String timeId = IdWorker.getTimeId().substring(0,32);
|
||||
buyOrder.setOrderSn(timeId);
|
||||
if("4".equals(buyOrder.getPaymentMethod())){
|
||||
buyOrder.setOrderStatus("1");
|
||||
|
||||
}
|
||||
//todo 增加结束时间
|
||||
buyOrder.setPaymentDate(new Date());
|
||||
@@ -284,9 +275,9 @@ public class BuyOrderController {
|
||||
* @param buyOrder 订单表
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/buysave")
|
||||
@RequestMapping("/buysave1")
|
||||
@Transactional
|
||||
public R buysave(@RequestBody BuyOrderEntity buyOrder) {
|
||||
public R buysave1(@RequestBody BuyOrderEntity buyOrder) {
|
||||
|
||||
BigDecimal realMoney = new BigDecimal(0);
|
||||
|
||||
|
||||
@@ -37,10 +37,10 @@ spring:
|
||||
initSQL: SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci
|
||||
|
||||
rabbitmq:
|
||||
host: 127.0.0.1
|
||||
port: 15672
|
||||
username: guest
|
||||
password: guest
|
||||
host: 59.110.212.44
|
||||
port: 5672
|
||||
username: admin
|
||||
password: 751019
|
||||
virtualHost: /
|
||||
|
||||
|
||||
@@ -53,14 +53,15 @@ aliyun:
|
||||
oss:
|
||||
file:
|
||||
endpoint: oss-cn-beijing.aliyuncs.com
|
||||
keyid: LTAI5tRDbidmtFSoxQ2rgFd2
|
||||
keysecret: 08XmfSoaC980DiAK4swQEvb6MwKedG
|
||||
bucketname: peanut9377
|
||||
keyid: LTAIiSMeo8ztauV5
|
||||
keysecret: pVIYAOIFSUGg61lYfE8cjg2ZNpnLJA
|
||||
bucketname: ehh-private-01
|
||||
sms:
|
||||
accessKeyId: LTAI5tRDbidmtFSoxQ2rgFd2
|
||||
accessKeySecret: 08XmfSoaC980DiAK4swQEvb6MwKedG
|
||||
singName: 水晶球
|
||||
templateCode: SMS_216832090
|
||||
accessKeyId: LTAI5tJbbw5fY97pnw635yq3
|
||||
accessKeySecret: LTXQ9v3OYVwNVbDWWfVpbbcVDKErKi
|
||||
singName: 疯子读书
|
||||
|
||||
templateCode: SMS_248840040
|
||||
|
||||
|
||||
##多数据源的配置
|
||||
|
||||
Reference in New Issue
Block a user