This commit is contained in:
wangjinlei
2023-09-21 11:41:57 +08:00
parent 30d8045759
commit 9589946442
17 changed files with 73 additions and 18 deletions

3
.gitignore vendored
View File

@@ -10,4 +10,5 @@ buildNumber.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
/.idea/
src/main/resources/weChatConfig.properties
src/main/resources/weChatConfig.properties
/src/test/

View File

@@ -2,6 +2,7 @@ package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.common.utils.R;
import com.peanut.modules.book.dao.ShopProductLabelDao;
import com.peanut.modules.book.entity.ShopProductLabelEntity;
import com.peanut.modules.book.entity.ShopProductToLabelEntity;
import com.peanut.modules.book.service.ShopProductLabelService;
@@ -25,6 +26,8 @@ public class ShopProductLabelController {
@Autowired
private ShopProductToLabelService shopProductToLabelService;
@Autowired
private ShopProductLabelDao shopProductLabelDao;
@RequestMapping("/addLabel")
@@ -78,4 +81,15 @@ public class ShopProductLabelController {
return R.ok().put("result",re);
}
@RequestMapping("/mytest")
public R mytest(){
shopProductLabelService.getBaseMapper();
// shopProductLabelDao.selectJoinList()
return R.ok();
}
}

View File

@@ -1,8 +1,13 @@
package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.github.yulichang.base.mapper.MPJJoinMapper;
import com.github.yulichang.toolkit.MPJWrappers;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import com.peanut.modules.book.dao.BookDao;
import com.peanut.modules.book.entity.BookEntity;
import com.peanut.modules.book.entity.UserEbookBuyEntity;
import com.peanut.modules.book.service.BookService;
@@ -25,6 +30,8 @@ public class UserEbookBuyController {
private UserEbookBuyService userEbookBuyService;
@Autowired
private BookService bookService;
@Autowired
private BookDao bookDao;
/**
* 列表
@@ -38,8 +45,26 @@ public class UserEbookBuyController {
return R.ok().put("page", page);
}
/**
* 列表
* 获取用户打开书列表
* @return
*/
@RequestMapping("/getUserClockBookList")
public R getUserClockBookList(@RequestParam("userId") Integer userId){
MPJLambdaWrapper<BookEntity> wrapper = new MPJLambdaWrapper<BookEntity>();
wrapper.selectAll(BookEntity.class);
wrapper.leftJoin(UserEbookBuyEntity.class,UserEbookBuyEntity::getBookId,BookEntity::getId);
wrapper.eq(UserEbookBuyEntity::getUserId,userId);
wrapper.eq(BookEntity::getClockIn,1);
wrapper.eq(BookEntity::getDelFlag,0);
List<BookEntity> bookEntities = bookDao.selectJoinList(BookEntity.class, wrapper);
return R.ok().put("books",bookEntities).put("tatol",bookEntities.size());
}
/**
* 获取用户打卡书列表
*/
@RequestMapping("/appbooklist")

View File

@@ -1,6 +1,7 @@
package com.peanut.modules.book.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.peanut.modules.book.entity.ActivityEntity;
import com.peanut.modules.book.entity.BuyOrderEntity;
import org.apache.ibatis.annotations.Mapper;
@@ -15,7 +16,7 @@ import java.util.List;
* @date 2022-08-29 15:27:44
*/
@Mapper
public interface ActivityDao extends BaseMapper<ActivityEntity> {
public interface ActivityDao extends MPJBaseMapper<ActivityEntity> {
}

View File

@@ -1,5 +1,6 @@
package com.peanut.modules.book.dao;
import com.github.yulichang.base.MPJBaseMapper;
import com.peanut.modules.book.entity.AuthorEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@@ -12,6 +13,6 @@ import org.apache.ibatis.annotations.Mapper;
* @date 2022-08-04 15:36:59
*/
@Mapper
public interface AuthorDao extends BaseMapper<AuthorEntity> {
public interface AuthorDao extends MPJBaseMapper<AuthorEntity> {
}

View File

@@ -1,5 +1,6 @@
package com.peanut.modules.book.dao;
import com.github.yulichang.base.MPJBaseMapper;
import com.peanut.modules.book.entity.BookBrowseRecordsEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@@ -12,6 +13,6 @@ import org.apache.ibatis.annotations.Mapper;
* @date 2022-08-29 15:27:44
*/
@Mapper
public interface BookBrowseRecordsDao extends BaseMapper<BookBrowseRecordsEntity> {
public interface BookBrowseRecordsDao extends MPJBaseMapper<BookBrowseRecordsEntity> {
}

View File

@@ -1,5 +1,6 @@
package com.peanut.modules.book.dao;
import com.github.yulichang.base.MPJBaseMapper;
import com.peanut.modules.book.entity.BookBuyConfigEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@@ -12,6 +13,6 @@ import org.apache.ibatis.annotations.Mapper;
* @date 2022-10-17 14:54:08
*/
@Mapper
public interface BookBuyConfigDao extends BaseMapper<BookBuyConfigEntity> {
public interface BookBuyConfigDao extends MPJBaseMapper<BookBuyConfigEntity> {
}

View File

@@ -2,6 +2,7 @@ package com.peanut.modules.book.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.peanut.modules.book.entity.BookCategoryEntity;
import org.apache.ibatis.annotations.Mapper;
@@ -11,7 +12,7 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface BookCategoryDao extends BaseMapper<BookCategoryEntity> {
public interface BookCategoryDao extends MPJBaseMapper<BookCategoryEntity> {
}

View File

@@ -1,5 +1,6 @@
package com.peanut.modules.book.dao;
import com.github.yulichang.base.MPJBaseMapper;
import com.peanut.modules.book.entity.BookChapterContentEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@@ -12,6 +13,6 @@ import org.apache.ibatis.annotations.Mapper;
* @date 2022-08-16 14:32:06
*/
@Mapper
public interface BookChapterContentDao extends BaseMapper<BookChapterContentEntity> {
public interface BookChapterContentDao extends MPJBaseMapper<BookChapterContentEntity> {
}

View File

@@ -1,5 +1,6 @@
package com.peanut.modules.book.dao;
import com.github.yulichang.base.MPJBaseMapper;
import com.peanut.modules.book.entity.BookChapterEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@@ -12,6 +13,6 @@ import org.apache.ibatis.annotations.Mapper;
* @date 2022-08-12 09:53:25
*/
@Mapper
public interface BookChapterDao extends BaseMapper<BookChapterEntity> {
public interface BookChapterDao extends MPJBaseMapper<BookChapterEntity> {
}

View File

@@ -2,9 +2,10 @@ package com.peanut.modules.book.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.peanut.modules.book.entity.BookClockinCommentEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface BookClockinCommentDao extends BaseMapper<BookClockinCommentEntity> {
public interface BookClockinCommentDao extends MPJBaseMapper<BookClockinCommentEntity> {
}

View File

@@ -1,11 +1,12 @@
package com.peanut.modules.book.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.peanut.modules.book.entity.BookClockinEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface BookClockinDao extends BaseMapper<BookClockinEntity> {
public interface BookClockinDao extends MPJBaseMapper<BookClockinEntity> {

View File

@@ -1,11 +1,12 @@
package com.peanut.modules.book.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.peanut.modules.book.entity.BookClockinPunchEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface BookClockinPunchDao extends BaseMapper<BookClockinPunchEntity> {
public interface BookClockinPunchDao extends MPJBaseMapper<BookClockinPunchEntity> {

View File

@@ -1,5 +1,6 @@
package com.peanut.modules.book.dao;
import com.github.yulichang.base.MPJBaseMapper;
import com.peanut.modules.book.entity.BookEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@@ -15,7 +16,7 @@ import java.util.Map;
* @date 2022-08-04 15:36:59
*/
@Mapper
public interface BookDao extends BaseMapper<BookEntity> {
public interface BookDao extends MPJBaseMapper<BookEntity> {
List<BookEntity> queryBookInOther(String publisherName,String authorName);

View File

@@ -1,10 +1,11 @@
package com.peanut.modules.book.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.peanut.modules.book.entity.BookForumArticlesEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface BookForumArticlesDao extends BaseMapper<BookForumArticlesEntity> {
public interface BookForumArticlesDao extends MPJBaseMapper<BookForumArticlesEntity> {
}

View File

@@ -1,9 +1,14 @@
package com.peanut.modules.book.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.peanut.modules.book.entity.ShopProductLabelEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ShopProductLabelDao extends BaseMapper<ShopProductLabelEntity> {
public interface ShopProductLabelDao extends MPJBaseMapper<ShopProductLabelEntity> {
}

View File

@@ -1,11 +1,9 @@
package com.peanut.modules.book.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.peanut.modules.book.entity.ShopProductLabelEntity;
import com.peanut.modules.book.entity.ShopProductToLabelEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ShopProductToLabelDao extends BaseMapper<ShopProductToLabelEntity> {
public interface ShopProductToLabelDao extends MPJBaseMapper<ShopProductToLabelEntity> {
}