使用生成代码完成部分业务
This commit is contained in:
parent
ad4063b2dc
commit
c3a8c17a65
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
-- 初始化菜单
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, '收藏表', 'maku/t_book_collection/index', NULL, 0, 0, 'icon-menu', 0, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (96, '查看', '', 'maku:t_book_collection:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (96, '新增', '', 'maku:t_book_collection:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (96, '修改', '', 'maku:t_book_collection:update,maku:t_book_collection:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (96, '删除', '', 'maku:t_book_collection:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now());
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
-- 初始化菜单
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, '评论表', 'maku/t_book_comment/index', NULL, 0, 0, 'icon-menu', 0, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
|
||||
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (91, '查看', '', 'maku:t_book_comment:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (91, '新增', '', 'maku:t_book_comment:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (91, '修改', '', 'maku:t_book_comment:update,maku:t_book_comment:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (91, '删除', '', 'maku:t_book_comment:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now());
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
-- 初始化菜单
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, '书籍管理表', 'maku/t_book/index', NULL, 0, 0, 'icon-menu', 0, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
|
||||
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (86, '查看', '', 'maku:t_book:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (86, '新增', '', 'maku:t_book:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (86, '修改', '', 'maku:t_book:update,maku:t_book:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (86, '删除', '', 'maku:t_book:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now());
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
-- 初始化菜单
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, '书籍订单详情表', 'maku/t_purchase_details/index', NULL, 0, 0, 'icon-menu', 0, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
SELECT max(id) from sys_menu where name = '评论表';
|
||||
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (81, '查看', '', 'maku:t_purchase_details:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (81, '新增', '', 'maku:t_purchase_details:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (81, '修改', '', 'maku:t_purchase_details:update,maku:t_purchase_details:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (81, '删除', '', 'maku:t_purchase_details:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now());
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
-- 初始化菜单
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, '书籍订单表', 'maku/t_purchase/index', NULL, 0, 0, 'icon-menu', 0, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
|
||||
SELECT max(id) from sys_menu where name = '收藏表';
|
||||
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (67, '查看', '', 'maku:t_purchase:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (67, '新增', '', 'maku:t_purchase:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (67, '修改', '', 'maku:t_purchase:update,maku:t_purchase:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (67, '删除', '', 'maku:t_purchase:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now());
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
-- 初始化菜单
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, '购物车管理', 'maku/t_shopping_trolley/index', NULL, 0, 0, 'icon-menu', 0, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
SELECT max(id) from sys_menu where name = '书籍订单表';
|
||||
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (66, '查看', '', 'maku:t_shopping_trolley:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (66, '新增', '', 'maku:t_shopping_trolley:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (66, '修改', '', 'maku:t_shopping_trolley:update,maku:t_shopping_trolley:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (66, '删除', '', 'maku:t_shopping_trolley:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now());
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
-- 初始化菜单
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, '用户管理', 'maku/t_user/index', NULL, 0, 0, 'icon-menu', 0, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
|
||||
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (76, '查看', '', 'maku:t_user:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (76, '新增', '', 'maku:t_user:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (76, '修改', '', 'maku:t_user:update,maku:t_user:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (76, '删除', '', 'maku:t_user:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now());
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package net.maku.maku.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.common.utils.Result;
|
||||
import net.maku.maku.convert.TBookCollectionConvert;
|
||||
import net.maku.maku.entity.TBookCollectionEntity;
|
||||
import net.maku.maku.service.TBookCollectionService;
|
||||
import net.maku.maku.query.TBookCollectionQuery;
|
||||
import net.maku.maku.vo.TBookCollectionVO;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("maku/t_book_collection")
|
||||
@Tag(name="")
|
||||
@AllArgsConstructor
|
||||
public class TBookCollectionController {
|
||||
private final TBookCollectionService tBookCollectionService;
|
||||
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
@PreAuthorize("hasAuthority('maku:t_book_collection:page')")
|
||||
public Result<PageResult<TBookCollectionVO>> page(@ParameterObject @Valid TBookCollectionQuery query){
|
||||
PageResult<TBookCollectionVO> page = tBookCollectionService.page(query);
|
||||
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
@PreAuthorize("hasAuthority('maku:t_book_collection:info')")
|
||||
public Result<TBookCollectionVO> get(@PathVariable("id") Long id){
|
||||
TBookCollectionEntity entity = tBookCollectionService.getById(id);
|
||||
|
||||
return Result.ok(TBookCollectionConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
@PreAuthorize("hasAuthority('maku:t_book_collection:save')")
|
||||
public Result<String> save(@RequestBody TBookCollectionVO vo){
|
||||
tBookCollectionService.save(vo);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
@PreAuthorize("hasAuthority('maku:t_book_collection:update')")
|
||||
public Result<String> update(@RequestBody @Valid TBookCollectionVO vo){
|
||||
tBookCollectionService.update(vo);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
@PreAuthorize("hasAuthority('maku:t_book_collection:delete')")
|
||||
public Result<String> delete(@RequestBody List<Long> idList){
|
||||
tBookCollectionService.delete(idList);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package net.maku.maku.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.common.utils.Result;
|
||||
import net.maku.maku.convert.TBookCommentConvert;
|
||||
import net.maku.maku.entity.TBookCommentEntity;
|
||||
import net.maku.maku.service.TBookCommentService;
|
||||
import net.maku.maku.query.TBookCommentQuery;
|
||||
import net.maku.maku.vo.TBookCommentVO;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("maku/t_book_comment")
|
||||
@Tag(name="")
|
||||
@AllArgsConstructor
|
||||
public class TBookCommentController {
|
||||
private final TBookCommentService tBookCommentService;
|
||||
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
@PreAuthorize("hasAuthority('maku:t_book_comment:page')")
|
||||
public Result<PageResult<TBookCommentVO>> page(@ParameterObject @Valid TBookCommentQuery query){
|
||||
PageResult<TBookCommentVO> page = tBookCommentService.page(query);
|
||||
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
@PreAuthorize("hasAuthority('maku:t_book_comment:info')")
|
||||
public Result<TBookCommentVO> get(@PathVariable("id") Long id){
|
||||
TBookCommentEntity entity = tBookCommentService.getById(id);
|
||||
|
||||
return Result.ok(TBookCommentConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
@PreAuthorize("hasAuthority('maku:t_book_comment:save')")
|
||||
public Result<String> save(@RequestBody TBookCommentVO vo){
|
||||
tBookCommentService.save(vo);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
@PreAuthorize("hasAuthority('maku:t_book_comment:update')")
|
||||
public Result<String> update(@RequestBody @Valid TBookCommentVO vo){
|
||||
tBookCommentService.update(vo);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
@PreAuthorize("hasAuthority('maku:t_book_comment:delete')")
|
||||
public Result<String> delete(@RequestBody List<Long> idList){
|
||||
tBookCommentService.delete(idList);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package net.maku.maku.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.common.utils.Result;
|
||||
import net.maku.maku.convert.TBookConvert;
|
||||
import net.maku.maku.entity.TBookEntity;
|
||||
import net.maku.maku.service.TBookService;
|
||||
import net.maku.maku.query.TBookQuery;
|
||||
import net.maku.maku.vo.TBookVO;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("maku/t_book")
|
||||
@Tag(name="")
|
||||
@AllArgsConstructor
|
||||
public class TBookController {
|
||||
private final TBookService tBookService;
|
||||
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
@PreAuthorize("hasAuthority('maku:t_book:page')")
|
||||
public Result<PageResult<TBookVO>> page(@ParameterObject @Valid TBookQuery query){
|
||||
PageResult<TBookVO> page = tBookService.page(query);
|
||||
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
@PreAuthorize("hasAuthority('maku:t_book:info')")
|
||||
public Result<TBookVO> get(@PathVariable("id") Long id){
|
||||
TBookEntity entity = tBookService.getById(id);
|
||||
|
||||
return Result.ok(TBookConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
@PreAuthorize("hasAuthority('maku:t_book:save')")
|
||||
public Result<String> save(@RequestBody TBookVO vo){
|
||||
tBookService.save(vo);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
@PreAuthorize("hasAuthority('maku:t_book:update')")
|
||||
public Result<String> update(@RequestBody @Valid TBookVO vo){
|
||||
tBookService.update(vo);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
@PreAuthorize("hasAuthority('maku:t_book:delete')")
|
||||
public Result<String> delete(@RequestBody List<Long> idList){
|
||||
tBookService.delete(idList);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package net.maku.maku.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.common.utils.Result;
|
||||
import net.maku.maku.convert.TPurchaseConvert;
|
||||
import net.maku.maku.entity.TPurchaseEntity;
|
||||
import net.maku.maku.service.TPurchaseService;
|
||||
import net.maku.maku.query.TPurchaseQuery;
|
||||
import net.maku.maku.vo.TPurchaseVO;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("maku/t_purchase")
|
||||
@Tag(name="")
|
||||
@AllArgsConstructor
|
||||
public class TPurchaseController {
|
||||
private final TPurchaseService tPurchaseService;
|
||||
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
@PreAuthorize("hasAuthority('maku:t_purchase:page')")
|
||||
public Result<PageResult<TPurchaseVO>> page(@ParameterObject @Valid TPurchaseQuery query){
|
||||
PageResult<TPurchaseVO> page = tPurchaseService.page(query);
|
||||
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
@PreAuthorize("hasAuthority('maku:t_purchase:info')")
|
||||
public Result<TPurchaseVO> get(@PathVariable("id") Long id){
|
||||
TPurchaseEntity entity = tPurchaseService.getById(id);
|
||||
|
||||
return Result.ok(TPurchaseConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
@PreAuthorize("hasAuthority('maku:t_purchase:save')")
|
||||
public Result<String> save(@RequestBody TPurchaseVO vo){
|
||||
tPurchaseService.save(vo);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
@PreAuthorize("hasAuthority('maku:t_purchase:update')")
|
||||
public Result<String> update(@RequestBody @Valid TPurchaseVO vo){
|
||||
tPurchaseService.update(vo);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
@PreAuthorize("hasAuthority('maku:t_purchase:delete')")
|
||||
public Result<String> delete(@RequestBody List<Long> idList){
|
||||
tPurchaseService.delete(idList);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package net.maku.maku.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.common.utils.Result;
|
||||
import net.maku.maku.convert.TPurchaseDetailsConvert;
|
||||
import net.maku.maku.entity.TPurchaseDetailsEntity;
|
||||
import net.maku.maku.service.TPurchaseDetailsService;
|
||||
import net.maku.maku.query.TPurchaseDetailsQuery;
|
||||
import net.maku.maku.vo.TPurchaseDetailsVO;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("maku/t_purchase_details")
|
||||
@Tag(name="")
|
||||
@AllArgsConstructor
|
||||
public class TPurchaseDetailsController {
|
||||
private final TPurchaseDetailsService tPurchaseDetailsService;
|
||||
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
@PreAuthorize("hasAuthority('maku:t_purchase_details:page')")
|
||||
public Result<PageResult<TPurchaseDetailsVO>> page(@ParameterObject @Valid TPurchaseDetailsQuery query){
|
||||
PageResult<TPurchaseDetailsVO> page = tPurchaseDetailsService.page(query);
|
||||
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
@PreAuthorize("hasAuthority('maku:t_purchase_details:info')")
|
||||
public Result<TPurchaseDetailsVO> get(@PathVariable("id") Long id){
|
||||
TPurchaseDetailsEntity entity = tPurchaseDetailsService.getById(id);
|
||||
|
||||
return Result.ok(TPurchaseDetailsConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
@PreAuthorize("hasAuthority('maku:t_purchase_details:save')")
|
||||
public Result<String> save(@RequestBody TPurchaseDetailsVO vo){
|
||||
tPurchaseDetailsService.save(vo);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
@PreAuthorize("hasAuthority('maku:t_purchase_details:update')")
|
||||
public Result<String> update(@RequestBody @Valid TPurchaseDetailsVO vo){
|
||||
tPurchaseDetailsService.update(vo);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
@PreAuthorize("hasAuthority('maku:t_purchase_details:delete')")
|
||||
public Result<String> delete(@RequestBody List<Long> idList){
|
||||
tPurchaseDetailsService.delete(idList);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package net.maku.maku.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.common.utils.Result;
|
||||
import net.maku.maku.convert.TShoppingTrolleyConvert;
|
||||
import net.maku.maku.entity.TShoppingTrolleyEntity;
|
||||
import net.maku.maku.service.TShoppingTrolleyService;
|
||||
import net.maku.maku.query.TShoppingTrolleyQuery;
|
||||
import net.maku.maku.vo.TShoppingTrolleyVO;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("maku/t_shopping_trolley")
|
||||
@Tag(name="")
|
||||
@AllArgsConstructor
|
||||
public class TShoppingTrolleyController {
|
||||
private final TShoppingTrolleyService tShoppingTrolleyService;
|
||||
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
@PreAuthorize("hasAuthority('maku:t_shopping_trolley:page')")
|
||||
public Result<PageResult<TShoppingTrolleyVO>> page(@ParameterObject @Valid TShoppingTrolleyQuery query){
|
||||
PageResult<TShoppingTrolleyVO> page = tShoppingTrolleyService.page(query);
|
||||
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
@PreAuthorize("hasAuthority('maku:t_shopping_trolley:info')")
|
||||
public Result<TShoppingTrolleyVO> get(@PathVariable("id") Long id){
|
||||
TShoppingTrolleyEntity entity = tShoppingTrolleyService.getById(id);
|
||||
|
||||
return Result.ok(TShoppingTrolleyConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
@PreAuthorize("hasAuthority('maku:t_shopping_trolley:save')")
|
||||
public Result<String> save(@RequestBody TShoppingTrolleyVO vo){
|
||||
tShoppingTrolleyService.save(vo);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
@PreAuthorize("hasAuthority('maku:t_shopping_trolley:update')")
|
||||
public Result<String> update(@RequestBody @Valid TShoppingTrolleyVO vo){
|
||||
tShoppingTrolleyService.update(vo);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
@PreAuthorize("hasAuthority('maku:t_shopping_trolley:delete')")
|
||||
public Result<String> delete(@RequestBody List<Long> idList){
|
||||
tShoppingTrolleyService.delete(idList);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package net.maku.maku.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.common.utils.Result;
|
||||
import net.maku.maku.convert.TUserConvert;
|
||||
import net.maku.maku.entity.TUserEntity;
|
||||
import net.maku.maku.service.TUserService;
|
||||
import net.maku.maku.query.TUserQuery;
|
||||
import net.maku.maku.vo.TUserVO;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("maku/t_user")
|
||||
@Tag(name="")
|
||||
@AllArgsConstructor
|
||||
public class TUserController {
|
||||
private final TUserService tUserService;
|
||||
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
@PreAuthorize("hasAuthority('maku:t_user:page')")
|
||||
public Result<PageResult<TUserVO>> page(@ParameterObject @Valid TUserQuery query){
|
||||
PageResult<TUserVO> page = tUserService.page(query);
|
||||
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
@PreAuthorize("hasAuthority('maku:t_user:info')")
|
||||
public Result<TUserVO> get(@PathVariable("id") Long id){
|
||||
TUserEntity entity = tUserService.getById(id);
|
||||
|
||||
return Result.ok(TUserConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
@PreAuthorize("hasAuthority('maku:t_user:save')")
|
||||
public Result<String> save(@RequestBody TUserVO vo){
|
||||
tUserService.save(vo);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
@PreAuthorize("hasAuthority('maku:t_user:update')")
|
||||
public Result<String> update(@RequestBody @Valid TUserVO vo){
|
||||
tUserService.update(vo);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
@PreAuthorize("hasAuthority('maku:t_user:delete')")
|
||||
public Result<String> delete(@RequestBody List<Long> idList){
|
||||
tUserService.delete(idList);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package net.maku.maku.convert;
|
||||
|
||||
import net.maku.maku.entity.TBookCollectionEntity;
|
||||
import net.maku.maku.vo.TBookCollectionVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface TBookCollectionConvert {
|
||||
TBookCollectionConvert INSTANCE = Mappers.getMapper(TBookCollectionConvert.class);
|
||||
|
||||
TBookCollectionEntity convert(TBookCollectionVO vo);
|
||||
|
||||
TBookCollectionVO convert(TBookCollectionEntity entity);
|
||||
|
||||
List<TBookCollectionVO> convertList(List<TBookCollectionEntity> list);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package net.maku.maku.convert;
|
||||
|
||||
import net.maku.maku.entity.TBookCommentEntity;
|
||||
import net.maku.maku.vo.TBookCommentVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface TBookCommentConvert {
|
||||
TBookCommentConvert INSTANCE = Mappers.getMapper(TBookCommentConvert.class);
|
||||
|
||||
TBookCommentEntity convert(TBookCommentVO vo);
|
||||
|
||||
TBookCommentVO convert(TBookCommentEntity entity);
|
||||
|
||||
List<TBookCommentVO> convertList(List<TBookCommentEntity> list);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package net.maku.maku.convert;
|
||||
|
||||
import net.maku.maku.entity.TBookEntity;
|
||||
import net.maku.maku.vo.TBookVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface TBookConvert {
|
||||
TBookConvert INSTANCE = Mappers.getMapper(TBookConvert.class);
|
||||
|
||||
TBookEntity convert(TBookVO vo);
|
||||
|
||||
TBookVO convert(TBookEntity entity);
|
||||
|
||||
List<TBookVO> convertList(List<TBookEntity> list);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package net.maku.maku.convert;
|
||||
|
||||
import net.maku.maku.entity.TPurchaseEntity;
|
||||
import net.maku.maku.vo.TPurchaseVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface TPurchaseConvert {
|
||||
TPurchaseConvert INSTANCE = Mappers.getMapper(TPurchaseConvert.class);
|
||||
|
||||
TPurchaseEntity convert(TPurchaseVO vo);
|
||||
|
||||
TPurchaseVO convert(TPurchaseEntity entity);
|
||||
|
||||
List<TPurchaseVO> convertList(List<TPurchaseEntity> list);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package net.maku.maku.convert;
|
||||
|
||||
import net.maku.maku.entity.TPurchaseDetailsEntity;
|
||||
import net.maku.maku.vo.TPurchaseDetailsVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface TPurchaseDetailsConvert {
|
||||
TPurchaseDetailsConvert INSTANCE = Mappers.getMapper(TPurchaseDetailsConvert.class);
|
||||
|
||||
TPurchaseDetailsEntity convert(TPurchaseDetailsVO vo);
|
||||
|
||||
TPurchaseDetailsVO convert(TPurchaseDetailsEntity entity);
|
||||
|
||||
List<TPurchaseDetailsVO> convertList(List<TPurchaseDetailsEntity> list);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package net.maku.maku.convert;
|
||||
|
||||
import net.maku.maku.entity.TShoppingTrolleyEntity;
|
||||
import net.maku.maku.vo.TShoppingTrolleyVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface TShoppingTrolleyConvert {
|
||||
TShoppingTrolleyConvert INSTANCE = Mappers.getMapper(TShoppingTrolleyConvert.class);
|
||||
|
||||
TShoppingTrolleyEntity convert(TShoppingTrolleyVO vo);
|
||||
|
||||
TShoppingTrolleyVO convert(TShoppingTrolleyEntity entity);
|
||||
|
||||
List<TShoppingTrolleyVO> convertList(List<TShoppingTrolleyEntity> list);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package net.maku.maku.convert;
|
||||
|
||||
import net.maku.maku.entity.TUserEntity;
|
||||
import net.maku.maku.vo.TUserVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface TUserConvert {
|
||||
TUserConvert INSTANCE = Mappers.getMapper(TUserConvert.class);
|
||||
|
||||
TUserEntity convert(TUserVO vo);
|
||||
|
||||
TUserVO convert(TUserEntity entity);
|
||||
|
||||
List<TUserVO> convertList(List<TUserEntity> list);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package net.maku.maku.dao;
|
||||
|
||||
import net.maku.framework.mybatis.dao.BaseDao;
|
||||
import net.maku.maku.entity.TBookCollectionEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface TBookCollectionDao extends BaseDao<TBookCollectionEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package net.maku.maku.dao;
|
||||
|
||||
import net.maku.framework.mybatis.dao.BaseDao;
|
||||
import net.maku.maku.entity.TBookCommentEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface TBookCommentDao extends BaseDao<TBookCommentEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package net.maku.maku.dao;
|
||||
|
||||
import net.maku.framework.mybatis.dao.BaseDao;
|
||||
import net.maku.maku.entity.TBookEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface TBookDao extends BaseDao<TBookEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package net.maku.maku.dao;
|
||||
|
||||
import net.maku.framework.mybatis.dao.BaseDao;
|
||||
import net.maku.maku.entity.TPurchaseEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface TPurchaseDao extends BaseDao<TPurchaseEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package net.maku.maku.dao;
|
||||
|
||||
import net.maku.framework.mybatis.dao.BaseDao;
|
||||
import net.maku.maku.entity.TPurchaseDetailsEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface TPurchaseDetailsDao extends BaseDao<TPurchaseDetailsEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package net.maku.maku.dao;
|
||||
|
||||
import net.maku.framework.mybatis.dao.BaseDao;
|
||||
import net.maku.maku.entity.TShoppingTrolleyEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface TShoppingTrolleyDao extends BaseDao<TShoppingTrolleyEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package net.maku.maku.dao;
|
||||
|
||||
import net.maku.framework.mybatis.dao.BaseDao;
|
||||
import net.maku.maku.entity.TUserEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface TUserDao extends BaseDao<TUserEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package net.maku.maku.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("t_book_collection")
|
||||
public class TBookCollectionEntity {
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
private Integer bookId;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package net.maku.maku.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("t_book_comment")
|
||||
public class TBookCommentEntity {
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
private Integer bookId;
|
||||
|
||||
private String comment;
|
||||
|
||||
private Integer parentId;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package net.maku.maku.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("t_book")
|
||||
public class TBookEntity {
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
private String bookName;
|
||||
|
||||
private String author;
|
||||
|
||||
private BigDecimal price;
|
||||
|
||||
private String bookCover;
|
||||
|
||||
private String introduction;
|
||||
|
||||
private String description;
|
||||
|
||||
private Integer store;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package net.maku.maku.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("t_purchase_details")
|
||||
public class TPurchaseDetailsEntity {
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
private Integer purchaseId;
|
||||
|
||||
private Integer bookId;
|
||||
|
||||
private BigDecimal price;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package net.maku.maku.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("t_purchase")
|
||||
public class TPurchaseEntity {
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
private Date tradingHour;
|
||||
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package net.maku.maku.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("t_shopping_trolley")
|
||||
public class TShoppingTrolleyEntity {
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
private Integer bookId;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package net.maku.maku.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("t_user")
|
||||
public class TUserEntity {
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
private String username;
|
||||
|
||||
private String password;
|
||||
|
||||
private String avatar;
|
||||
|
||||
private BigDecimal balance;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package net.maku.maku.query;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.maku.framework.common.query.Query;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(description = "查询")
|
||||
public class TBookCollectionQuery extends Query {
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package net.maku.maku.query;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.maku.framework.common.query.Query;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(description = "查询")
|
||||
public class TBookCommentQuery extends Query {
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package net.maku.maku.query;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.maku.framework.common.query.Query;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(description = "查询")
|
||||
public class TBookQuery extends Query {
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package net.maku.maku.query;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.maku.framework.common.query.Query;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(description = "查询")
|
||||
public class TPurchaseDetailsQuery extends Query {
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package net.maku.maku.query;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.maku.framework.common.query.Query;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(description = "查询")
|
||||
public class TPurchaseQuery extends Query {
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package net.maku.maku.query;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.maku.framework.common.query.Query;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(description = "查询")
|
||||
public class TShoppingTrolleyQuery extends Query {
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package net.maku.maku.query;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.maku.framework.common.query.Query;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(description = "查询")
|
||||
public class TUserQuery extends Query {
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package net.maku.maku.service;
|
||||
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.mybatis.service.BaseService;
|
||||
import net.maku.maku.vo.TBookCollectionVO;
|
||||
import net.maku.maku.query.TBookCollectionQuery;
|
||||
import net.maku.maku.entity.TBookCollectionEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
public interface TBookCollectionService extends BaseService<TBookCollectionEntity> {
|
||||
|
||||
PageResult<TBookCollectionVO> page(TBookCollectionQuery query);
|
||||
|
||||
void save(TBookCollectionVO vo);
|
||||
|
||||
void update(TBookCollectionVO vo);
|
||||
|
||||
void delete(List<Long> idList);
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package net.maku.maku.service;
|
||||
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.mybatis.service.BaseService;
|
||||
import net.maku.maku.vo.TBookCommentVO;
|
||||
import net.maku.maku.query.TBookCommentQuery;
|
||||
import net.maku.maku.entity.TBookCommentEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
public interface TBookCommentService extends BaseService<TBookCommentEntity> {
|
||||
|
||||
PageResult<TBookCommentVO> page(TBookCommentQuery query);
|
||||
|
||||
void save(TBookCommentVO vo);
|
||||
|
||||
void update(TBookCommentVO vo);
|
||||
|
||||
void delete(List<Long> idList);
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package net.maku.maku.service;
|
||||
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.mybatis.service.BaseService;
|
||||
import net.maku.maku.vo.TBookVO;
|
||||
import net.maku.maku.query.TBookQuery;
|
||||
import net.maku.maku.entity.TBookEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
public interface TBookService extends BaseService<TBookEntity> {
|
||||
|
||||
PageResult<TBookVO> page(TBookQuery query);
|
||||
|
||||
void save(TBookVO vo);
|
||||
|
||||
void update(TBookVO vo);
|
||||
|
||||
void delete(List<Long> idList);
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package net.maku.maku.service;
|
||||
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.mybatis.service.BaseService;
|
||||
import net.maku.maku.vo.TPurchaseDetailsVO;
|
||||
import net.maku.maku.query.TPurchaseDetailsQuery;
|
||||
import net.maku.maku.entity.TPurchaseDetailsEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
public interface TPurchaseDetailsService extends BaseService<TPurchaseDetailsEntity> {
|
||||
|
||||
PageResult<TPurchaseDetailsVO> page(TPurchaseDetailsQuery query);
|
||||
|
||||
void save(TPurchaseDetailsVO vo);
|
||||
|
||||
void update(TPurchaseDetailsVO vo);
|
||||
|
||||
void delete(List<Long> idList);
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package net.maku.maku.service;
|
||||
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.mybatis.service.BaseService;
|
||||
import net.maku.maku.vo.TPurchaseVO;
|
||||
import net.maku.maku.query.TPurchaseQuery;
|
||||
import net.maku.maku.entity.TPurchaseEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
public interface TPurchaseService extends BaseService<TPurchaseEntity> {
|
||||
|
||||
PageResult<TPurchaseVO> page(TPurchaseQuery query);
|
||||
|
||||
void save(TPurchaseVO vo);
|
||||
|
||||
void update(TPurchaseVO vo);
|
||||
|
||||
void delete(List<Long> idList);
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package net.maku.maku.service;
|
||||
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.mybatis.service.BaseService;
|
||||
import net.maku.maku.vo.TShoppingTrolleyVO;
|
||||
import net.maku.maku.query.TShoppingTrolleyQuery;
|
||||
import net.maku.maku.entity.TShoppingTrolleyEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
public interface TShoppingTrolleyService extends BaseService<TShoppingTrolleyEntity> {
|
||||
|
||||
PageResult<TShoppingTrolleyVO> page(TShoppingTrolleyQuery query);
|
||||
|
||||
void save(TShoppingTrolleyVO vo);
|
||||
|
||||
void update(TShoppingTrolleyVO vo);
|
||||
|
||||
void delete(List<Long> idList);
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package net.maku.maku.service;
|
||||
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.mybatis.service.BaseService;
|
||||
import net.maku.maku.vo.TUserVO;
|
||||
import net.maku.maku.query.TUserQuery;
|
||||
import net.maku.maku.entity.TUserEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
public interface TUserService extends BaseService<TUserEntity> {
|
||||
|
||||
PageResult<TUserVO> page(TUserQuery query);
|
||||
|
||||
void save(TUserVO vo);
|
||||
|
||||
void update(TUserVO vo);
|
||||
|
||||
void delete(List<Long> idList);
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package net.maku.maku.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.mybatis.service.impl.BaseServiceImpl;
|
||||
import net.maku.maku.convert.TBookCollectionConvert;
|
||||
import net.maku.maku.entity.TBookCollectionEntity;
|
||||
import net.maku.maku.query.TBookCollectionQuery;
|
||||
import net.maku.maku.vo.TBookCollectionVO;
|
||||
import net.maku.maku.dao.TBookCollectionDao;
|
||||
import net.maku.maku.service.TBookCollectionService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TBookCollectionServiceImpl extends BaseServiceImpl<TBookCollectionDao, TBookCollectionEntity> implements TBookCollectionService {
|
||||
|
||||
@Override
|
||||
public PageResult<TBookCollectionVO> page(TBookCollectionQuery query) {
|
||||
IPage<TBookCollectionEntity> page = baseMapper.selectPage(getPage(query), getWrapper(query));
|
||||
|
||||
return new PageResult<>(TBookCollectionConvert.INSTANCE.convertList(page.getRecords()), page.getTotal());
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TBookCollectionEntity> getWrapper(TBookCollectionQuery query){
|
||||
LambdaQueryWrapper<TBookCollectionEntity> wrapper = Wrappers.lambdaQuery();
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(TBookCollectionVO vo) {
|
||||
TBookCollectionEntity entity = TBookCollectionConvert.INSTANCE.convert(vo);
|
||||
|
||||
baseMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(TBookCollectionVO vo) {
|
||||
TBookCollectionEntity entity = TBookCollectionConvert.INSTANCE.convert(vo);
|
||||
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(List<Long> idList) {
|
||||
removeByIds(idList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package net.maku.maku.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.mybatis.service.impl.BaseServiceImpl;
|
||||
import net.maku.maku.convert.TBookCommentConvert;
|
||||
import net.maku.maku.entity.TBookCommentEntity;
|
||||
import net.maku.maku.query.TBookCommentQuery;
|
||||
import net.maku.maku.vo.TBookCommentVO;
|
||||
import net.maku.maku.dao.TBookCommentDao;
|
||||
import net.maku.maku.service.TBookCommentService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TBookCommentServiceImpl extends BaseServiceImpl<TBookCommentDao, TBookCommentEntity> implements TBookCommentService {
|
||||
|
||||
@Override
|
||||
public PageResult<TBookCommentVO> page(TBookCommentQuery query) {
|
||||
IPage<TBookCommentEntity> page = baseMapper.selectPage(getPage(query), getWrapper(query));
|
||||
|
||||
return new PageResult<>(TBookCommentConvert.INSTANCE.convertList(page.getRecords()), page.getTotal());
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TBookCommentEntity> getWrapper(TBookCommentQuery query){
|
||||
LambdaQueryWrapper<TBookCommentEntity> wrapper = Wrappers.lambdaQuery();
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(TBookCommentVO vo) {
|
||||
TBookCommentEntity entity = TBookCommentConvert.INSTANCE.convert(vo);
|
||||
|
||||
baseMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(TBookCommentVO vo) {
|
||||
TBookCommentEntity entity = TBookCommentConvert.INSTANCE.convert(vo);
|
||||
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(List<Long> idList) {
|
||||
removeByIds(idList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package net.maku.maku.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.mybatis.service.impl.BaseServiceImpl;
|
||||
import net.maku.maku.convert.TBookConvert;
|
||||
import net.maku.maku.entity.TBookEntity;
|
||||
import net.maku.maku.query.TBookQuery;
|
||||
import net.maku.maku.vo.TBookVO;
|
||||
import net.maku.maku.dao.TBookDao;
|
||||
import net.maku.maku.service.TBookService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TBookServiceImpl extends BaseServiceImpl<TBookDao, TBookEntity> implements TBookService {
|
||||
|
||||
@Override
|
||||
public PageResult<TBookVO> page(TBookQuery query) {
|
||||
IPage<TBookEntity> page = baseMapper.selectPage(getPage(query), getWrapper(query));
|
||||
|
||||
return new PageResult<>(TBookConvert.INSTANCE.convertList(page.getRecords()), page.getTotal());
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TBookEntity> getWrapper(TBookQuery query){
|
||||
LambdaQueryWrapper<TBookEntity> wrapper = Wrappers.lambdaQuery();
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(TBookVO vo) {
|
||||
TBookEntity entity = TBookConvert.INSTANCE.convert(vo);
|
||||
|
||||
baseMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(TBookVO vo) {
|
||||
TBookEntity entity = TBookConvert.INSTANCE.convert(vo);
|
||||
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(List<Long> idList) {
|
||||
removeByIds(idList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package net.maku.maku.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.mybatis.service.impl.BaseServiceImpl;
|
||||
import net.maku.maku.convert.TPurchaseDetailsConvert;
|
||||
import net.maku.maku.entity.TPurchaseDetailsEntity;
|
||||
import net.maku.maku.query.TPurchaseDetailsQuery;
|
||||
import net.maku.maku.vo.TPurchaseDetailsVO;
|
||||
import net.maku.maku.dao.TPurchaseDetailsDao;
|
||||
import net.maku.maku.service.TPurchaseDetailsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TPurchaseDetailsServiceImpl extends BaseServiceImpl<TPurchaseDetailsDao, TPurchaseDetailsEntity> implements TPurchaseDetailsService {
|
||||
|
||||
@Override
|
||||
public PageResult<TPurchaseDetailsVO> page(TPurchaseDetailsQuery query) {
|
||||
IPage<TPurchaseDetailsEntity> page = baseMapper.selectPage(getPage(query), getWrapper(query));
|
||||
|
||||
return new PageResult<>(TPurchaseDetailsConvert.INSTANCE.convertList(page.getRecords()), page.getTotal());
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TPurchaseDetailsEntity> getWrapper(TPurchaseDetailsQuery query){
|
||||
LambdaQueryWrapper<TPurchaseDetailsEntity> wrapper = Wrappers.lambdaQuery();
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(TPurchaseDetailsVO vo) {
|
||||
TPurchaseDetailsEntity entity = TPurchaseDetailsConvert.INSTANCE.convert(vo);
|
||||
|
||||
baseMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(TPurchaseDetailsVO vo) {
|
||||
TPurchaseDetailsEntity entity = TPurchaseDetailsConvert.INSTANCE.convert(vo);
|
||||
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(List<Long> idList) {
|
||||
removeByIds(idList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package net.maku.maku.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.mybatis.service.impl.BaseServiceImpl;
|
||||
import net.maku.maku.convert.TPurchaseConvert;
|
||||
import net.maku.maku.entity.TPurchaseEntity;
|
||||
import net.maku.maku.query.TPurchaseQuery;
|
||||
import net.maku.maku.vo.TPurchaseVO;
|
||||
import net.maku.maku.dao.TPurchaseDao;
|
||||
import net.maku.maku.service.TPurchaseService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TPurchaseServiceImpl extends BaseServiceImpl<TPurchaseDao, TPurchaseEntity> implements TPurchaseService {
|
||||
|
||||
@Override
|
||||
public PageResult<TPurchaseVO> page(TPurchaseQuery query) {
|
||||
IPage<TPurchaseEntity> page = baseMapper.selectPage(getPage(query), getWrapper(query));
|
||||
|
||||
return new PageResult<>(TPurchaseConvert.INSTANCE.convertList(page.getRecords()), page.getTotal());
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TPurchaseEntity> getWrapper(TPurchaseQuery query){
|
||||
LambdaQueryWrapper<TPurchaseEntity> wrapper = Wrappers.lambdaQuery();
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(TPurchaseVO vo) {
|
||||
TPurchaseEntity entity = TPurchaseConvert.INSTANCE.convert(vo);
|
||||
|
||||
baseMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(TPurchaseVO vo) {
|
||||
TPurchaseEntity entity = TPurchaseConvert.INSTANCE.convert(vo);
|
||||
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(List<Long> idList) {
|
||||
removeByIds(idList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package net.maku.maku.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.mybatis.service.impl.BaseServiceImpl;
|
||||
import net.maku.maku.convert.TShoppingTrolleyConvert;
|
||||
import net.maku.maku.entity.TShoppingTrolleyEntity;
|
||||
import net.maku.maku.query.TShoppingTrolleyQuery;
|
||||
import net.maku.maku.vo.TShoppingTrolleyVO;
|
||||
import net.maku.maku.dao.TShoppingTrolleyDao;
|
||||
import net.maku.maku.service.TShoppingTrolleyService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TShoppingTrolleyServiceImpl extends BaseServiceImpl<TShoppingTrolleyDao, TShoppingTrolleyEntity> implements TShoppingTrolleyService {
|
||||
|
||||
@Override
|
||||
public PageResult<TShoppingTrolleyVO> page(TShoppingTrolleyQuery query) {
|
||||
IPage<TShoppingTrolleyEntity> page = baseMapper.selectPage(getPage(query), getWrapper(query));
|
||||
|
||||
return new PageResult<>(TShoppingTrolleyConvert.INSTANCE.convertList(page.getRecords()), page.getTotal());
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TShoppingTrolleyEntity> getWrapper(TShoppingTrolleyQuery query){
|
||||
LambdaQueryWrapper<TShoppingTrolleyEntity> wrapper = Wrappers.lambdaQuery();
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(TShoppingTrolleyVO vo) {
|
||||
TShoppingTrolleyEntity entity = TShoppingTrolleyConvert.INSTANCE.convert(vo);
|
||||
|
||||
baseMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(TShoppingTrolleyVO vo) {
|
||||
TShoppingTrolleyEntity entity = TShoppingTrolleyConvert.INSTANCE.convert(vo);
|
||||
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(List<Long> idList) {
|
||||
removeByIds(idList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package net.maku.maku.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.mybatis.service.impl.BaseServiceImpl;
|
||||
import net.maku.maku.convert.TUserConvert;
|
||||
import net.maku.maku.entity.TUserEntity;
|
||||
import net.maku.maku.query.TUserQuery;
|
||||
import net.maku.maku.vo.TUserVO;
|
||||
import net.maku.maku.dao.TUserDao;
|
||||
import net.maku.maku.service.TUserService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TUserServiceImpl extends BaseServiceImpl<TUserDao, TUserEntity> implements TUserService {
|
||||
|
||||
@Override
|
||||
public PageResult<TUserVO> page(TUserQuery query) {
|
||||
IPage<TUserEntity> page = baseMapper.selectPage(getPage(query), getWrapper(query));
|
||||
|
||||
return new PageResult<>(TUserConvert.INSTANCE.convertList(page.getRecords()), page.getTotal());
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TUserEntity> getWrapper(TUserQuery query){
|
||||
LambdaQueryWrapper<TUserEntity> wrapper = Wrappers.lambdaQuery();
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(TUserVO vo) {
|
||||
TUserEntity entity = TUserConvert.INSTANCE.convert(vo);
|
||||
|
||||
baseMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(TUserVO vo) {
|
||||
TUserEntity entity = TUserConvert.INSTANCE.convert(vo);
|
||||
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(List<Long> idList) {
|
||||
removeByIds(idList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package net.maku.maku.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import net.maku.framework.common.utils.DateUtils;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "")
|
||||
public class TBookCollectionVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
private Integer bookId;
|
||||
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package net.maku.maku.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import net.maku.framework.common.utils.DateUtils;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "")
|
||||
public class TBookCommentVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
private Integer bookId;
|
||||
|
||||
private String comment;
|
||||
|
||||
private Integer parentId;
|
||||
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package net.maku.maku.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import net.maku.framework.common.utils.DateUtils;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "")
|
||||
public class TBookVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id;
|
||||
|
||||
private String bookName;
|
||||
|
||||
private String author;
|
||||
|
||||
private BigDecimal price;
|
||||
|
||||
private String bookCover;
|
||||
|
||||
private String introduction;
|
||||
|
||||
private String description;
|
||||
|
||||
private Integer store;
|
||||
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package net.maku.maku.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import net.maku.framework.common.utils.DateUtils;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "")
|
||||
public class TPurchaseDetailsVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id;
|
||||
|
||||
private Integer purchaseId;
|
||||
|
||||
private Integer bookId;
|
||||
|
||||
private BigDecimal price;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package net.maku.maku.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import net.maku.framework.common.utils.DateUtils;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "")
|
||||
public class TPurchaseVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id;
|
||||
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date tradingHour;
|
||||
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package net.maku.maku.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import net.maku.framework.common.utils.DateUtils;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "")
|
||||
public class TShoppingTrolleyVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
private Integer bookId;
|
||||
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package net.maku.maku.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import net.maku.framework.common.utils.DateUtils;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 阿沐 babamu@126.com
|
||||
* @since 1.0.0 2024-07-16
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "")
|
||||
public class TUserVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id;
|
||||
|
||||
private String username;
|
||||
|
||||
private String password;
|
||||
|
||||
private String avatar;
|
||||
|
||||
private BigDecimal balance;
|
||||
|
||||
private Integer status;
|
||||
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<?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="net.maku.maku.dao.TBookCollectionDao">
|
||||
|
||||
<resultMap type="net.maku.maku.entity.TBookCollectionEntity" id="tBookCollectionMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="bookId" column="book_id"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?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="net.maku.maku.dao.TBookCommentDao">
|
||||
|
||||
<resultMap type="net.maku.maku.entity.TBookCommentEntity" id="tBookCommentMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="bookId" column="book_id"/>
|
||||
<result property="comment" column="comment"/>
|
||||
<result property="parentId" column="parent_id"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?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="net.maku.maku.dao.TBookDao">
|
||||
|
||||
<resultMap type="net.maku.maku.entity.TBookEntity" id="tBookMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="bookName" column="book_name"/>
|
||||
<result property="author" column="author"/>
|
||||
<result property="price" column="price"/>
|
||||
<result property="bookCover" column="book_cover"/>
|
||||
<result property="introduction" column="introduction"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="store" column="store"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<?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="net.maku.maku.dao.TPurchaseDao">
|
||||
|
||||
<resultMap type="net.maku.maku.entity.TPurchaseEntity" id="tPurchaseMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="tradingHour" column="trading_hour"/>
|
||||
<result property="totalPrice" column="total_price"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?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="net.maku.maku.dao.TPurchaseDetailsDao">
|
||||
|
||||
<resultMap type="net.maku.maku.entity.TPurchaseDetailsEntity" id="tPurchaseDetailsMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="purchaseId" column="purchase_id"/>
|
||||
<result property="bookId" column="book_id"/>
|
||||
<result property="price" column="price"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<?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="net.maku.maku.dao.TShoppingTrolleyDao">
|
||||
|
||||
<resultMap type="net.maku.maku.entity.TShoppingTrolleyEntity" id="tShoppingTrolleyMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="bookId" column="book_id"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?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="net.maku.maku.dao.TUserDao">
|
||||
|
||||
<resultMap type="net.maku.maku.entity.TUserEntity" id="tUserMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="username" column="username"/>
|
||||
<result property="password" column="password"/>
|
||||
<result property="avatar" column="avatar"/>
|
||||
<result property="balance" column="balance"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user