book单表
parent
cd8a13e2d9
commit
11871c4b02
|
@ -22,7 +22,7 @@ import com.muyu.common.core.utils.poi.ExcelUtil;
|
|||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Controller
|
||||
* 书籍Controller
|
||||
*
|
||||
* @author muyu
|
||||
* @date 2024-02-23
|
||||
|
@ -35,32 +35,33 @@ public class BookInfoController extends BaseController
|
|||
private IBookInfoService bookInfoService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
* 查询列表
|
||||
*/
|
||||
@RequiresPermissions("system:info:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<BookInfo>> list(BookInfo bookInfo)
|
||||
{
|
||||
startPage();
|
||||
|
||||
List<BookInfo> list = bookInfoService.selectBookInfoList(bookInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
* 导出导出列表
|
||||
*/
|
||||
@RequiresPermissions("system:info:export")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "导出", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BookInfo bookInfo)
|
||||
{
|
||||
List<BookInfo> list = bookInfoService.selectBookInfoList(bookInfo);
|
||||
ExcelUtil<BookInfo> util = new ExcelUtil<BookInfo>(BookInfo.class);
|
||||
util.exportExcel(response, list, "【请填写功能名称】数据");
|
||||
util.exportExcel(response, list, "bookInfo数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
* 获取书籍详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:info:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
|
@ -70,10 +71,10 @@ public class BookInfoController extends BaseController
|
|||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
* 新增bookInfo
|
||||
*/
|
||||
@RequiresPermissions("system:info:add")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@Log(title = "书籍添加", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public Result add(@RequestBody BookInfo bookInfo)
|
||||
{
|
||||
|
@ -81,10 +82,10 @@ public class BookInfoController extends BaseController
|
|||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
* 修改
|
||||
*/
|
||||
@RequiresPermissions("system:info:edit")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "书记修改", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public Result edit(@RequestBody BookInfo bookInfo)
|
||||
{
|
||||
|
@ -92,10 +93,10 @@ public class BookInfoController extends BaseController
|
|||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
* 删除
|
||||
*/
|
||||
@RequiresPermissions("system:info:remove")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@Log(title = "书记修改", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public Result remove(@PathVariable Long[] ids)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
//package com.muyu.product.entity;
|
||||
//
|
||||
//import io.swagger.annotations.ApiModel;
|
||||
//import io.swagger.annotations.ApiModelProperty;
|
||||
//import javax.persistence.*;
|
||||
//import java.io.Serializable;
|
||||
//import java.util.Date;
|
||||
//import lombok.AllArgsConstructor;
|
||||
//import lombok.Data;
|
||||
//import lombok.EqualsAndHashCode;
|
||||
//import lombok.NoArgsConstructor;
|
||||
//import lombok.experimental.SuperBuilder;
|
||||
//import com.baomidou.mybatisplus.annotation.IdType;
|
||||
//import com.baomidou.mybatisplus.annotation.TableId;
|
||||
//import com.baomidou.mybatisplus.annotation.TableName;
|
||||
//
|
||||
///**
|
||||
// * 品类信息;
|
||||
// * @author : http://www.chiner.pro
|
||||
// * @date : 2024-2-24
|
||||
// */
|
||||
//@Data
|
||||
//@SuperBuilder
|
||||
//@NoArgsConstructor
|
||||
//@AllArgsConstructor
|
||||
//@EqualsAndHashCode(callSuper = true)
|
||||
//@ApiModel(value = "品类信息")
|
||||
//@TableName("category_info")
|
||||
//public class CategoryInfo implements Serializable,Cloneable{
|
||||
// /** 主键 */
|
||||
// @TableId( type = IdType.AUTO)
|
||||
// @GeneratedValue
|
||||
// @ApiModelProperty(name = "主键")
|
||||
// private id ;
|
||||
// /** 品类名称 */
|
||||
// @ApiModelProperty(name = "品类名称")
|
||||
// private String name ;
|
||||
// /** 图片 */
|
||||
// @ApiModelProperty(name = "图片")
|
||||
// private String image ;
|
||||
// /** 父级品类 */
|
||||
// @ApiModelProperty(name = "父级品类")
|
||||
// private parentId ;
|
||||
// /** 是否启用 */
|
||||
// @ApiModelProperty(name = "是否启用")
|
||||
// private String status ;
|
||||
// /** 备注 */
|
||||
// @ApiModelProperty(name = "备注")
|
||||
// private String remark ;
|
||||
// /** 创建人 */
|
||||
// @ApiModelProperty(name = "创建人")
|
||||
// private String createBy ;
|
||||
// /** 创建时间 */
|
||||
// @ApiModelProperty(name = "创建时间")
|
||||
// private Date createTime ;
|
||||
// /** 更新人 */
|
||||
// @ApiModelProperty(name = "更新人")
|
||||
// private String updateBy ;
|
||||
// /** 更新时间 */
|
||||
// @ApiModelProperty(name = "更新时间")
|
||||
// private Date updateTime ;
|
||||
//
|
||||
//}
|
|
@ -4,7 +4,7 @@ import java.util.List;
|
|||
import com.muyu.system.domain.BookInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
* bookInfoService接口
|
||||
*
|
||||
* @author muyu
|
||||
* @date 2024-02-23
|
||||
|
@ -12,49 +12,49 @@ import com.muyu.system.domain.BookInfo;
|
|||
public interface IBookInfoService
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
* 查询bookInfo
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
* @param id bookInfo主键
|
||||
* @return bookInfo
|
||||
*/
|
||||
public BookInfo selectBookInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
* 查询bookInfo列表
|
||||
*
|
||||
* @param bookInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
* @param bookInfo bookInfo
|
||||
* @return bookInfo集合
|
||||
*/
|
||||
public List<BookInfo> selectBookInfoList(BookInfo bookInfo);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
* 新增bookInfo
|
||||
*
|
||||
* @param bookInfo 【请填写功能名称】
|
||||
* @param bookInfo bookInfo
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBookInfo(BookInfo bookInfo);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
* 修改bookInfo
|
||||
*
|
||||
* @param bookInfo 【请填写功能名称】
|
||||
* @param bookInfo bookInfo
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBookInfo(BookInfo bookInfo);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
* 批量删除bookInfo
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键集合
|
||||
* @param ids 需要删除的bookInfo主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBookInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
* 删除bookInfo信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @param id bookInfo主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBookInfoById(Long id);
|
||||
|
|
|
@ -1,96 +1,95 @@
|
|||
package com.muyu.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.common.core.utils.DateUtils;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.system.domain.BookInfo;
|
||||
import com.muyu.system.mapper.BookInfoMapper;
|
||||
import com.muyu.system.service.IBookInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.muyu.system.mapper.BookInfoMapper;
|
||||
import com.muyu.system.domain.BookInfo;
|
||||
import com.muyu.system.service.IBookInfoService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
* bookInfoService业务层处理
|
||||
*
|
||||
* @author muyu
|
||||
* @date 2024-02-23
|
||||
*/
|
||||
@Service
|
||||
public class BookInfoServiceImpl implements IBookInfoService
|
||||
{
|
||||
public class BookInfoServiceImpl implements IBookInfoService {
|
||||
@Autowired
|
||||
private BookInfoMapper bookInfoMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
* 查询bookInfo
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
* @param id bookInfo主键
|
||||
* @return bookInfo
|
||||
*/
|
||||
@Override
|
||||
public BookInfo selectBookInfoById(Long id)
|
||||
{
|
||||
public BookInfo selectBookInfoById(Long id) {
|
||||
return bookInfoMapper.selectBookInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
* 查询bookInfo列表
|
||||
*
|
||||
* @param bookInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
* @param bookInfo bookInfo
|
||||
* @return bookInfo
|
||||
*/
|
||||
@Override
|
||||
public List<BookInfo> selectBookInfoList(BookInfo bookInfo)
|
||||
{
|
||||
public List<BookInfo> selectBookInfoList(BookInfo bookInfo) {
|
||||
bookInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
return bookInfoMapper.selectBookInfoList(bookInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
* 新增bookInfo
|
||||
*
|
||||
* @param bookInfo 【请填写功能名称】
|
||||
* @param bookInfo bookInfo
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBookInfo(BookInfo bookInfo)
|
||||
{
|
||||
public int insertBookInfo(BookInfo bookInfo) {
|
||||
bookInfo.setCreateTime(DateUtils.getNowDate());
|
||||
bookInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
return bookInfoMapper.insertBookInfo(bookInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
* 修改bookInfo
|
||||
*
|
||||
* @param bookInfo 【请填写功能名称】
|
||||
* @param bookInfo bookInfo
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBookInfo(BookInfo bookInfo)
|
||||
{
|
||||
public int updateBookInfo(BookInfo bookInfo) {
|
||||
bookInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
bookInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
return bookInfoMapper.updateBookInfo(bookInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
* 批量删除bookInfo
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键
|
||||
* @param ids 需要删除的bookInfo主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBookInfoByIds(Long[] ids)
|
||||
{
|
||||
public int deleteBookInfoByIds(Long[] ids) {
|
||||
return bookInfoMapper.deleteBookInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
* 删除bookInfo信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @param id bookInfo主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBookInfoById(Long id)
|
||||
{
|
||||
public int deleteBookInfoById(Long id) {
|
||||
return bookInfoMapper.deleteBookInfoById(id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
<if test="author != null and author != ''"> and author = #{author}</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="images != null and images != ''"> and images = #{images}</if>
|
||||
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
|
||||
<if test="remak != null and remak != ''"> and remak = #{remak}</if>
|
||||
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||
<if test="grounding != null and grounding != ''"> and grounding = #{grounding}</if>
|
||||
|
|
Loading…
Reference in New Issue