--新版提交
This commit is contained in:
@@ -0,0 +1,145 @@
|
||||
package com.peanut.modules.book.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.book.entity.BookClockinCommentEntity;
|
||||
import com.peanut.modules.book.entity.BookClockinEntity;
|
||||
import com.peanut.modules.book.entity.BookClockinPunchEntity;
|
||||
import com.peanut.modules.book.service.BookClockinCommentService;
|
||||
import com.peanut.modules.book.service.BookClockinPunchService;
|
||||
import com.peanut.modules.book.service.BookClockinService;
|
||||
import com.peanut.modules.book.service.BookTaskService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 签到信息用户评论
|
||||
*
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("clockin/comment")
|
||||
public class BookClockinCommentController {
|
||||
|
||||
@Autowired
|
||||
private BookClockinCommentService bookClockinCommentService;
|
||||
@Autowired
|
||||
private BookClockinPunchService bookClockinPunchService;
|
||||
@Autowired
|
||||
private BookClockinService bookClockinService;
|
||||
|
||||
/**
|
||||
* 列表 倒叙
|
||||
*/
|
||||
@RequestMapping("/applist")
|
||||
public R applist(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = bookClockinCommentService.queryPage(params);
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Integer id){
|
||||
BookClockinCommentEntity commentEntity = bookClockinCommentService.getById(id);
|
||||
|
||||
return R.ok().put("commentEntity", commentEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody BookClockinCommentEntity clockinComment){
|
||||
Integer bookid1 = clockinComment.getBookId();
|
||||
Integer userId = clockinComment.getUserId();
|
||||
Integer taskId = clockinComment.getTaskId();
|
||||
|
||||
|
||||
BookClockinCommentEntity bookClockinCommentEntity = bookClockinCommentService.getBaseMapper().selectOne(new QueryWrapper<BookClockinCommentEntity>()
|
||||
.eq("book_id", bookid1)
|
||||
.eq("user_id", userId)
|
||||
.eq("task_id", taskId)
|
||||
|
||||
);
|
||||
BookClockinPunchEntity ClockinCommen = bookClockinPunchService.getBaseMapper().selectOne(new QueryWrapper<BookClockinPunchEntity>()
|
||||
.eq("book_id", bookid1)
|
||||
.eq("user_id", userId)
|
||||
.eq("t_id", taskId)
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
if (bookClockinCommentEntity !=null) {
|
||||
return R.error("该信息允许发布一条内容,请勿重复发布");
|
||||
}
|
||||
|
||||
if (ClockinCommen!=null) {
|
||||
clockinComment.setPid(1);
|
||||
}
|
||||
|
||||
bookClockinCommentService.save(clockinComment);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/replysave")
|
||||
public R replysave(@RequestBody BookClockinCommentEntity clockinComment) {
|
||||
Integer bookid = clockinComment.getBookId();
|
||||
Integer userId = clockinComment.getUserId();
|
||||
Integer pid = clockinComment.getPid();
|
||||
BookClockinEntity bookClockinEntity = bookClockinService.getBaseMapper().selectOne(new QueryWrapper<BookClockinEntity>()
|
||||
.eq("id",pid)
|
||||
);
|
||||
clockinComment.setDelFlag(0);
|
||||
bookClockinCommentService.save(clockinComment);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody BookClockinCommentEntity clockinComment){
|
||||
|
||||
bookClockinCommentService.updateById(clockinComment);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Integer[] ids){
|
||||
bookClockinCommentService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,350 @@
|
||||
package com.peanut.modules.book.controller;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.book.entity.*;
|
||||
import com.peanut.modules.book.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import java.util.*;
|
||||
/**
|
||||
* 签到内容信息
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("book/clockin")
|
||||
public class BookClockinController {
|
||||
@Autowired
|
||||
private BookClockinService bookClockinService;
|
||||
@Autowired
|
||||
private BookTaskService bookTaskService;
|
||||
@Autowired
|
||||
private BookClockinCommentService bookClockinCommentService;
|
||||
@Autowired
|
||||
private MyUserService myUserService;
|
||||
@Autowired
|
||||
private BookService bookService;
|
||||
@Autowired
|
||||
private BookClockinPunchService bookClockinPunchService;
|
||||
/**
|
||||
* 列表 app post请求
|
||||
*/
|
||||
@RequestMapping("/applistSS")
|
||||
public R applist(@RequestParam Map<String, Object> params) {
|
||||
PageUtils page = bookClockinService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查看全部评价
|
||||
*/
|
||||
@RequestMapping("/applist")
|
||||
public R applist(@RequestParam("bookid") String bookid,
|
||||
@RequestParam("taskid") String taskid) {
|
||||
|
||||
List<BookClockinEntity> bookClockinEntityList = bookClockinService.getBaseMapper().selectList(new QueryWrapper<BookClockinEntity>()
|
||||
.eq("book_id", bookid).eq("task_id", taskid));
|
||||
List list = new ArrayList<>();
|
||||
for (BookClockinEntity bookClockinEntity : bookClockinEntityList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
String name = "";
|
||||
String avatar="";
|
||||
Integer id2 =null;
|
||||
Integer userId = bookClockinEntity.getUserId();
|
||||
Integer taskId = bookClockinEntity.getTaskId();
|
||||
Integer bookId = bookClockinEntity.getBookId();
|
||||
String conTent = bookClockinEntity.getContent();
|
||||
Integer id1 = bookClockinEntity.getId();
|
||||
String images = (String)bookClockinEntity.getImages();
|
||||
Date createTime = bookClockinEntity.getCreateTime();
|
||||
List<MyUserEntity> id = myUserService.getBaseMapper().selectList(new QueryWrapper<MyUserEntity>().eq("id", userId));
|
||||
for (MyUserEntity user : id) {
|
||||
name = user.getNickname();
|
||||
id2 = user.getId();
|
||||
avatar = user.getAvatar();
|
||||
}
|
||||
|
||||
//评论信息
|
||||
map.put("userid", id2);
|
||||
map.put("name", name);
|
||||
map.put("avatar", avatar);
|
||||
map.put("bookid", bookId);
|
||||
map.put("taskId", taskId);
|
||||
map.put("content", conTent);
|
||||
map.put("images", images);
|
||||
map.put("createdate", createTime);
|
||||
list.add(map);
|
||||
}
|
||||
Collections.reverse(list);
|
||||
return R.ok().put("list", list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 列表 后台get请求
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params) {
|
||||
PageUtils page = bookClockinService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Integer id) {
|
||||
BookClockinEntity bookClockinEntity = bookClockinService.getById(id);
|
||||
return R.ok().put("bookBuyConfig", bookClockinEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody BookClockinEntity bookClockinEntity) {
|
||||
|
||||
Integer bookId = bookClockinEntity.getBookId();
|
||||
Integer userId = bookClockinEntity.getUserId();
|
||||
Integer taskId = bookClockinEntity.getTaskId();
|
||||
Integer dayId = bookClockinEntity.getDayId();
|
||||
BookClockinPunchEntity bookClockinPunchEntity = bookClockinPunchService.getBaseMapper().selectOne(new QueryWrapper<BookClockinPunchEntity>()
|
||||
.eq("book_id", bookId)
|
||||
.eq("t_id", taskId)
|
||||
.eq("days", dayId)
|
||||
.eq("user_id", userId)
|
||||
);
|
||||
if (bookClockinPunchEntity==null) {
|
||||
return R.error("您尚未签到,签到完成即可发表内容");
|
||||
}
|
||||
BookClockinEntity bookClockin = bookClockinService.getBaseMapper().selectOne(new QueryWrapper<BookClockinEntity>()
|
||||
.eq("book_id", bookId)
|
||||
.eq("task_id", taskId)
|
||||
.eq("day_id", dayId)
|
||||
.eq("user_id", userId)
|
||||
);
|
||||
if (bookClockin!=null) {
|
||||
return R.error("您已参与第"+dayId+"天签到评论");
|
||||
}
|
||||
List<Map<String, String>> imageList = (ArrayList<Map<String, String>>) bookClockinEntity.getImageeStrings();
|
||||
String imageStr = "";
|
||||
for (Map m : imageList) {
|
||||
imageStr += m.get("url") + ",";
|
||||
|
||||
}
|
||||
|
||||
if (imageStr!=null &&!imageStr.isEmpty()){
|
||||
String substring = imageStr.substring(0, imageStr.length() - 1);
|
||||
bookClockinEntity.setImages(substring);
|
||||
}else {
|
||||
bookClockinEntity.setImages("");
|
||||
}
|
||||
|
||||
|
||||
|
||||
bookClockinEntity.setDelFlag(0);
|
||||
bookClockinService.save(bookClockinEntity);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody BookClockinEntity bookClockinEntity) {
|
||||
bookClockinService.updateById(bookClockinEntity);
|
||||
return R.ok("提交成功");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Integer[] ids) {
|
||||
bookClockinService.removeByIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 全部评价
|
||||
*
|
||||
* @param bookId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("commentAll")
|
||||
public R commentAll(@RequestParam("bookId") Integer bookId) {
|
||||
List applist = new ArrayList<>();
|
||||
Map<String, Object> productMap = new HashMap<>();
|
||||
//根据bookid查找出签到表中签到的用户数据
|
||||
List<BookClockinEntity> bookid = bookClockinService.getBaseMapper().selectList(new QueryWrapper<BookClockinEntity>()
|
||||
.eq("book_id", bookId)
|
||||
.orderByDesc("create_time"));
|
||||
|
||||
for (BookClockinEntity book : bookid) {
|
||||
HashMap<Object, Object> map = new HashMap<>();
|
||||
|
||||
Integer bookid1 = book.getBookId();
|
||||
//BookClockinEntity获取点赞总数
|
||||
String likes = book.getLikeSum();
|
||||
|
||||
Integer userid1 = book.getUserId();
|
||||
Integer taskId = book.getTaskId();
|
||||
Integer id1 = book.getId();
|
||||
applist.add(taskId);
|
||||
//根据id和bookid查询出对应的签到下评论的全部数据
|
||||
|
||||
productMap.put("bookid",bookid1);
|
||||
productMap.put("userid",userid1);
|
||||
}
|
||||
PageUtils pages = bookClockinService.queryPage(productMap);
|
||||
return R.ok().put("days",applist).put("pages",pages);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 我的 :我的签到记录
|
||||
* @param id
|
||||
* @param bookId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/myinfo")
|
||||
public R myinfo(@RequestParam("userid") Integer id,
|
||||
@RequestParam("bookid") Integer bookId) {
|
||||
|
||||
|
||||
List<BookClockinEntity> bookClockinEntityList = bookClockinService.getBaseMapper().selectList(new QueryWrapper<BookClockinEntity>()
|
||||
.eq("user_id",id) .eq("book_id",bookId).orderByDesc("create_time"));
|
||||
List list = new ArrayList<>();
|
||||
|
||||
for (BookClockinEntity bookClockinEntity : bookClockinEntityList) {
|
||||
Map<String, Object> productMap = new HashMap<>();
|
||||
Integer userId = bookClockinEntity.getUserId();
|
||||
Integer dayId = bookClockinEntity.getDayId();
|
||||
Integer bookIds = bookClockinEntity.getBookId();
|
||||
Integer typeId = bookClockinEntity.getTaskId();
|
||||
String content = bookClockinEntity.getContent();
|
||||
Object images = bookClockinEntity.getImages();
|
||||
Date createTime = bookClockinEntity.getCreateTime();
|
||||
BookEntity byId = bookService.getById(bookId);
|
||||
String name = byId.getName();
|
||||
String images1 = byId.getImages();
|
||||
BookTaskEntity bookTaskEntity = bookTaskService.getById(typeId);
|
||||
String heading = bookTaskEntity.getHeading();
|
||||
|
||||
|
||||
String myUsername = "";
|
||||
String avatar="";
|
||||
List<MyUserEntity> myUserid = myUserService.getBaseMapper().selectList(new QueryWrapper<MyUserEntity>().eq("id", userId));
|
||||
for (MyUserEntity user : myUserid) {
|
||||
myUsername = user.getNickname();
|
||||
avatar = user.getAvatar();
|
||||
}
|
||||
|
||||
productMap.put("myUseravatar",avatar);
|
||||
productMap.put("myUsername",myUsername);
|
||||
|
||||
productMap.put("dayId",dayId);
|
||||
productMap.put("userId",userId);
|
||||
productMap.put("taskId",typeId);
|
||||
productMap.put("content",content);
|
||||
productMap.put("clockinimages",images);
|
||||
productMap.put("createTime",createTime);
|
||||
productMap.put("bookId",bookIds);
|
||||
productMap.put("bookname",name);
|
||||
productMap.put("bookimages",images1);
|
||||
productMap.put("TaskHeading",heading);
|
||||
list.add(productMap);
|
||||
|
||||
}
|
||||
// Collections.sort(list);
|
||||
// Collections.reverse(list);
|
||||
return R.ok().put("ClockinList", list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 详情页我的签到评论
|
||||
* @param id
|
||||
* @param taskid
|
||||
* @param bookId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/myinfolist")
|
||||
public R myinfolist(@RequestParam("userid") Integer id,
|
||||
@RequestParam("taskid") Integer taskid,
|
||||
@RequestParam("bookid") Integer bookId
|
||||
) {
|
||||
List list = new ArrayList<>();
|
||||
Map<String, Object> productMap = new HashMap<>();
|
||||
BookClockinEntity bookClockin = bookClockinService.getBaseMapper().selectOne(new QueryWrapper<BookClockinEntity>()
|
||||
.eq("user_id",id)
|
||||
.eq("task_id",taskid)
|
||||
.eq("book_id",bookId)
|
||||
);
|
||||
BookClockinPunchEntity bookClockinPunchEntity = bookClockinPunchService.getBaseMapper().selectOne(new QueryWrapper<BookClockinPunchEntity>()
|
||||
.eq("user_id",id)
|
||||
.eq("t_id",taskid)
|
||||
.eq("book_id",bookId)
|
||||
);
|
||||
|
||||
|
||||
if (bookClockin == null ) {
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
Integer userId = bookClockin.getUserId();
|
||||
Integer bookIds = bookClockin.getBookId();
|
||||
Integer taskId = bookClockin.getTaskId();
|
||||
Integer dayId = bookClockin.getDayId();
|
||||
String content = bookClockin.getContent();
|
||||
Object images = bookClockin.getImages();
|
||||
Date createTime = bookClockin.getCreateTime();
|
||||
BookEntity byId = bookService.getById(bookId);
|
||||
String name = byId.getName();
|
||||
String images1 = byId.getImages();
|
||||
BookTaskEntity bookTaskEntity = bookTaskService.getById(taskId);
|
||||
String heading = bookTaskEntity.getHeading();
|
||||
|
||||
|
||||
|
||||
String myUsername = "";
|
||||
String avatar="";
|
||||
List<MyUserEntity> myUserid = myUserService.getBaseMapper().selectList(new QueryWrapper<MyUserEntity>().eq("id", userId));
|
||||
for (MyUserEntity user : myUserid) {
|
||||
myUsername = user.getNickname();
|
||||
avatar = user.getAvatar();
|
||||
}
|
||||
|
||||
productMap.put("myUseravatar",avatar);
|
||||
productMap.put("myUsername",myUsername);
|
||||
|
||||
|
||||
|
||||
productMap.put("userId",userId);
|
||||
productMap.put("taskId",taskId);
|
||||
productMap.put("dayId",dayId);
|
||||
|
||||
productMap.put("content",content);
|
||||
productMap.put("clockinimages",images);
|
||||
productMap.put("createTime",createTime);
|
||||
productMap.put("bookId",bookIds);
|
||||
productMap.put("bookname",name);
|
||||
productMap.put("bookimages",images1);
|
||||
productMap.put("TaskHeading",heading);
|
||||
list.add(productMap);
|
||||
|
||||
Collections.reverse(list);
|
||||
return R.ok().put("productlist", list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
package com.peanut.modules.book.controller;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.book.entity.BookClockinCommentEntity;
|
||||
import com.peanut.modules.book.entity.BookClockinPunchEntity;
|
||||
import com.peanut.modules.book.entity.BookEntity;
|
||||
import com.peanut.modules.book.entity.MyUserEntity;
|
||||
import com.peanut.modules.book.service.BookClockinCommentService;
|
||||
import com.peanut.modules.book.service.BookClockinPunchService;
|
||||
import com.peanut.modules.book.service.BookService;
|
||||
import com.peanut.modules.book.service.MyUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import java.util.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("book/clockinPunch")
|
||||
public class BookClockinPunchController {
|
||||
@Autowired
|
||||
private BookClockinPunchService bookClockinPunchService;
|
||||
@Autowired
|
||||
private BookService bookService;
|
||||
@Autowired
|
||||
private MyUserService myUserService;
|
||||
@Autowired
|
||||
private BookClockinCommentService bookClockinCommentService;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 列表 app post请求 /applistSS
|
||||
*/
|
||||
@RequestMapping("/applist")
|
||||
public R applist(@RequestParam Map<String, Object> params) {
|
||||
PageUtils page = bookClockinPunchService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 计算打卡天数
|
||||
*/
|
||||
@RequestMapping("/clockindays")
|
||||
public R applists(@RequestParam("bookId") String bookid,
|
||||
@RequestParam("userId") String userid) {
|
||||
ArrayList<Object> list = new ArrayList<>();
|
||||
|
||||
//查询用户id图书id 根据第一天打卡天数开始计算
|
||||
BookClockinPunchEntity bookClockinEntity = bookClockinPunchService.getBaseMapper().selectOne(new QueryWrapper<BookClockinPunchEntity>()
|
||||
.eq("book_id", bookid)
|
||||
.eq("user_id", userid)
|
||||
.eq("days",1)
|
||||
|
||||
);
|
||||
List<BookClockinPunchEntity> bookClockinEntityList = bookClockinPunchService.getBaseMapper().selectList(new QueryWrapper<BookClockinPunchEntity>()
|
||||
.eq("book_id", bookid)
|
||||
.eq("user_id", userid)
|
||||
|
||||
);
|
||||
for (BookClockinPunchEntity bookClock : bookClockinEntityList) {
|
||||
Integer days = bookClock.getDays();
|
||||
|
||||
list.add(days);
|
||||
}
|
||||
|
||||
if (bookClockinEntity != null) {
|
||||
Date createTime = bookClockinEntity.getCreateTime();
|
||||
long createTimeMillis = createTime.getTime();
|
||||
//获取第一次打卡天数createTimeMillis毫秒数,时间戳减并除以毫秒数(24 * 60 * 60 * 1000)计算打卡总天数+1
|
||||
int daysBetween = (int) (System.currentTimeMillis() - createTimeMillis) / (24 * 60 * 60 * 1000)+1;
|
||||
return R.ok().put("daysBetween", daysBetween).put("dayslist", list);
|
||||
|
||||
} else if (bookClockinEntity == null) {
|
||||
Date createTime = new Date();
|
||||
long createTimeMillis = createTime.getTime();
|
||||
//获取第一次打卡天数createTimeMillis毫秒数,时间戳减并除以毫秒数(24 * 60 * 60 * 1000)计算打卡总天数+1
|
||||
int daysBetween = (int) (System.currentTimeMillis() - createTimeMillis) / (24 * 60 * 60 * 1000)+1;
|
||||
return R.ok().put("daysBetween", daysBetween).put("dayslist",list );
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return R.error("无信息记录");
|
||||
}
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Integer id) {
|
||||
BookClockinPunchEntity bookClockinPunchEntity = bookClockinPunchService.getById(id);
|
||||
|
||||
return R.ok().put("bookClockinPunchEntity", bookClockinPunchEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//请求接口时是从task的info或者list中发出的,理论上
|
||||
public R save(@RequestBody BookClockinPunchEntity bookClockinPunchEntity) {
|
||||
Integer bookid1 = bookClockinPunchEntity.getBookId();
|
||||
Integer userId = bookClockinPunchEntity.getUserId();
|
||||
Integer taskId = bookClockinPunchEntity.getTId();
|
||||
BookEntity bookEntity = bookService.getBaseMapper().selectById(bookid1);
|
||||
Boolean canListen = bookEntity.getCanListen();
|
||||
BookClockinPunchEntity bookClock = bookClockinPunchService.getBaseMapper().selectOne(new QueryWrapper<BookClockinPunchEntity>()
|
||||
.eq("book_id", bookid1)
|
||||
.eq("user_id", userId)
|
||||
.eq("t_id", taskId)
|
||||
|
||||
|
||||
|
||||
);
|
||||
if (bookClock !=null) {
|
||||
return R.error("您已经签到,请勿重复签到");
|
||||
}
|
||||
|
||||
|
||||
if(canListen == true){
|
||||
boolean b = myUserService.bookAuthenticate(bookid1,userId);
|
||||
if (b){
|
||||
bookClockinPunchEntity.setDelFlag(0);
|
||||
bookClockinPunchService.save(bookClockinPunchEntity);
|
||||
return R.ok("签到成功");
|
||||
}
|
||||
|
||||
}else {
|
||||
return R.error("购买此书即可参与签到");
|
||||
}
|
||||
|
||||
return R.ok("跳方法001");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody BookClockinPunchEntity bookClockinPunchEntity) {
|
||||
bookClockinPunchService.updateById(bookClockinPunchEntity);
|
||||
return R.ok("提交成功");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Integer[] ids) {
|
||||
bookClockinPunchService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取评论
|
||||
* @param bookClockinPunchEntity
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/punchcoments")
|
||||
public R punchcoments(@RequestBody BookClockinPunchEntity bookClockinPunchEntity) {
|
||||
//图书Id
|
||||
Integer bookId = bookClockinPunchEntity.getBookId();
|
||||
//用户id
|
||||
Integer userId = bookClockinPunchEntity.getUserId();
|
||||
//天数
|
||||
Integer days = bookClockinPunchEntity.getDays();
|
||||
|
||||
ArrayList<Object> list = new ArrayList<>();
|
||||
List<BookClockinCommentEntity> bookClockinCommentEntities = bookClockinCommentService.getBaseMapper().selectList(new QueryWrapper<BookClockinCommentEntity>()
|
||||
.eq("user_id", userId)
|
||||
.eq("book_id", bookId)
|
||||
.eq("task_id", days)
|
||||
//pid等于1时为一级评论
|
||||
// .eq("pid",1)
|
||||
);
|
||||
for (BookClockinCommentEntity bookClockinCommentEntity : bookClockinCommentEntities) {
|
||||
HashMap<Object, Object> map = new HashMap<>();
|
||||
String name = "";
|
||||
String avatar="";
|
||||
|
||||
Integer userId1 = bookClockinCommentEntity.getUserId();
|
||||
Integer bookId1 = bookClockinCommentEntity.getBookId();
|
||||
String content = bookClockinCommentEntity.getContent();
|
||||
String images = bookClockinCommentEntity.getImages();
|
||||
Date createTime = bookClockinCommentEntity.getCreateTime();
|
||||
|
||||
|
||||
|
||||
List<MyUserEntity> id = myUserService.getBaseMapper().selectList(new QueryWrapper<MyUserEntity>().eq("id", userId));
|
||||
for (MyUserEntity user : id) {
|
||||
name = user.getNickname();
|
||||
avatar = user.getAvatar();
|
||||
}
|
||||
map.put("userid", userId1);
|
||||
map.put("name", name);
|
||||
map.put("avatar", avatar);
|
||||
map.put("bookid", bookId1);
|
||||
map.put("content", content);
|
||||
map.put("images", images);
|
||||
map.put("createdate", createTime);
|
||||
list.add(map);
|
||||
|
||||
}
|
||||
|
||||
Collections.reverse(list);
|
||||
return R.ok().put("list", list);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.peanut.modules.book.controller;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.book.entity.BookForumArticlesEntity;
|
||||
import com.peanut.modules.book.entity.BookForumCommentEntity;
|
||||
import com.peanut.modules.book.service.BookForumArticlesService;
|
||||
import com.peanut.modules.book.service.BookForumCommenService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("forum/articles")
|
||||
public class BookForumArticlesServiceController {
|
||||
@Autowired
|
||||
private BookForumArticlesService bookForumArticlesService;
|
||||
@Autowired
|
||||
private BookForumCommenService bookForumCommenService;
|
||||
|
||||
/**
|
||||
* 列表 (开始时间倒叙) 后台get请求
|
||||
*/
|
||||
@RequestMapping("/desccreatelist")
|
||||
public R Desccreatelist(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = bookForumArticlesService.queryPage(params);
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 列表 (修改时间倒叙) app页面
|
||||
*/
|
||||
@RequestMapping("/descupdatelist")
|
||||
public R Descupdatelist(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = bookForumArticlesService.queryPages(params);
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后台信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Integer id){
|
||||
BookForumArticlesEntity forumArticles = bookForumArticlesService.getById(id);
|
||||
return R.ok().put("BookForumArticlesEntity", forumArticles);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* app信息
|
||||
*/
|
||||
@RequestMapping("/appinfo/{id}")
|
||||
public R appinfo(@PathVariable("id") Integer id){
|
||||
BookForumArticlesEntity forumArticles = bookForumArticlesService.getById(id);
|
||||
return R.ok().put("BookForumArticlesEntity", forumArticles);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
|
||||
public R save(@RequestBody BookForumArticlesEntity bookForumArticlesEntity){
|
||||
bookForumArticlesEntity.setCreateTime(new Date());
|
||||
bookForumArticlesEntity.setDelflag(0);
|
||||
bookForumArticlesService.saveOrUpdate(bookForumArticlesEntity);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody BookForumArticlesEntity bookForumArticlesEntity){
|
||||
bookForumArticlesEntity.setUpdateTime(new Date());
|
||||
bookForumArticlesService.updateById(bookForumArticlesEntity);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Integer[] ids){
|
||||
bookForumArticlesService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.peanut.modules.book.controller;
|
||||
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.book.entity.BookForumCommentEntity;
|
||||
import com.peanut.modules.book.service.BookForumArticlesService;
|
||||
import com.peanut.modules.book.service.BookForumCommenService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 评价文章
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("forum/comment")
|
||||
public class BookForumCommentController {
|
||||
|
||||
@Autowired
|
||||
private BookForumCommenService bookForumCommentService;
|
||||
@Autowired
|
||||
private BookForumArticlesService bookForumArticlesService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = bookForumCommentService.queryPage(params);
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Integer id){
|
||||
BookForumCommentEntity forumCom = bookForumCommentService.getById(id);
|
||||
|
||||
return R.ok().put("BookForumCommentEntity", forumCom);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
|
||||
public R save(@RequestBody BookForumCommentEntity bookForumCommentEntity){
|
||||
bookForumCommentEntity.setDelflag(0);
|
||||
bookForumCommentService.saveOrUpdate(bookForumCommentEntity);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody BookForumCommentEntity bookForumCommentEntity){
|
||||
bookForumCommentService.updateById(bookForumCommentEntity);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Integer[] ids){
|
||||
bookForumCommentService.removeByIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package com.peanut.modules.book.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.book.entity.BookListeningEntity;
|
||||
import com.peanut.modules.book.service.BookListeningService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 听书进度表
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("book/listening")
|
||||
public class BookListeningController {
|
||||
|
||||
@Autowired
|
||||
private BookListeningService bookListeningService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = bookListeningService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Integer id){
|
||||
BookListeningEntity bookReadRate = bookListeningService.getById(id);
|
||||
|
||||
return R.ok().put("bookReadRate", bookReadRate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save( BookListeningEntity booklistening){
|
||||
Integer bookId = booklistening.getBookId();
|
||||
Integer userId = booklistening.getUserId();
|
||||
BookListeningEntity booklisteningEntity = bookListeningService.getBaseMapper().selectOne(new QueryWrapper<BookListeningEntity>().eq("book_id", bookId)
|
||||
.eq("user_id", userId));
|
||||
if (booklisteningEntity != null) {
|
||||
BookListeningEntity one = bookListeningService.getOne(new QueryWrapper<BookListeningEntity>()
|
||||
.eq("book_id", booklistening.getBookId())
|
||||
.eq("user_id", booklistening.getUserId()));
|
||||
Integer id = one.getId();
|
||||
// 构建新的BookListeningEntity对象,设置需要修改的字段
|
||||
BookListeningEntity updatedEntity = new BookListeningEntity();
|
||||
updatedEntity.setId(id);
|
||||
updatedEntity.setPrecent(booklistening.getPrecent());
|
||||
updatedEntity.setChapterId(booklistening.getChapterId());
|
||||
updatedEntity.setChapterName(booklistening.getChapterName());
|
||||
updatedEntity.setUpdateTime(new Date());
|
||||
// 执行更新操作
|
||||
bookListeningService.updateById(updatedEntity);
|
||||
return R.ok().put("bookListeningId",booklisteningEntity.getId());
|
||||
}else {
|
||||
|
||||
bookListeningService.save(booklistening);
|
||||
}
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody BookListeningEntity booklistening) {
|
||||
BookListeningEntity one = bookListeningService.getOne(new QueryWrapper<BookListeningEntity>()
|
||||
.eq("book_id", booklistening.getBookId())
|
||||
.eq("user_id", booklistening.getUserId()));
|
||||
if (one != null) {
|
||||
Integer id = one.getId();
|
||||
|
||||
// 构建新的BookListeningEntity对象,设置需要修改的字段
|
||||
BookListeningEntity updatedEntity = new BookListeningEntity();
|
||||
updatedEntity.setId(id);
|
||||
updatedEntity.setPrecent(booklistening.getPrecent());
|
||||
updatedEntity.setChapterId(booklistening.getChapterId());
|
||||
updatedEntity.setChapterName(booklistening.getChapterName());
|
||||
updatedEntity.setUpdateTime(new Date());
|
||||
|
||||
// 执行更新操作
|
||||
bookListeningService.updateById(updatedEntity);
|
||||
|
||||
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Integer[] ids){
|
||||
bookListeningService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取阅读进度
|
||||
*/
|
||||
@RequestMapping("/getReadRate")
|
||||
public R getReadRate(@RequestBody BookListeningEntity booklistening){
|
||||
BookListeningEntity one = bookListeningService.getOne(new QueryWrapper<BookListeningEntity>().eq("user_id", booklistening.getUserId()).eq("book_id", booklistening.getBookId()));
|
||||
return R.ok().put("readRate",one);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.peanut.modules.book.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.book.entity.BookBrowseRecordsEntity;
|
||||
import com.peanut.modules.book.entity.BookListeningEntity;
|
||||
import com.peanut.modules.book.entity.BookListeningShelfEntity;
|
||||
import com.peanut.modules.book.entity.BookShelfEntity;
|
||||
import com.peanut.modules.book.service.BookBrowseRecordsService;
|
||||
import com.peanut.modules.book.service.BookListeningService;
|
||||
import com.peanut.modules.book.service.BookListeningShelfService;
|
||||
import com.peanut.modules.book.service.BookShelfService;
|
||||
import com.peanut.modules.book.vo.BookShelfVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("book/BookListeningShelf")
|
||||
public class BookListeningShelfController {
|
||||
@Autowired
|
||||
private BookListeningShelfService bookListeningShelfService;
|
||||
@Autowired
|
||||
private BookBrowseRecordsService bookBrowseRecordsService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = bookListeningShelfService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
|
||||
public R info(@PathVariable("id") Integer id){
|
||||
BookListeningShelfEntity bookShelf = bookListeningShelfService.getById(id);
|
||||
|
||||
return R.ok().put("bookShelf", bookShelf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
// @RequiresPermissions("book:bookshelf:delete")
|
||||
public R delete(@RequestBody Integer[] ids){
|
||||
bookBrowseRecordsService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户听书书架 getUserBookChapterRead
|
||||
*/
|
||||
// @RequestMapping("/getUserBookChapterRead")
|
||||
// public R getUserBookChapterRead(@RequestParam Integer userId){
|
||||
// List<BookShelfVo> bookShelfVos = bookBrowseRecordsService.getUserBookChapterRead(userId);
|
||||
//
|
||||
// return R.ok().put("bookShelfVos",bookShelfVos);
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
package com.peanut.modules.book.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.book.entity.BookClockinEntity;
|
||||
import com.peanut.modules.book.entity.BookClockinPunchEntity;
|
||||
import com.peanut.modules.book.entity.BookTaskEntity;
|
||||
import com.peanut.modules.book.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 发布签到任务
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("book/task")
|
||||
public class BookTaskController {
|
||||
|
||||
@Autowired
|
||||
private BookTaskService bookTaskService;
|
||||
@Autowired
|
||||
private BookService bookService;
|
||||
@Autowired
|
||||
private BookClockinService bookClockinService;
|
||||
@Autowired
|
||||
private MyUserService myUserService;
|
||||
@Autowired
|
||||
private BookClockinPunchService bookClockinPunchService;
|
||||
|
||||
/**
|
||||
* 列表后台
|
||||
*
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params) {
|
||||
PageUtils page = bookTaskService.queryPage(params);
|
||||
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 列表app根据days查询
|
||||
*
|
||||
*/
|
||||
@RequestMapping("/applist")
|
||||
public R applist(@RequestParam Map<String, Object> params) {
|
||||
PageUtils page = bookTaskService.queryPageServi(params);
|
||||
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Integer id) {
|
||||
|
||||
//根据id找到详细数据信息
|
||||
BookTaskEntity bookTaskEntity = bookTaskService.getById(id);
|
||||
Integer ids = bookTaskEntity.getId();
|
||||
Integer bookid = bookTaskEntity.getBookid();
|
||||
List<BookClockinPunchEntity> bookClockinPunchEntity = bookClockinPunchService.getBaseMapper().selectList(new QueryWrapper<BookClockinPunchEntity>()
|
||||
.eq("user_id", ids)
|
||||
.eq("book_id", bookid));
|
||||
|
||||
// 遍历 bookClockinEntityList 中的每个 bookClockinEntity,查询 BookClockinEntity 表中对应的总数
|
||||
int total = 0;
|
||||
for ( BookClockinPunchEntity bookClockin : bookClockinPunchEntity) {
|
||||
|
||||
Integer id1 = bookClockin.getId();
|
||||
// BookClockinEntity byId = bookClockinService.getById(id1);
|
||||
//++获取到总条数
|
||||
total ++;
|
||||
}
|
||||
//返回总条数
|
||||
|
||||
return R.ok().put("bookTaskEntity", bookTaskEntity).put("totalCont",total);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody BookTaskEntity bookTaskEntity) {
|
||||
|
||||
bookTaskEntity.setDelFlag(0);
|
||||
bookTaskService.save(bookTaskEntity);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody BookTaskEntity bookTaskEntity) {
|
||||
|
||||
bookTaskService.updateById(bookTaskEntity);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Integer[] ids) {
|
||||
bookTaskService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 总条数
|
||||
*/
|
||||
@RequestMapping("/totalsum")
|
||||
public R totalsum(@RequestBody BookTaskEntity bookTaskEntity) {
|
||||
|
||||
// 获取 BookTaskEntity 表中所有的 bookid和id
|
||||
String days = bookTaskEntity.getDays();
|
||||
Integer bookid = bookTaskEntity.getBookid();
|
||||
List<BookClockinPunchEntity> books = bookClockinPunchService.getBaseMapper().selectList(new QueryWrapper<BookClockinPunchEntity>()
|
||||
.eq("days", days)
|
||||
.eq("book_id", bookid));
|
||||
|
||||
|
||||
|
||||
// 遍历 bookClockinEntityList 中的每个 bookClockinEntity,查询 BookClockinEntity 表中对应的总数
|
||||
int total = 0;
|
||||
for ( BookClockinPunchEntity book : books) {
|
||||
// 使用 bookClockinEntity 进行匹配查询
|
||||
Integer id1 = book.getId();
|
||||
BookClockinPunchEntity byId = bookClockinPunchService.getById(id1);
|
||||
//++获取到总条数
|
||||
total ++;
|
||||
}
|
||||
//返回总条数
|
||||
return R.ok().put("totalSum",total);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
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.entity.MyUserEntity;
|
||||
import com.peanut.modules.book.entity.UserFeedbackEntity;
|
||||
import com.peanut.modules.book.entity.UserRecordEntity;
|
||||
import com.peanut.modules.book.service.MyUserService;
|
||||
import com.peanut.modules.book.service.UserFeedbackSerivce;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 追加评论后游客评论无限制
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user/feedback")
|
||||
public class UserFeedbackController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private UserFeedbackSerivce userFeedbackService;
|
||||
@Autowired
|
||||
private MyUserService myUserService;
|
||||
|
||||
/**
|
||||
* 查看我的评价
|
||||
*/
|
||||
@RequestMapping("/Allevaluations")
|
||||
public R Allevaluations(@RequestBody UserFeedbackEntity userFeedbackEntity){
|
||||
List<UserFeedbackEntity> userid = userFeedbackService.getBaseMapper().selectList(new QueryWrapper<UserFeedbackEntity>().eq("userid", userFeedbackEntity.getUserId()
|
||||
));
|
||||
return R.ok().put("Allevaluations",userid);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查看全部评价
|
||||
*/
|
||||
@RequestMapping("/All")
|
||||
public R All(@RequestBody UserFeedbackEntity userFeedbackEntity){
|
||||
HashMap<Object, Object> maps = new HashMap<>();
|
||||
List list = new ArrayList<>();
|
||||
List<UserFeedbackEntity> bookid = userFeedbackService.getBaseMapper().selectList(new QueryWrapper<UserFeedbackEntity>().eq("bookid", userFeedbackEntity.getBookid()));
|
||||
for (UserFeedbackEntity userFe : bookid) {
|
||||
HashMap<Object, Object> map = new HashMap<>();
|
||||
Integer book = userFe.getBookid();
|
||||
Integer use = userFe.getUserId();
|
||||
List<MyUserEntity> id = myUserService.getBaseMapper().selectList(new QueryWrapper<MyUserEntity>().eq("id", use));
|
||||
String usser="";
|
||||
String name = "";
|
||||
for (MyUserEntity user : id) {
|
||||
usser = user.getAvatar();
|
||||
name =user.getNickname();
|
||||
|
||||
}
|
||||
map.put("Avatar",usser);
|
||||
map.put("name",name);
|
||||
map.put("bookid",book);
|
||||
map.put("orderSn",userFeedbackEntity.getOrdersn());
|
||||
map.put("userid",use);
|
||||
map.put("content",userFeedbackEntity.getContent());
|
||||
map.put("create_date",userFeedbackEntity.getCreate_date());
|
||||
map.put("rid",userFeedbackEntity.getRid());
|
||||
map.put("fuid",userFeedbackEntity.getFuid());
|
||||
list.add(map);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
maps.put("list",list);
|
||||
|
||||
return R.ok().put("list",list);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 游客评价
|
||||
*/
|
||||
@RequestMapping("/userbacksave")
|
||||
public R userbacksave(@RequestBody UserFeedbackEntity userFeedbackEntity ) {
|
||||
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,196 @@
|
||||
package com.peanut.modules.book.controller;
|
||||
|
||||
import cn.com.marsoft.tool.ToolObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.book.entity.*;
|
||||
import com.peanut.modules.book.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import static com.peanut.common.utils.R.error;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/user/followUp")
|
||||
public class UserFollowUpController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private UserFollowUpService userFollowUpService;
|
||||
@Autowired
|
||||
private UserRecordService userRecordService;
|
||||
@Autowired
|
||||
private MyUserService myUserService;
|
||||
@Autowired
|
||||
private BuyOrderService buyOrderService;
|
||||
@Autowired
|
||||
private BuyOrderDetailService buyOrderDetailService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params ){
|
||||
PageUtils page = userFollowUpService.queryPage(params);
|
||||
return R.ok().put("page", page);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 我的评价
|
||||
*/
|
||||
@RequestMapping("/Allevaluations")
|
||||
public R Allevaluations(@RequestBody UserFollowUpEntity userFollowUpEntity){
|
||||
List<UserFollowUpEntity> userid = userFollowUpService.getBaseMapper().selectList(new QueryWrapper<UserFollowUpEntity>().eq("userid", userFollowUpEntity.getUserId()));
|
||||
return R.ok().put("Allevaluations",userid);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 全部评价
|
||||
*/
|
||||
@RequestMapping("/Alllevas")
|
||||
public R Alllevas(@RequestBody UserFollowUpEntity users){
|
||||
HashMap<Object, Object> maps = new HashMap<>();
|
||||
List list = new ArrayList<>();
|
||||
List<UserFollowUpEntity> bookid = userFollowUpService.getBaseMapper().selectList(new QueryWrapper<UserFollowUpEntity>().eq("bookid", users.getBookid()));
|
||||
for (UserFollowUpEntity userRecord : bookid) {
|
||||
HashMap<Object, Object> map = new HashMap<>();
|
||||
Integer bookid1 = userRecord.getBookid();
|
||||
Integer userid1 = userRecord.getUserId();
|
||||
List<MyUserEntity> id = myUserService.getBaseMapper().selectList(new QueryWrapper<MyUserEntity>().eq("id", userid1));
|
||||
String usser="";
|
||||
String name = "";
|
||||
for (MyUserEntity user : id) {
|
||||
usser = user.getAvatar();
|
||||
name =user.getNickname();
|
||||
|
||||
}
|
||||
map.put("Avatar",usser);
|
||||
map.put("name",name);
|
||||
map.put("userId", users.getUserId());
|
||||
map.put("bookid",bookid1);
|
||||
map.put("userid",userid1);
|
||||
map.put("content",users.getConTent());
|
||||
map.put("create_date",users.getCreateDate());
|
||||
map.put("oid",users.getOid());
|
||||
map.put("praIse",users.getPraIse());
|
||||
|
||||
list.add(map);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
maps.put("list",list);
|
||||
|
||||
return R.ok().put("list",list);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* 追加评论(用户只可评论一次)
|
||||
*
|
||||
* */
|
||||
@RequestMapping("/userFollowUp")
|
||||
public Object UserFollowUp(@RequestBody UserFollowUpEntity userFollowUpEntity ) {
|
||||
|
||||
|
||||
//根据传过来的userid和oid查询出来userRecordEntity中关联数据
|
||||
UserRecordEntity userRecord = userRecordService.getBaseMapper().selectOne(new QueryWrapper<UserRecordEntity>()
|
||||
.eq("userid", userFollowUpEntity.getUserId()).last("LIMIT 1")
|
||||
.eq("bookid", userFollowUpEntity.getBookid())
|
||||
.eq("id",userFollowUpEntity.getOid())
|
||||
);
|
||||
if (userRecord==null){
|
||||
return R.error("请先评论再追评");
|
||||
}
|
||||
String orderSn = userRecord.getOrderSn();
|
||||
BuyOrderEntity buyOrderEntity =buyOrderService.getBaseMapper().selectOne(new QueryWrapper<BuyOrderEntity>()
|
||||
.eq("order_sn",orderSn).last("LIMIT 1")
|
||||
);
|
||||
|
||||
Integer orderId = buyOrderEntity.getOrderId();
|
||||
Integer bookid = userRecord.getBookid();
|
||||
Integer userid = userRecord.getUserid();
|
||||
Integer id1 = userRecord.getId();
|
||||
BuyOrderDetailEntity detailEntity = buyOrderDetailService.getBaseMapper().selectOne(new QueryWrapper<BuyOrderDetailEntity>()
|
||||
.eq("Order_id", orderId).eq("product_id",bookid));
|
||||
|
||||
UserFollowUpEntity followUpEntity = userFollowUpService.getBaseMapper().selectOne(new QueryWrapper<UserFollowUpEntity>().eq("userid", userid).eq("oid",id1).last("LIMIT 1"));
|
||||
|
||||
// if (followUpEntity != null) {
|
||||
// return R.error("您已评价过");
|
||||
// }
|
||||
|
||||
buyOrderEntity.setRecordId(2);
|
||||
buyOrderService.saveOrUpdate(buyOrderEntity);
|
||||
if (userFollowUpEntity.getImages()!=null) {
|
||||
|
||||
List<Map<String,String>> imageList = (ArrayList<Map<String,String>>)userFollowUpEntity.getImages();
|
||||
String imageStr = "";
|
||||
for(Map m : imageList){
|
||||
imageStr += m.get("url") + ",";
|
||||
}
|
||||
|
||||
userFollowUpEntity.setImages(imageStr);
|
||||
|
||||
}
|
||||
|
||||
userFollowUpEntity.setOid(id1);
|
||||
userFollowUpEntity.setDelflag(0);
|
||||
userFollowUpEntity.setCreateDate(new Date());
|
||||
userFollowUpService.saveOrUpdate(userFollowUpEntity);
|
||||
return R.ok("成功").put("userFollowUpEntity",userFollowUpEntity);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Integer id){
|
||||
UserFollowUpEntity user = userFollowUpService.getById(id);
|
||||
|
||||
return R.ok().put("UserFollowUpEntity", user);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody UserRecordEntity user){
|
||||
userRecordService.updateById(user);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Integer[] ids){
|
||||
userRecordService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
package com.peanut.modules.book.controller;
|
||||
import cn.com.marsoft.tool.ToolObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.google.gson.Gson;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.book.entity.*;
|
||||
import com.peanut.modules.book.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.peanut.common.utils.R.error;
|
||||
@RestController
|
||||
@RequestMapping("buy/record")
|
||||
public class UserRecordController {
|
||||
@Autowired
|
||||
private UserRecordService userRecordService;
|
||||
@Autowired
|
||||
private BuyOrderService buyOrderService;
|
||||
@Autowired
|
||||
private MyUserService myUserService;
|
||||
@Autowired
|
||||
private BuyOrderDetailService buyOrderDetailService;
|
||||
@Autowired
|
||||
private UserFollowUpService userFollowUpService;
|
||||
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params ){
|
||||
PageUtils page = userRecordService.queryPage(params);
|
||||
return R.ok().put("page", page);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看我的评价
|
||||
*/
|
||||
@RequestMapping("/Allevaluations")
|
||||
public R Allevaluations(@RequestBody UserRecordEntity userRecordEntity){
|
||||
List<UserRecordEntity> userid = userRecordService.getBaseMapper().selectList(new QueryWrapper<UserRecordEntity>().eq("userid", userRecordEntity.getUserid()).orderByDesc("create_date"));
|
||||
return R.ok().put("Allevaluations",userid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看全部评价
|
||||
*/
|
||||
@RequestMapping("/All")
|
||||
public R All(@RequestBody UserRecordEntity userRecordEntity) {
|
||||
|
||||
List list = new ArrayList<>();
|
||||
List<UserRecordEntity> bookid = userRecordService.getBaseMapper().selectList(new QueryWrapper<UserRecordEntity>().eq("bookid", userRecordEntity.getBookid()).orderByDesc("create_date"));
|
||||
for (UserRecordEntity userRecord : bookid) {
|
||||
HashMap<Object, Object> map = new HashMap<>();
|
||||
Integer bookid1 = userRecord.getBookid();
|
||||
Integer userid1 = userRecord.getUserid();
|
||||
Integer id1 = userRecord.getId();
|
||||
List<MyUserEntity> id = myUserService.getBaseMapper().selectList(new QueryWrapper<MyUserEntity>().eq("id", userid1));
|
||||
String usser = "";
|
||||
String name = "";
|
||||
for (MyUserEntity user : id) {
|
||||
usser = user.getAvatar();
|
||||
name = user.getNickname();
|
||||
}
|
||||
|
||||
List<UserFollowUpEntity> followUpEntity = userFollowUpService.getBaseMapper().selectList(new QueryWrapper<UserFollowUpEntity>()
|
||||
.eq("oid", id1)
|
||||
.eq("userId", userid1)
|
||||
.orderByDesc("create_date"));
|
||||
String conTent = "";
|
||||
Date date = null;
|
||||
for (UserFollowUpEntity followUp : followUpEntity) {
|
||||
conTent = followUp.getConTent();
|
||||
date = followUp.getCreateDate();
|
||||
|
||||
}
|
||||
|
||||
map.put("followUpdate", date);
|
||||
map.put("followUpcontent", conTent);
|
||||
map.put("avatar", usser);
|
||||
map.put("name", name);
|
||||
map.put("bookid", bookid1);
|
||||
map.put("orderSn", userRecord.getOrderSn());
|
||||
map.put("userid", userid1);
|
||||
map.put("content", userRecord.getContent());
|
||||
map.put("images", userRecord.getImages());
|
||||
map.put("starlevel", userRecord.getStarLevel());
|
||||
map.put("createdate", userRecord.getCreateDate());
|
||||
list.add(map);
|
||||
|
||||
|
||||
|
||||
}
|
||||
return R.ok().put("list", list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Integer id){
|
||||
UserRecordEntity userRecordEntity = userRecordService.getById(id);
|
||||
return R.ok().put("bookChapterContent", userRecordEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody UserRecordEntity userRecordEntity){
|
||||
userRecordService.save(userRecordEntity);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody UserRecordEntity userRecordEntity){
|
||||
userRecordService.updateById(userRecordEntity);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Integer[] ids){
|
||||
userRecordService.removeByIds(Arrays.asList(ids));
|
||||
userRecordService.getBaseMapper().deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* test
|
||||
* */
|
||||
@RequestMapping("/commodityComment")
|
||||
public R commodityComment(String userid, String orderSn, String starLevel, String comment){
|
||||
userRecordService.commodityComment(userid, orderSn, starLevel, comment);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* 生成评论
|
||||
* */
|
||||
@RequestMapping("/comment")
|
||||
public Object commodityComments( Integer userid, String orderSn, Integer bookid, String comment) {
|
||||
|
||||
|
||||
BuyOrderEntity buyOrderEntity =buyOrderService.getBaseMapper().selectOne(new QueryWrapper<BuyOrderEntity>()
|
||||
.eq("order_sn",orderSn).last("LIMIT 1").eq("order_status","3")
|
||||
//状态3为已收货
|
||||
// .eq("order_status","3")
|
||||
);
|
||||
UserRecordEntity userRecordEntity = new UserRecordEntity();
|
||||
|
||||
|
||||
if (!ToolObject.isNullOrEmpty(buyOrderEntity))
|
||||
{
|
||||
return error("您已评价过了,请勿重复评论");
|
||||
//
|
||||
}else {
|
||||
userRecordEntity.setId(buyOrderEntity.getOrderId());
|
||||
userRecordEntity.setContent(comment);
|
||||
//商品评价
|
||||
userRecordEntity.setBookid(bookid);
|
||||
userRecordEntity.setUserid(userid);
|
||||
userRecordEntity.setOrderSn(orderSn);
|
||||
userRecordEntity.setOrderCode(userRecordEntity.getOrderCode());
|
||||
userRecordEntity.setDelflag(0);
|
||||
userRecordService.saveOrUpdate(userRecordEntity);
|
||||
return R.ok("成功").put("userRecordEntity",userRecordEntity);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param recordEntity
|
||||
* @return 生成评论(上传图片,星级评价
|
||||
*
|
||||
*/
|
||||
@RequestMapping("/UserRecordcomment")
|
||||
public R commodity(@RequestBody UserRecordEntity recordEntity ) {
|
||||
//todo 已收货限制字段,只可评价一次
|
||||
BuyOrderEntity buyOrderEntity =buyOrderService.getBaseMapper().selectOne(new QueryWrapper<BuyOrderEntity>()
|
||||
.eq("order_sn",recordEntity.getOrderSn())
|
||||
);
|
||||
|
||||
Integer orderId = buyOrderEntity.getOrderId();
|
||||
BuyOrderDetailEntity detailEntity = buyOrderDetailService.getBaseMapper().selectOne(new QueryWrapper<BuyOrderDetailEntity>().eq("Order_id", orderId).eq("product_id",recordEntity.getBookid()));
|
||||
Integer orderId1 = detailEntity.getOrderId();
|
||||
UserRecordEntity userRecordEntity = userRecordService.getBaseMapper().selectOne(new QueryWrapper<UserRecordEntity>().eq("orderSn", recordEntity.getOrderSn()).eq("userid", recordEntity.getUserid()).eq("orderdid",orderId1).last("LIMIT 1"));
|
||||
|
||||
if (userRecordEntity != null) {
|
||||
return R.error("您已评价过");
|
||||
}
|
||||
if (recordEntity.getImages()!=null) {
|
||||
List<Map<String, String>> imageList = (ArrayList<Map<String, String>>) recordEntity.getImages();
|
||||
String imageStr = "";
|
||||
for (Map m : imageList) {
|
||||
imageStr += m.get("url") + ",";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
recordEntity.setImages(imageStr);
|
||||
}
|
||||
recordEntity.setDelflag(0);
|
||||
recordEntity.setOrderdid(orderId1);
|
||||
userRecordService.saveOrUpdate(recordEntity);
|
||||
|
||||
|
||||
detailEntity.setRecordId(1);
|
||||
buyOrderDetailService.saveOrUpdate(detailEntity);
|
||||
|
||||
|
||||
|
||||
return R.ok("成功").put("userRecordEntity",recordEntity);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.peanut.modules.book.dao;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.book.entity.BookClockinCommentEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface BookClockinCommentDao extends BaseMapper<BookClockinCommentEntity> {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.peanut.modules.book.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.book.entity.BookClockinEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface BookClockinDao extends BaseMapper<BookClockinEntity> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.peanut.modules.book.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.book.entity.BookClockinPunchEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface BookClockinPunchDao extends BaseMapper<BookClockinPunchEntity> {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.peanut.modules.book.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.book.entity.BookForumArticlesEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface BookForumArticlesDao extends BaseMapper<BookForumArticlesEntity> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.peanut.modules.book.dao;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.book.entity.BookForumCommentEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface BookForumCommentDao extends BaseMapper<BookForumCommentEntity> {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.peanut.modules.book.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.book.entity.BookListeningEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface BookListeningDao extends BaseMapper<BookListeningEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.book.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.book.entity.BookListeningShelfEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface BookListeningShelfDao extends BaseMapper<BookListeningShelfEntity> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.book.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.book.entity.BookTaskEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface BookTaskDao extends BaseMapper<BookTaskEntity> {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.peanut.modules.book.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.pay.IOSPay.model.entities.IosPayOrderEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
/*
|
||||
* 内购订单表
|
||||
* */
|
||||
@Mapper
|
||||
public interface PayIOSOrderDao extends BaseMapper<IosPayOrderEntity> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.book.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.book.entity.UserFeedbackEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface UserFeedbackDao extends BaseMapper<UserFeedbackEntity> {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.peanut.modules.book.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.book.entity.UserFollowUpEntity;
|
||||
import com.peanut.modules.book.entity.UserRecordEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface UserFollowUpDao extends BaseMapper<UserFollowUpEntity> {
|
||||
}
|
||||
13
src/main/java/com/peanut/modules/book/dao/UserRecordDao.java
Normal file
13
src/main/java/com/peanut/modules/book/dao/UserRecordDao.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package com.peanut.modules.book.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.book.entity.UserEbookBuyEntity;
|
||||
import com.peanut.modules.book.entity.UserRecordEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
//书籍评价表
|
||||
@Mapper
|
||||
public interface UserRecordDao extends BaseMapper<UserRecordEntity> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.peanut.modules.book.entity;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("book_clockin_comment")
|
||||
public class BookClockinCommentEntity implements Serializable {
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 签到表关联id
|
||||
*/
|
||||
@TableField("task_id")
|
||||
private Integer taskId;
|
||||
/**
|
||||
* 图书id
|
||||
*/
|
||||
@TableField("book_id")
|
||||
private Integer bookId;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private Integer userId;
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@TableField("del_flag")
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
@TableField("images")
|
||||
private String images;
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
/**
|
||||
* 点赞总数
|
||||
*/
|
||||
@TableField("like_sum")
|
||||
private String likeSum;
|
||||
/**
|
||||
*创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
/**
|
||||
*修改时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 关联评论
|
||||
*/
|
||||
@TableField("pid")
|
||||
private Integer pid;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.peanut.modules.book.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* 打卡表
|
||||
* @author
|
||||
* @email
|
||||
* @date
|
||||
*/
|
||||
@Data
|
||||
@TableName("book_clockin")
|
||||
public class BookClockinEntity implements Serializable {
|
||||
|
||||
/**
|
||||
* id book_id user_id content clockin_sum
|
||||
* clockin_days create_time update_time del_flag
|
||||
* images voices like like_sum comment_sum
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("book_id")
|
||||
private Integer bookId;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private Integer userId;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("clockin_sum")
|
||||
private String clockinSum;
|
||||
|
||||
|
||||
/**
|
||||
* 集合
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Object imageeStrings;
|
||||
/**
|
||||
*创建注解
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("images")
|
||||
private Object images;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("voices")
|
||||
private String voices;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("like_s")
|
||||
private String likes;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(" like_sum")
|
||||
private String likeSum;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(" comment_sum")
|
||||
private String commentSum;
|
||||
|
||||
//taskId 与 dayId 反转存储
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 打卡对应天id
|
||||
*/
|
||||
@TableField("day_id")
|
||||
private Integer dayId;
|
||||
/**
|
||||
* 列表id
|
||||
*
|
||||
*/
|
||||
@TableField("task_id")
|
||||
private Integer taskId;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.peanut.modules.book.entity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 签到
|
||||
*/
|
||||
@Data
|
||||
@TableName("book_clockin_punch")
|
||||
public class BookClockinPunchEntity implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("book_id")
|
||||
private Integer bookId;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private Integer userId;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("days")
|
||||
private Integer days;
|
||||
/**
|
||||
*创建注解
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("t_id")
|
||||
private Integer tId;
|
||||
|
||||
|
||||
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.peanut.modules.book.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 文章表主表
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@TableName("book_forum_articles")
|
||||
public class BookForumArticlesEntity {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
*标题
|
||||
*/
|
||||
@TableField("title")
|
||||
private String title;
|
||||
/**
|
||||
*用户id
|
||||
*/
|
||||
@TableField("userid")
|
||||
private Integer userid;
|
||||
/**
|
||||
*内容
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
/**
|
||||
*图片
|
||||
*/
|
||||
@TableField("image")
|
||||
private String image;
|
||||
/**
|
||||
*多图
|
||||
*/
|
||||
@TableField("imagelist")
|
||||
private String imagelist;
|
||||
/**
|
||||
*图书id
|
||||
*/
|
||||
@TableField("bookid")
|
||||
private Integer bookid;
|
||||
/**
|
||||
*开始时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)//更新注解;
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 点赞数
|
||||
*/
|
||||
@TableField("contlike")
|
||||
private Date contlike;
|
||||
|
||||
@TableField("del_flag")
|
||||
@TableLogic
|
||||
private Integer delflag;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.peanut.modules.book.entity;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 评价文章表
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@TableName("book_forum_comment")
|
||||
public class BookForumCommentEntity {
|
||||
|
||||
/**
|
||||
* id bfa_id userid content images create_time update_time
|
||||
*/
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
*文章父id
|
||||
*/
|
||||
@TableField("bfa_id")
|
||||
private String bfaid;
|
||||
/**
|
||||
*用户评论id
|
||||
*/
|
||||
@TableField("userid")
|
||||
private String userid;
|
||||
/**
|
||||
*内容
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
/**
|
||||
*图片
|
||||
*/
|
||||
@TableField("image")
|
||||
private String image;
|
||||
/**
|
||||
*开始时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
/**
|
||||
*修改时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@TableField("del_flag")
|
||||
@TableLogic
|
||||
private Integer delflag;
|
||||
@TableField("book_id")
|
||||
private Integer bookid;
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.peanut.modules.book.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 听书进度表
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@TableName("book_listening")
|
||||
public class BookListeningEntity implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private Integer userId;
|
||||
/**
|
||||
* 图书id
|
||||
*/
|
||||
@TableField("book_id")
|
||||
private Integer bookId;
|
||||
/**
|
||||
* 章节id
|
||||
*/
|
||||
@TableField("chapter_id")
|
||||
private Integer chapterId;
|
||||
/**
|
||||
* 章节名称
|
||||
*/
|
||||
@TableField("chapter_name")
|
||||
private String chapterName;
|
||||
/**
|
||||
* 章节百分比
|
||||
*/
|
||||
@TableField("precent")
|
||||
private Integer precent;
|
||||
/**
|
||||
* 章节内容id
|
||||
*/
|
||||
@TableField("content_id")
|
||||
private Integer contentId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.peanut.modules.book.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("book_listening_shelf")
|
||||
public class BookListeningShelfEntity {
|
||||
|
||||
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 图书
|
||||
*/
|
||||
@TableField("book_id")
|
||||
private Integer bookid;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private Integer userid;
|
||||
/**
|
||||
* 图书名称
|
||||
*/
|
||||
@TableField("book_name")
|
||||
private Integer bookname;
|
||||
/**
|
||||
* 删除标记
|
||||
*/
|
||||
@TableField("del_flag")
|
||||
private Integer delflag;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.peanut.modules.book.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 签到列表内容
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@TableName("book_task")
|
||||
public class BookTaskEntity implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("book_id")
|
||||
private Integer bookid;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("images")
|
||||
private String images;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("voices")
|
||||
private String voices;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("like_sun")
|
||||
private String likesun;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("days")
|
||||
private String days;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
/**
|
||||
* 删除标记
|
||||
*/
|
||||
@TableField("del_flag")
|
||||
private Integer delFlag;
|
||||
|
||||
@TableField("video")
|
||||
private String video;
|
||||
|
||||
@TableField("heading")
|
||||
private String heading;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.peanut.modules.book.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class UserAppAuthorEntity {
|
||||
//新旧app 用来备份 自定义数据
|
||||
@NotNull(message = "类型不能为空")
|
||||
@NotEmpty(message = "类型不能为空")
|
||||
private String type;
|
||||
|
||||
//重点需要 app调起微信获取到的code
|
||||
@NotEmpty(message = "code不能为空")
|
||||
@NotNull(message = "code不能为空")
|
||||
private String code;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.peanut.modules.book.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 追评追评(不限制)
|
||||
*/
|
||||
@Data
|
||||
@TableName("user_feedback")
|
||||
public class UserFeedbackEntity {
|
||||
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@TableField("userId")
|
||||
private Integer userId;
|
||||
/**
|
||||
* 关联追加id
|
||||
*/
|
||||
@TableField("fu_id")
|
||||
private Integer fuid;
|
||||
/**
|
||||
* 关联评价id
|
||||
*/
|
||||
@TableField("r_id")
|
||||
private String rid;
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@TableField("delFlag")
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
@TableField("ordersn")
|
||||
private Integer ordersn;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date create_date;
|
||||
|
||||
/**
|
||||
* 图书id
|
||||
*/
|
||||
@TableField("bookid")
|
||||
private Integer bookid;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.peanut.modules.book.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 追评表
|
||||
*/
|
||||
@Data
|
||||
@TableName("user_follow_up")
|
||||
public class UserFollowUpEntity {
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableField("userId")
|
||||
private Integer userId;
|
||||
/**
|
||||
* 关联父评价id
|
||||
*/
|
||||
@TableField("oid")
|
||||
private Integer oid;
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@TableField("conTent")
|
||||
private String conTent;
|
||||
/**
|
||||
* 点赞
|
||||
*/
|
||||
@TableField("praIse")
|
||||
private String praIse;
|
||||
/**
|
||||
* 图片url
|
||||
*/
|
||||
@TableField("images")
|
||||
private Object images;
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delflag;
|
||||
/**
|
||||
* 图书id
|
||||
*/
|
||||
@TableField("bookid")
|
||||
private Integer bookid;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date createDate;
|
||||
|
||||
/**
|
||||
* 星级
|
||||
*/
|
||||
@TableField("starLevel")
|
||||
private Integer starLevel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 星级
|
||||
*/
|
||||
@TableField("emojis")
|
||||
private String emojis;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.peanut.modules.book.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.peanut.modules.book.to.UserRecordDto;
|
||||
import lombok.Data;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@TableName("user_record")
|
||||
public class UserRecordEntity {
|
||||
|
||||
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
// 创建日期
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date createDate = new Date();
|
||||
|
||||
// 类型(商品评价01,听书评价02,观看电子书评价03)
|
||||
@TableField("type")
|
||||
private String type ;
|
||||
|
||||
// 内容
|
||||
@TableField("content")
|
||||
private Object content ;
|
||||
//快递单号
|
||||
@TableField("orderCode")
|
||||
private String orderCode;
|
||||
//订单号
|
||||
@TableField("orderSn")
|
||||
private String orderSn;
|
||||
// 关联客户
|
||||
@TableField("userid")
|
||||
private Integer userid ;
|
||||
//逻辑删除:未删除0 -1删除
|
||||
@TableField("delFlag")
|
||||
@TableLogic
|
||||
private Integer delflag;
|
||||
//关联图书id
|
||||
@TableField("bookid")
|
||||
private Integer bookid ;
|
||||
//图片url
|
||||
// @TableField("images")
|
||||
// private String[] images;
|
||||
@TableField("images")
|
||||
private Object images;
|
||||
|
||||
//星级 1=一星,5=五星
|
||||
@TableField("starLevel")
|
||||
private String starLevel;
|
||||
|
||||
/**
|
||||
* 表情存储
|
||||
*/
|
||||
@TableField("emoji")
|
||||
private Object emoji;
|
||||
|
||||
@TableField("name")
|
||||
private Object name;
|
||||
@TableField("tag")
|
||||
private Object tag;
|
||||
|
||||
@TableField("orderdid")
|
||||
private Integer orderdid;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.peanut.modules.book.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.modules.book.entity.BookClockinCommentEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface BookClockinCommentService extends IService<BookClockinCommentEntity> {
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.peanut.modules.book.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.modules.book.entity.BookClockinEntity;
|
||||
import com.peanut.modules.book.entity.BookClockinPunchEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface BookClockinPunchService extends IService<BookClockinPunchEntity> {
|
||||
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.peanut.modules.book.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.modules.book.entity.BookClockinEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface BookClockinService extends IService<BookClockinEntity> {
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
|
||||
|
||||
PageUtils queryPagemylist(Map<String, Object> params);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.peanut.modules.book.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.modules.book.entity.BookForumArticlesEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface BookForumArticlesService extends IService<BookForumArticlesEntity> {
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
PageUtils queryPages(Map<String, Object> params);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.peanut.modules.book.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.modules.book.entity.BookForumCommentEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface BookForumCommenService extends IService<BookForumCommentEntity> {
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.peanut.modules.book.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.modules.book.entity.BookListeningEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface BookListeningService extends IService<BookListeningEntity> {
|
||||
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.peanut.modules.book.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.modules.book.entity.BookListeningShelfEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface BookListeningShelfService extends IService<BookListeningShelfEntity> {
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.peanut.modules.book.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.modules.book.entity.BookTaskEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface BookTaskService extends IService<BookTaskEntity> {
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
PageUtils queryPageServi(Map<String, Object> params);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.peanut.modules.book.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.modules.book.entity.UserFeedbackEntity;
|
||||
|
||||
public interface UserFeedbackSerivce extends IService<UserFeedbackEntity> {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.peanut.modules.book.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.modules.book.entity.UserFollowUpEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface UserFollowUpService extends IService<UserFollowUpEntity> {
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.peanut.modules.book.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.modules.book.entity.BuyOrderEntity;
|
||||
import com.peanut.modules.book.entity.UserRecordEntity;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface UserRecordService extends IService<UserRecordEntity> {
|
||||
|
||||
|
||||
//todo 传参参数 用户id 购买订单id 星级评价 内容
|
||||
public Object commodityComment(String userid, String orderSn, String starLevel, String comment);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
String uploadFile(MultipartFile file);
|
||||
List<String> uploadFiles(List<MultipartFile> files);
|
||||
|
||||
;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.peanut.modules.book.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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.book.dao.BookClockinCommentDao;
|
||||
import com.peanut.modules.book.entity.BookClockinCommentEntity;
|
||||
import com.peanut.modules.book.entity.BookClockinEntity;
|
||||
import com.peanut.modules.book.service.BookClockinCommentService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class BookClockinCommentServiceImpl extends ServiceImpl<BookClockinCommentDao,BookClockinCommentEntity> implements BookClockinCommentService{
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<BookClockinCommentEntity> page = this.page(
|
||||
new Query<BookClockinCommentEntity>().getPage(params),
|
||||
new QueryWrapper<BookClockinCommentEntity>().orderByDesc("create_time")
|
||||
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.peanut.modules.book.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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.book.dao.BookClockinPunchDao;
|
||||
import com.peanut.modules.book.entity.BookClockinPunchEntity;
|
||||
import com.peanut.modules.book.service.BookClockinPunchService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class BookClockinPunchServiceImp extends ServiceImpl<BookClockinPunchDao, BookClockinPunchEntity> implements BookClockinPunchService {
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
|
||||
Object book =params.get("bookid");
|
||||
Object days = params.get("days");
|
||||
IPage<BookClockinPunchEntity> page = this.page(
|
||||
new Query<BookClockinPunchEntity>().getPage(params),
|
||||
new QueryWrapper<BookClockinPunchEntity>()
|
||||
.eq("book_id",book)
|
||||
.eq("days",days)
|
||||
.orderByDesc("create_time")
|
||||
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.peanut.modules.book.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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.book.dao.BookClockinDao;
|
||||
import com.peanut.modules.book.entity.BookClockinEntity;
|
||||
import com.peanut.modules.book.service.BookClockinService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class BookClockinServiceImpl extends ServiceImpl<BookClockinDao, BookClockinEntity> implements BookClockinService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Object book =params.get("bookid");
|
||||
Object taskid = params.get("taskid");
|
||||
IPage<BookClockinEntity> page = this.page(
|
||||
new Query<BookClockinEntity>().getPage(params),
|
||||
new QueryWrapper<BookClockinEntity>()
|
||||
.eq("book_id",book)
|
||||
.eq("task_id",taskid)
|
||||
.orderByDesc("create_time")
|
||||
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPagemylist(Map<String, Object> params) {
|
||||
IPage<BookClockinEntity> page = this.page(
|
||||
new Query<BookClockinEntity>().getPage(params),
|
||||
new QueryWrapper<BookClockinEntity>()
|
||||
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.peanut.modules.book.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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.book.dao.BookForumArticlesDao;
|
||||
import com.peanut.modules.book.entity.BookForumArticlesEntity;
|
||||
import com.peanut.modules.book.service.BookForumArticlesService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class BookForumArticlesServiceImpl extends ServiceImpl<BookForumArticlesDao, BookForumArticlesEntity> implements BookForumArticlesService {
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
String bookid = (String) params.get("bookid");
|
||||
IPage<BookForumArticlesEntity> page = this.page(
|
||||
new Query<BookForumArticlesEntity>().getPage(params),
|
||||
new QueryWrapper<BookForumArticlesEntity>().eq("bookid",bookid).orderByDesc("create_time")
|
||||
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPages(Map<String, Object> params) {
|
||||
String bookid = (String) params.get("bookid");
|
||||
IPage<BookForumArticlesEntity> page = this.page(
|
||||
new Query<BookForumArticlesEntity>().getPage(params),
|
||||
new QueryWrapper<BookForumArticlesEntity>().eq("bookid",bookid)
|
||||
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.peanut.modules.book.service.impl;
|
||||
|
||||
import cn.com.marsoft.base.impl.BaseServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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.book.dao.BookForumCommentDao;
|
||||
import com.peanut.modules.book.entity.BookForumArticlesEntity;
|
||||
import com.peanut.modules.book.entity.BookForumCommentEntity;
|
||||
import com.peanut.modules.book.service.BookForumCommenService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class BookForumCommenServiceImpl extends ServiceImpl<BookForumCommentDao, BookForumCommentEntity> implements BookForumCommenService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
String b = (String) params.get("bfa_id");
|
||||
IPage<BookForumCommentEntity> page = this.page(
|
||||
new Query<BookForumCommentEntity>().getPage(params),
|
||||
new QueryWrapper<BookForumCommentEntity>().eq("bfa_id",b).orderByDesc("create_time")
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.peanut.modules.book.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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.book.dao.BookListeningDao;
|
||||
import com.peanut.modules.book.entity.BookListeningEntity;
|
||||
import com.peanut.modules.book.service.BookListeningService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Service("bookListeningService")
|
||||
public class BookListeningServiceImpl extends ServiceImpl<BookListeningDao,BookListeningEntity> implements BookListeningService{
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<BookListeningEntity> page = this.page(
|
||||
new Query<BookListeningEntity>().getPage(params),
|
||||
new QueryWrapper<BookListeningEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.peanut.modules.book.service.impl;
|
||||
|
||||
import cn.com.marsoft.base.impl.BaseServiceImpl;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.modules.book.dao.BookListeningShelfDao;
|
||||
import com.peanut.modules.book.entity.BookListeningShelfEntity;
|
||||
import com.peanut.modules.book.service.BookListeningShelfService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class BookListeningShelfServiceImpl extends ServiceImpl<BookListeningShelfDao, BookListeningShelfEntity> implements BookListeningShelfService {
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.peanut.modules.book.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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.book.dao.BookTaskDao;
|
||||
import com.peanut.modules.book.entity.BookTaskEntity;
|
||||
import com.peanut.modules.book.service.BookTaskService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class BookTaskServiceImpl extends ServiceImpl<BookTaskDao, BookTaskEntity> implements BookTaskService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Object bookid = params.get("bookid");
|
||||
IPage<BookTaskEntity> page = this.page(
|
||||
new Query<BookTaskEntity>().getPage(params),
|
||||
new QueryWrapper<BookTaskEntity>().eq("book_id",bookid).orderByDesc("days")
|
||||
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPageServi(Map<String, Object> params) {
|
||||
Object bookid = params.get("bookid");
|
||||
Object days = params.get("days");
|
||||
IPage<BookTaskEntity> page = this.page(
|
||||
new Query<BookTaskEntity>().getPage(params),
|
||||
new QueryWrapper<BookTaskEntity>().eq("book_id",bookid).orderByDesc("create_time").eq("days",days)
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.peanut.modules.book.service.impl;
|
||||
|
||||
import cn.com.marsoft.base.impl.BaseServiceImpl;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.peanut.modules.book.dao.UserFeedbackDao;
|
||||
import com.peanut.modules.book.entity.UserFeedbackEntity;
|
||||
import com.peanut.modules.book.service.UserFeedbackSerivce;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class UserFeedbackServiceImpl extends ServiceImpl<UserFeedbackDao, UserFeedbackEntity> implements UserFeedbackSerivce {
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.peanut.modules.book.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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.book.dao.UserFollowUpDao;
|
||||
import com.peanut.modules.book.entity.UserFollowUpEntity;
|
||||
import com.peanut.modules.book.entity.UserRecordEntity;
|
||||
import com.peanut.modules.book.service.UserFollowUpService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class UserFollowUpServiceImpl extends ServiceImpl<UserFollowUpDao,UserFollowUpEntity> implements UserFollowUpService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
String bookid = (String) params.get("bookid");
|
||||
IPage<UserFollowUpEntity> page =page(
|
||||
new Query<UserFollowUpEntity>().getPage(params),
|
||||
new QueryWrapper<UserFollowUpEntity>()
|
||||
//订单号,开始时间
|
||||
.eq("userid",bookid).orderByDesc("create_date")
|
||||
// .eq("")
|
||||
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.peanut.modules.book.service.impl;
|
||||
import com.aliyun.oss.OSS;
|
||||
import com.aliyun.oss.OSSClientBuilder;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.peanut.common.utils.*;
|
||||
import com.peanut.modules.book.dao.UserRecordDao;
|
||||
import com.peanut.modules.book.entity.UserRecordEntity;
|
||||
import com.peanut.modules.book.service.UserRecordService;
|
||||
import org.joda.time.DateTime;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@Service("UserRecordServiceImpl")
|
||||
public class UserRecordServiceImpl extends ServiceImpl<UserRecordDao, UserRecordEntity> implements UserRecordService {
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Object commodityComment(String userid, String orderSn, String starLevel, String comment) {
|
||||
|
||||
|
||||
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
String orderSn = (String) params.get("orderSn");
|
||||
IPage<UserRecordEntity> page =page(
|
||||
new Query<UserRecordEntity>().getPage(params),
|
||||
new QueryWrapper<UserRecordEntity>()
|
||||
//订单号,开始时间
|
||||
.eq("orderSn",orderSn).orderByDesc("create_time")
|
||||
// .eq("")
|
||||
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String uploadFile(MultipartFile file) {
|
||||
|
||||
String endpoint = ConstantPropertiesUtils.END_POIND;
|
||||
String accessKeyId = ConstantPropertiesUtils.ACCESS_KEY_ID;
|
||||
String accessKeySecret = ConstantPropertiesUtils.ACCESS_KEY_SECRET;
|
||||
String bucketName = ConstantPropertiesUtils.BUCKET_NAME;
|
||||
|
||||
try {
|
||||
OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
|
||||
|
||||
InputStream inputStream = file.getInputStream();
|
||||
String fileName = file.getOriginalFilename();
|
||||
String uuid = UUID.randomUUID().toString().replaceAll("-", "");
|
||||
fileName = uuid + fileName;
|
||||
String datePath = new DateTime().toString("yyyy/MM/dd");
|
||||
fileName = datePath + "/" + fileName;
|
||||
ossClient.putObject(bucketName, fileName, inputStream);
|
||||
ossClient.shutdown();
|
||||
String url = "https://" + bucketName + "." + endpoint + "/" + fileName;
|
||||
return url;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<String> uploadFiles(List<MultipartFile> files) {
|
||||
String endpoint = ConstantPropertiesUtils.END_POIND;
|
||||
String accessKeyId = ConstantPropertiesUtils.ACCESS_KEY_ID;
|
||||
String accessKeySecret = ConstantPropertiesUtils.ACCESS_KEY_SECRET;
|
||||
String bucketName = ConstantPropertiesUtils.BUCKET_NAME;
|
||||
try {
|
||||
//创建oss实例
|
||||
OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
|
||||
List<String> urls = new ArrayList<>();
|
||||
for (MultipartFile file : files) {
|
||||
InputStream inputStream = file.getInputStream();
|
||||
String fileName = file.getOriginalFilename();
|
||||
String uuid = UUID.randomUUID().toString().replaceAll("-", "");
|
||||
fileName = uuid + fileName;
|
||||
String datePath = new DateTime().toString("yyyy/MM/dd");
|
||||
fileName = datePath + "/" + fileName;
|
||||
ossClient.putObject(bucketName, fileName, inputStream);
|
||||
urls.add("https://" + bucketName + "." + endpoint + "/" + fileName);
|
||||
}
|
||||
//关闭资源否则会导致OLD区逐渐的变大,直到内存泄漏
|
||||
ossClient.shutdown();
|
||||
return urls;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
23
src/main/java/com/peanut/modules/book/to/UserRecordDto.java
Normal file
23
src/main/java/com/peanut/modules/book/to/UserRecordDto.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package com.peanut.modules.book.to;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class UserRecordDto implements Serializable {
|
||||
|
||||
|
||||
|
||||
private String[] images;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
62
src/main/java/com/peanut/modules/book/vo/BookOrderVo.java
Normal file
62
src/main/java/com/peanut/modules/book/vo/BookOrderVo.java
Normal file
@@ -0,0 +1,62 @@
|
||||
package com.peanut.modules.book.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class BookOrderVo implements Serializable {
|
||||
|
||||
private String orderStatus;
|
||||
private String fmsHtml;
|
||||
private Date creatTime;
|
||||
private String shipperCode;
|
||||
private String shipperName;
|
||||
private String isPrint;
|
||||
|
||||
public String getOrderStatus() {
|
||||
return orderStatus;
|
||||
}
|
||||
|
||||
public void setOrderStatus(String orderStatus) {
|
||||
this.orderStatus = orderStatus;
|
||||
}
|
||||
|
||||
public String getFmsHtml() {
|
||||
return fmsHtml;
|
||||
}
|
||||
|
||||
public void setFmsHtml(String fmsHtml) {
|
||||
this.fmsHtml = fmsHtml;
|
||||
}
|
||||
|
||||
public Date getCreatTime() {
|
||||
return creatTime;
|
||||
}
|
||||
|
||||
public void setCreatTime(Date creatTime) {
|
||||
this.creatTime = creatTime;
|
||||
}
|
||||
|
||||
public String getShipperCode() {
|
||||
return shipperCode;
|
||||
}
|
||||
|
||||
public void setShipperCode(String shipperCode) {
|
||||
this.shipperCode = shipperCode;
|
||||
}
|
||||
|
||||
public String getShipperName() {
|
||||
return shipperName;
|
||||
}
|
||||
|
||||
public void setShipperName(String shipperName) {
|
||||
this.shipperName = shipperName;
|
||||
}
|
||||
|
||||
public String getIsPrint() {
|
||||
return isPrint;
|
||||
}
|
||||
|
||||
public void setIsPrint(String isPrint) {
|
||||
this.isPrint = isPrint;
|
||||
}
|
||||
}
|
||||
22
src/main/resources/mapper/book/BookClockinCommentDao.xml
Normal file
22
src/main/resources/mapper/book/BookClockinCommentDao.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.peanut.modules.book.dao.BookClockinCommentDao">
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.BookClockinCommentEntity" id="ClockinCommentrMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="taskId" column="task_id"/>
|
||||
<result property="images" column="images"/>
|
||||
<result property="bookId" column="book_id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="likeSum" column="like_sum"/>
|
||||
<result property="pid" column="pid"/>
|
||||
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
31
src/main/resources/mapper/book/BookClockinDao.xml
Normal file
31
src/main/resources/mapper/book/BookClockinDao.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.peanut.modules.book.dao.BookClockinDao">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.BookClockinEntity" id="bookClockinMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="bookId" column="book_id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="clockinSum" column="clockin_sum"/>
|
||||
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="images" column="images"/>
|
||||
<result property="voices" column="voices"/>
|
||||
<result property="likes" column="like_s"/>
|
||||
<result property="likeSum" column="like_sum"/>
|
||||
<result property="commentSum" column="comment_sum"/>
|
||||
<result property="taskId" column="task_id"/>
|
||||
<result property="dayId" column="day_id"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
24
src/main/resources/mapper/book/BookClockinPunchDao.xml
Normal file
24
src/main/resources/mapper/book/BookClockinPunchDao.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.peanut.modules.book.dao.BookClockinPunchDao">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.BookClockinPunchEntity" id="clockinPunchMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="bookId" column="book_id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="days" column="days"/>
|
||||
<result property="tId" column="t_id"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
22
src/main/resources/mapper/book/BookForumArticlesDao.xml
Normal file
22
src/main/resources/mapper/book/BookForumArticlesDao.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.peanut.modules.book.dao.BookForumArticlesDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.BookForumArticlesEntity" id="forumarticlesMap">
|
||||
<result property="id" column="id" />
|
||||
<result property="title" column="title" />
|
||||
<result property="userid" column="userid" />
|
||||
<result property="content" column="content" />
|
||||
<result property="image" column="image" />
|
||||
<result property="imagelist" column="imagelist" />
|
||||
<result property="bookid" column="bookid" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="contlike" column="contlike" />
|
||||
<result property="delflag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
23
src/main/resources/mapper/book/BookForumCommentDao.xml
Normal file
23
src/main/resources/mapper/book/BookForumCommentDao.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.peanut.modules.book.dao.BookForumCommentDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.BookForumCommentEntity" id="ForumCommentMap">
|
||||
|
||||
|
||||
|
||||
<result property="id" column="id" />
|
||||
<result property="bfaid" column="bfa_id" />
|
||||
<result property="userid" column="userid" />
|
||||
<result property="content" column="content" />
|
||||
<result property="image" column="image" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="delflag" column="del_flag" />
|
||||
<result property="bookid" column="book_id" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
22
src/main/resources/mapper/book/BookListeningDao.xml
Normal file
22
src/main/resources/mapper/book/BookListeningDao.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.peanut.modules.book.dao.BookListeningDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.BookListeningEntity" id="bookListeningMap">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="bookId" column="book_id" />
|
||||
<result property="chapterId" column="chapter_id" />
|
||||
<result property="chapterName" column="chapter_name" />
|
||||
<result property="contentId" column="content_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="sort" column="sort" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
26
src/main/resources/mapper/book/BookTaskDao.xml
Normal file
26
src/main/resources/mapper/book/BookTaskDao.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.peanut.modules.book.dao.BookTaskDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.BookTaskEntity" id="taskMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="bookid" column="book_id"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="images" column="images"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="voices" column="voices"/>
|
||||
<result property="days" column="days"/>
|
||||
<result property="likesun" column="like_sun"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="video" column="video"/>
|
||||
<result property="heading" column="heading"/>
|
||||
|
||||
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
33
src/main/resources/mapper/book/PayIOSOrderDao.xml
Normal file
33
src/main/resources/mapper/book/PayIOSOrderDao.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.peanut.modules.book.dao.PayIOSOrderDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.pay.IOSPay.model.entities.IosPayOrderEntity" id="PayIOSOrderMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="orderID" column="orderid"/>
|
||||
<result property="productID" column="productID"/>
|
||||
<result property="customerOid" column="customerOid"/>
|
||||
<result property="authToken" column="authToken"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="orderStatus" column="order_status"/>
|
||||
<result property="money" column="money"/>
|
||||
<result property="point" column="point"/>
|
||||
<result property="jf" column="jf"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="closeOrder" column="close_order"/>
|
||||
<result property="rechargeAmount" column="recharge_Amount"/>
|
||||
<result property="rechargeChannel" column="recharge_Channel"/>
|
||||
<result property="realAmount" column="realAmount"/>
|
||||
<result property="rechargeStatus" column="recharge_Status"/>
|
||||
<result property="successTime" column="successTime"/>
|
||||
<result property="body" column="body"/>
|
||||
<result property="subject" column="subject"/>
|
||||
<result property="relevanceoid" column="relevanceoid"/>
|
||||
<result property="buyerPayAmount" column="buyerPay_Amount"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
21
src/main/resources/mapper/book/UserFeedbackDao.xml
Normal file
21
src/main/resources/mapper/book/UserFeedbackDao.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.peanut.modules.book.dao.UserFeedbackDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.UserFeedbackEntity" id="UserFeedbackMap">
|
||||
<result property="id" column="oid"/>
|
||||
<result property="userId" column="userId"/>
|
||||
<result property="fuid" column="fu_id"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="rid" column="r_id"/>
|
||||
<result property="delFlag" column="delFlag"/>
|
||||
<result property="ordersn" column="ordersn"/>
|
||||
<result property="create_date" column="create_date"/>
|
||||
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
21
src/main/resources/mapper/book/UserFollowUpDao.xml
Normal file
21
src/main/resources/mapper/book/UserFollowUpDao.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.peanut.modules.book.dao.UserFollowUpDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.UserFollowUpEntity" id="UserFollowUpMap">
|
||||
<result property="id" column="oid"/>
|
||||
<result property="userId" column="userId"/>
|
||||
<result property="oid" column="oid"/>
|
||||
<result property="conTent" column="conTent"/>
|
||||
<result property="images" column="images"/>
|
||||
<result property="delflag" column="delflag"/>
|
||||
<result property="bookid" column="bookid"/>
|
||||
<result property="createDate" column="create_date"/>
|
||||
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
20
src/main/resources/mapper/book/UserRecordDao.xml
Normal file
20
src/main/resources/mapper/book/UserRecordDao.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.peanut.modules.book.dao.UserRecordDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.UserRecordEntity" id="UserRecordMap">
|
||||
<result property="id" column="oid"/>
|
||||
<result property="createDate" column="createDate"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="userid" column="userid"/>
|
||||
<result property="images" column="images"/>
|
||||
<result property="orderCode" column="orderCode"/>
|
||||
<result property="orderSn" column="orderSn"/>
|
||||
<result property="starLevel" column="starLevel"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user