From 2d394d9b0b82d67681ebc8c81f09080e4ad0554c Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Tue, 14 Sep 2021 18:49:00 +0800
Subject: [PATCH] 版本更新

---
 src/main/java/org/springblade/modules/likes/mapper/LikesMapper.xml                 |   14 +
 src/main/java/org/springblade/modules/likes/entity/Likes.java                      |   48 +++
 src/main/java/org/springblade/modules/comment/mapper/CommentMapper.java            |   42 +++
 src/main/java/org/springblade/modules/comment/mapper/CommentMapper.xml             |   19 +
 src/main/java/org/springblade/modules/comment/entity/Comment.java                  |   48 +++
 src/main/java/org/springblade/modules/likes/controller/LikesController.java        |  136 +++++++++
 src/main/java/org/springblade/modules/likes/vo/LikesVO.java                        |   23 +
 src/main/java/org/springblade/modules/comment/service/ICommentService.java         |   40 ++
 src/main/java/org/springblade/modules/comment/service/impl/CommentServiceImpl.java |   42 +++
 src/main/java/org/springblade/modules/comment/vo/CommentVO.java                    |   36 ++
 src/main/java/org/springblade/modules/likes/wrapper/LikesWrapper.java              |   47 +++
 src/main/java/org/springblade/modules/likes/mapper/LikesMapper.java                |   42 +++
 src/main/java/org/springblade/modules/likes/service/impl/LikesServiceImpl.java     |   41 ++
 src/main/java/org/springblade/modules/likes/service/ILikesService.java             |   39 ++
 src/main/java/org/springblade/modules/comment/controller/CommentController.java    |  127 +++++++++
 src/main/java/org/springblade/modules/comment/wrapper/CommentWrapper.java          |   50 +++
 16 files changed, 794 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/springblade/modules/comment/controller/CommentController.java b/src/main/java/org/springblade/modules/comment/controller/CommentController.java
new file mode 100644
index 0000000..d3c5859
--- /dev/null
+++ b/src/main/java/org/springblade/modules/comment/controller/CommentController.java
@@ -0,0 +1,127 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.comment.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.comment.entity.Comment;
+import org.springblade.modules.comment.service.ICommentService;
+import org.springblade.modules.comment.vo.CommentVO;
+import org.springblade.modules.comment.wrapper.CommentWrapper;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+/**
+ *  控制器
+ *
+ * @author BladeX
+ * @since 2020-08-11
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("comment/comment")
+@Api(value = "", tags = "接口")
+public class CommentController extends BladeController {
+
+	private final ICommentService commentService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入survey")
+	public R<CommentVO> detail(Comment comment) {
+		Comment detail = commentService.getOne(Condition.getQueryWrapper(comment));
+		return R.data(CommentWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入survey")
+	public R<IPage<CommentVO>> list(Comment comment, Query query) {
+		IPage<Comment> pages = commentService.page(Condition.getPage(query), Condition.getQueryWrapper(comment));
+		return R.data(CommentWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入survey")
+	public R<IPage<CommentVO>> page(CommentVO comment, Query query) {
+		IPage<CommentVO> pages = commentService.selectSurveyPage(Condition.getPage(query), comment);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入survey")
+	public R save(@Valid @RequestBody Comment comment) {
+		return R.status(commentService.save(comment));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入survey")
+	public R update(@Valid @RequestBody Comment comment) {
+		return R.status(commentService.updateById(comment));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入survey")
+	public R submit(@Valid Comment comment) {
+		return R.status(commentService.saveOrUpdate(comment));
+	}
+
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(commentService.removeByIds(Func.toLongList(ids)));
+	}
+
+}
diff --git a/src/main/java/org/springblade/modules/comment/entity/Comment.java b/src/main/java/org/springblade/modules/comment/entity/Comment.java
new file mode 100644
index 0000000..28635f0
--- /dev/null
+++ b/src/main/java/org/springblade/modules/comment/entity/Comment.java
@@ -0,0 +1,48 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.comment.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2020-08-11
+ */
+@Data
+@TableName("sys_comment")
+@ApiModel(value = "Survey对象", description = "Survey对象")
+public class Comment implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	@TableId(value = "id", type = IdType.AUTO)
+	private Long id;
+
+	@ApiModelProperty(value = "人员名称")
+	private String name;
+
+
+}
diff --git a/src/main/java/org/springblade/modules/comment/mapper/CommentMapper.java b/src/main/java/org/springblade/modules/comment/mapper/CommentMapper.java
new file mode 100644
index 0000000..3049a29
--- /dev/null
+++ b/src/main/java/org/springblade/modules/comment/mapper/CommentMapper.java
@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.comment.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.comment.entity.Comment;
+import org.springblade.modules.comment.vo.CommentVO;
+
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2020-08-11
+ */
+public interface CommentMapper extends BaseMapper<Comment> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param ulikes
+	 * @return
+	 */
+	List<CommentVO> selectSurveyPage(IPage page, CommentVO ulikes);
+}
diff --git a/src/main/java/org/springblade/modules/comment/mapper/CommentMapper.xml b/src/main/java/org/springblade/modules/comment/mapper/CommentMapper.xml
new file mode 100644
index 0000000..e36445f
--- /dev/null
+++ b/src/main/java/org/springblade/modules/comment/mapper/CommentMapper.xml
@@ -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="org.springblade.modules.comment.mapper.CommentMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="ulikesResultMap" type="org.springblade.modules.comment.entity.Comment">
+        <id column="id" property="id"/>
+        <result column="name" property="name"/>
+        <result column="identityCard" property="identityCard"/>
+        <result column="ticketCode" property="ticketCode"/>
+    </resultMap>
+
+
+    <select id="selectSurveyPage" resultMap="ulikesResultMap">
+        select * from sys_ulikes
+    </select>
+
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/comment/service/ICommentService.java b/src/main/java/org/springblade/modules/comment/service/ICommentService.java
new file mode 100644
index 0000000..7aa2ecc
--- /dev/null
+++ b/src/main/java/org/springblade/modules/comment/service/ICommentService.java
@@ -0,0 +1,40 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.comment.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.comment.entity.Comment;
+import org.springblade.modules.comment.vo.CommentVO;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2020-08-11
+ */
+public interface ICommentService extends IService<Comment> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param comment
+	 * @return
+	 */
+	IPage<CommentVO> selectSurveyPage(IPage<CommentVO> page, CommentVO comment);
+}
diff --git a/src/main/java/org/springblade/modules/comment/service/impl/CommentServiceImpl.java b/src/main/java/org/springblade/modules/comment/service/impl/CommentServiceImpl.java
new file mode 100644
index 0000000..04ddf92
--- /dev/null
+++ b/src/main/java/org/springblade/modules/comment/service/impl/CommentServiceImpl.java
@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.comment.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.comment.entity.Comment;
+import org.springblade.modules.comment.mapper.CommentMapper;
+import org.springblade.modules.comment.service.ICommentService;
+import org.springblade.modules.comment.vo.CommentVO;
+import org.springframework.stereotype.Service;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2020-08-11
+ */
+@Service
+public class CommentServiceImpl extends ServiceImpl<CommentMapper, Comment> implements ICommentService {
+
+	@Override
+	public IPage<CommentVO> selectSurveyPage(IPage<CommentVO> page, CommentVO comment) {
+		return page.setRecords(baseMapper.selectSurveyPage(page, comment));
+	}
+
+
+}
diff --git a/src/main/java/org/springblade/modules/comment/vo/CommentVO.java b/src/main/java/org/springblade/modules/comment/vo/CommentVO.java
new file mode 100644
index 0000000..cd067c9
--- /dev/null
+++ b/src/main/java/org/springblade/modules/comment/vo/CommentVO.java
@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.comment.vo;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.comment.entity.Comment;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2020-08-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "SurveyVO对象", description = "SurveyVO对象")
+public class CommentVO extends Comment {
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/comment/wrapper/CommentWrapper.java b/src/main/java/org/springblade/modules/comment/wrapper/CommentWrapper.java
new file mode 100644
index 0000000..4705477
--- /dev/null
+++ b/src/main/java/org/springblade/modules/comment/wrapper/CommentWrapper.java
@@ -0,0 +1,50 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.comment.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.comment.entity.Comment;
+import org.springblade.modules.comment.vo.CommentVO;
+
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2020-08-11
+ */
+public class CommentWrapper extends BaseEntityWrapper<Comment, CommentVO> {
+
+	public static CommentWrapper build() {
+		return new CommentWrapper();
+ 	}
+
+	@Override
+	public CommentVO entityVO(Comment comment) {
+		CommentVO commentVO = Objects.requireNonNull(BeanUtil.copy(comment, CommentVO.class));
+
+		//User createUser = UserCache.getUser(comment.getCreateUser());
+		//User updateUser = UserCache.getUser(comment.getUpdateUser());
+		//commentVO.setCreateUserName(createUser.getName());
+		//commentVO.setUpdateUserName(updateUser.getName());
+
+		return commentVO;
+	}
+
+}
diff --git a/src/main/java/org/springblade/modules/likes/controller/LikesController.java b/src/main/java/org/springblade/modules/likes/controller/LikesController.java
new file mode 100644
index 0000000..aa16704
--- /dev/null
+++ b/src/main/java/org/springblade/modules/likes/controller/LikesController.java
@@ -0,0 +1,136 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright likes,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  likes, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.likes.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import com.github.xiaoymin.knife4j.annotations.ApiSort;
+import io.swagger.annotations.*;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.launch.constant.AppConstant;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tenant.annotation.TenantDS;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.likes.entity.Likes;
+import org.springblade.modules.likes.service.ILikesService;
+import org.springblade.modules.likes.vo.LikesVO;
+import org.springblade.modules.likes.wrapper.LikesWrapper;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.Map;
+
+/**
+ * 控制器
+ *
+ * @author Chill
+ */
+@TenantDS
+@RestController
+@RequestMapping("likes/likes")
+@AllArgsConstructor
+@ApiSort(2)
+public class LikesController extends BladeController {
+
+	private final ILikesService likesService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入likes")
+	public R<LikesVO> detail(Likes likes) {
+		Likes detail = likesService.getOne(Condition.getQueryWrapper(likes));
+		return R.data(LikesWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/list")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "category", value = "公告类型", paramType = "query", dataType = "integer"),
+		@ApiImplicitParam(name = "title", value = "公告标题", paramType = "query", dataType = "string")
+	})
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入likes")
+	public R<IPage<LikesVO>> list(@ApiIgnore @RequestParam Map<String, Object> likes, Query query) {
+		IPage<Likes> pages = likesService.page(Condition.getPage(query), Condition.getQueryWrapper(likes, Likes.class));
+		return R.data(LikesWrapper.build().pageVO(pages));
+	}
+
+	/**
+	 * 多表联合查询自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "category", value = "公告类型", paramType = "query", dataType = "integer"),
+		@ApiImplicitParam(name = "title", value = "公告标题", paramType = "query", dataType = "string")
+	})
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入likes")
+	public R<IPage<LikesVO>> page(@ApiIgnore LikesVO likes, Query query) {
+		IPage<LikesVO> pages = likesService.selectLikesPage(Condition.getPage(query), likes);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入likes")
+	public R save(@RequestBody Likes likes) {
+		return R.status(likesService.save(likes));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入likes")
+	public R update(@RequestBody Likes likes) {
+		return R.status(likesService.updateById(likes));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入likes")
+	public R submit(@RequestBody Likes likes) {
+		return R.status(likesService.saveOrUpdate(likes));
+	}
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入likes")
+	public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) {
+		boolean temp = likesService.removeByIds(Func.toLongList(ids));
+		return R.status(temp);
+	}
+
+}
diff --git a/src/main/java/org/springblade/modules/likes/entity/Likes.java b/src/main/java/org/springblade/modules/likes/entity/Likes.java
new file mode 100644
index 0000000..9f68759
--- /dev/null
+++ b/src/main/java/org/springblade/modules/likes/entity/Likes.java
@@ -0,0 +1,48 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.likes.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 实体类
+ *
+ * @author Chill
+ */
+@Data
+@TableName("sys_likes")
+public class Likes implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	@TableId(value = "id", type = IdType.AUTO)
+	private Integer id;
+
+	/**
+	 * 内容
+	 */
+	@ApiModelProperty(value = "内容")
+	private String content;
+
+
+}
diff --git a/src/main/java/org/springblade/modules/likes/mapper/LikesMapper.java b/src/main/java/org/springblade/modules/likes/mapper/LikesMapper.java
new file mode 100644
index 0000000..cd08aef
--- /dev/null
+++ b/src/main/java/org/springblade/modules/likes/mapper/LikesMapper.java
@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright likes,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  likes, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.likes.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.likes.entity.Likes;
+import org.springblade.modules.likes.vo.LikesVO;
+
+import java.util.List;
+
+/**
+ * Mapper 接口
+ *
+ * @author Chill
+ */
+public interface LikesMapper extends BaseMapper<Likes> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page   分页
+	 * @param likes 实体
+	 * @return List<LikesVO>
+	 */
+	List<LikesVO> selectLikesPage(IPage page, LikesVO likes);
+
+}
diff --git a/src/main/java/org/springblade/modules/likes/mapper/LikesMapper.xml b/src/main/java/org/springblade/modules/likes/mapper/LikesMapper.xml
new file mode 100644
index 0000000..84606a9
--- /dev/null
+++ b/src/main/java/org/springblade/modules/likes/mapper/LikesMapper.xml
@@ -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="org.springblade.modules.likes.mapper.LikesMapper">
+
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="likesVOResultMap" type="org.springblade.modules.likes.vo.LikesVO">
+
+    </resultMap>
+
+    <select id="selectLikesPage" resultMap="likesVOResultMap">
+        select * from sys_likes
+    </select>
+</mapper>
diff --git a/src/main/java/org/springblade/modules/likes/service/ILikesService.java b/src/main/java/org/springblade/modules/likes/service/ILikesService.java
new file mode 100644
index 0000000..8b96da3
--- /dev/null
+++ b/src/main/java/org/springblade/modules/likes/service/ILikesService.java
@@ -0,0 +1,39 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright likes,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  likes, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.likes.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.likes.entity.Likes;
+import org.springblade.modules.likes.vo.LikesVO;
+
+/**
+ * 服务类
+ *
+ * @author Chill
+ */
+public interface ILikesService extends IService<Likes> {
+
+	/**
+	 * 自定义分页
+	 * @param page
+	 * @param likes
+	 * @return
+	 */
+	IPage<LikesVO> selectLikesPage(IPage<LikesVO> page, LikesVO likes);
+
+}
diff --git a/src/main/java/org/springblade/modules/likes/service/impl/LikesServiceImpl.java b/src/main/java/org/springblade/modules/likes/service/impl/LikesServiceImpl.java
new file mode 100644
index 0000000..1e9e120
--- /dev/null
+++ b/src/main/java/org/springblade/modules/likes/service/impl/LikesServiceImpl.java
@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright likes,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  likes, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.likes.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.modules.likes.entity.Likes;
+import org.springblade.modules.likes.mapper.LikesMapper;
+import org.springblade.modules.likes.service.ILikesService;
+import org.springblade.modules.likes.vo.LikesVO;
+import org.springframework.stereotype.Service;
+
+/**
+ * 服务实现类
+ *
+ * @author Chill
+ */
+@Service
+public class LikesServiceImpl extends ServiceImpl<LikesMapper, Likes> implements ILikesService {
+
+	@Override
+	public IPage<LikesVO> selectLikesPage(IPage<LikesVO> page, LikesVO likes) {
+		return page.setRecords(baseMapper.selectLikesPage(page, likes));
+	}
+
+}
diff --git a/src/main/java/org/springblade/modules/likes/vo/LikesVO.java b/src/main/java/org/springblade/modules/likes/vo/LikesVO.java
new file mode 100644
index 0000000..ff56e5c
--- /dev/null
+++ b/src/main/java/org/springblade/modules/likes/vo/LikesVO.java
@@ -0,0 +1,23 @@
+package org.springblade.modules.likes.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.likes.entity.Likes;
+
+/**
+ * 通知公告视图类
+ *
+ * @author Chill
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class LikesVO extends Likes {
+
+	@ApiModelProperty(value = "通知类型名")
+	private String categoryName;
+
+	@ApiModelProperty(value = "租户编号")
+	private String tenantId;
+
+}
diff --git a/src/main/java/org/springblade/modules/likes/wrapper/LikesWrapper.java b/src/main/java/org/springblade/modules/likes/wrapper/LikesWrapper.java
new file mode 100644
index 0000000..87bf7fb
--- /dev/null
+++ b/src/main/java/org/springblade/modules/likes/wrapper/LikesWrapper.java
@@ -0,0 +1,47 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright likes,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  likes, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.likes.wrapper;
+
+import org.springblade.common.cache.DictCache;
+import org.springblade.common.enums.DictEnum;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.likes.entity.Likes;
+import org.springblade.modules.likes.vo.LikesVO;
+
+import java.util.Objects;
+
+/**
+ * Likes包装类,返回视图层所需的字段
+ *
+ * @author Chill
+ */
+public class LikesWrapper extends BaseEntityWrapper<Likes, LikesVO> {
+
+	public static LikesWrapper build() {
+		return new LikesWrapper();
+	}
+
+	@Override
+	public LikesVO entityVO(Likes likes) {
+		LikesVO likesVO = Objects.requireNonNull(BeanUtil.copy(likes, LikesVO.class));
+//		String dictValue = DictCache.getValue(DictEnum.NOTICE, likesVO.getCategory());
+//		likesVO.setCategoryName(dictValue);
+		return likesVO;
+	}
+
+}

--
Gitblit v1.9.3