merge master

This commit is contained in:
Cauchy
2023-10-18 17:16:45 +08:00
32 changed files with 216 additions and 259 deletions

View File

@@ -2,10 +2,10 @@ package com.peanut.modules.book.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.peanut.modules.book.dao.BookClockEntryChatDao;
import com.peanut.modules.book.entity.BookClockInChatEntity;
import com.peanut.modules.book.entity.BookClockEntryChatEntity;
import com.peanut.modules.book.service.BookClockEntryChatService;
import org.springframework.stereotype.Service;
@Service("bookClockEntryChatService")
public class BookClockEntryChatImpl extends ServiceImpl<BookClockEntryChatDao, BookClockInChatEntity> implements BookClockEntryChatService {
public class BookClockEntryChatImpl extends ServiceImpl<BookClockEntryChatDao, BookClockEntryChatEntity> implements BookClockEntryChatService {
}

View File

@@ -6,28 +6,20 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.Query;
import com.peanut.modules.app.service.UserService;
import com.peanut.modules.book.dao.BookForumArticlesDao;
import com.peanut.modules.book.entity.AuthorEntity;
import com.peanut.modules.book.entity.BookEntity;
import com.peanut.modules.book.entity.BookForumArticlesEntity;
import com.peanut.modules.book.entity.PublisherEntity;
import com.peanut.modules.book.service.AuthorService;
import com.peanut.modules.book.service.BookForumArticlesService;
import com.peanut.modules.book.service.BookService;
import com.peanut.modules.book.service.PublisherService;
import com.peanut.modules.book.service.MyUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@Service
public class BookForumArticlesServiceImpl extends ServiceImpl<BookForumArticlesDao, BookForumArticlesEntity> implements BookForumArticlesService {
@Autowired
UserService userService;
@Override
@@ -61,20 +53,6 @@ public class BookForumArticlesServiceImpl extends ServiceImpl<BookForumArticlesD
return new PageUtils(page);
}
@Override
public List<BookForumArticlesEntity> getForumsLimit(Integer book_id,Integer limit) {
LambdaQueryWrapper<BookForumArticlesEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(BookForumArticlesEntity::getDelflag,0);
wrapper.eq(BookForumArticlesEntity::getBookid,book_id);
wrapper.orderByDesc(BookForumArticlesEntity::getCreateTime);
wrapper.last("limit "+limit);
List<BookForumArticlesEntity> bookForumArticlesEntities = this.getBaseMapper().selectList(wrapper);
//补充说话的人的用户信息
for (BookForumArticlesEntity b : bookForumArticlesEntities){
b.setUser(userService.getById(b.getUserid()));
}
return bookForumArticlesEntities;
}
@Override
public Integer getForumsCount(Integer book_id) {

View File

@@ -6,10 +6,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.Query;
import com.peanut.modules.app.service.UserService;
import com.peanut.modules.book.dao.BookForumCommentDao;
import com.peanut.modules.book.entity.BookForumCommentEntity;
import com.peanut.modules.book.service.BookForumCommenService;
import com.peanut.modules.book.service.MyUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -20,7 +20,7 @@ import java.util.Map;
public class BookForumCommenServiceImpl extends ServiceImpl<BookForumCommentDao, BookForumCommentEntity> implements BookForumCommenService {
@Autowired
private UserService userService;
private MyUserService userService;
@Override
public PageUtils queryPage(Map<String, Object> params) {

View File

@@ -8,6 +8,7 @@ import com.aliyun.dysmsapi20170525.models.SendSmsResponseBody;
import com.aliyun.tea.TeaException;
import com.aliyun.teautil.Common;
import com.aliyun.teautil.models.RuntimeOptions;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.google.common.collect.Maps;
import com.peanut.common.utils.*;
@@ -55,6 +56,8 @@ public class MyUserServiceImpl extends ServiceImpl<MyUserDao, MyUserEntity> impl
private CouponHistoryService couponHistoryService;
@Autowired
private MyUserDao myUserDao;
@Autowired
private BookForumArticlesService bookForumArticlesService;
@Override
public PageUtils queryPage(Map<String, Object> params) {
@@ -145,6 +148,21 @@ public class MyUserServiceImpl extends ServiceImpl<MyUserDao, MyUserEntity> impl
return true;
}
@Override
public List<BookForumArticlesEntity> getForumsLimit(Integer book_id,Integer limit) {
LambdaQueryWrapper<BookForumArticlesEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(BookForumArticlesEntity::getDelflag,0);
wrapper.eq(BookForumArticlesEntity::getBookid,book_id);
wrapper.orderByDesc(BookForumArticlesEntity::getCreateTime);
wrapper.last("limit "+limit);
List<BookForumArticlesEntity> bookForumArticlesEntities = bookForumArticlesService.getBaseMapper().selectList(wrapper);
//补充说话的人的用户信息
for (BookForumArticlesEntity b : bookForumArticlesEntities){
b.setUser(this.getById(b.getUserid()));
}
return bookForumArticlesEntities;
}

View File

@@ -50,4 +50,22 @@ public class PayWechatOrderServiceImpl extends ServiceImpl<PayWechatOrderDao, Pa
this.save(entity);
}
@Override
public void addForPoint(String orderSn, String prepayId, Integer buyOrderId) {
QueryWrapper<BuyOrderEntity> wrapper = new QueryWrapper<>();
wrapper.eq("order_sn", orderSn);
BuyOrderEntity buyOrder = buyOrderService.getOne(wrapper);
PayWechatOrderEntity entity = new PayWechatOrderEntity();
entity.setCustomerId(buyOrder.getUserId());
entity.setCreateTime(new Date());
entity.setOrderSn(buyOrder.getOrderSn());
entity.setPrepayId(prepayId);
entity.setTotalAmount(buyOrder.getRealMoney());
entity.setSystemLog("预支付完成");
entity.setPayType(buyOrder.getOrderType());
entity.setOrderId(buyOrder.getOrderSn());
entity.setBuyOrderId(buyOrderId);
this.save(entity);
}
}