代码INIT,修改基本框架

This commit is contained in:
limqhz
2022-05-01 22:41:10 +08:00
parent 3fdb3799ff
commit 5e12c34a3d
63 changed files with 189 additions and 119 deletions

View File

@@ -20,7 +20,7 @@ import java.util.List;
* 前端控制器
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-29
*/
@Controller

View File

@@ -23,7 +23,7 @@ import java.util.List;
* 前端控制器
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-29
*/
@Controller

View File

@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.PathVariable;
* 前端控制器
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-30
*/
@Controller

View File

@@ -15,7 +15,7 @@ import java.util.List;
* 前端控制器
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-07-08
*/
@Controller

View File

@@ -19,7 +19,7 @@ import java.util.List;
* 前端控制器
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
@Controller

View File

@@ -32,7 +32,7 @@ import java.util.UUID;
* 前端控制器
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
@Controller

View File

@@ -28,7 +28,7 @@ import java.util.List;
* 前端控制器
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
@Controller

View File

@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.*;
* 前端控制器
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-29
*/
@Controller

View File

@@ -20,7 +20,7 @@ public class CodeGenerator {
GlobalConfig gc = new GlobalConfig();
String projectPath = System.getProperty("user.dir");
gc.setOutputDir(projectPath + "/src/main/java");
gc.setAuthor("遇见狂神说");
gc.setAuthor("limqsh");
gc.setOpen(false); //生成后是否打开资源管理器
gc.setFileOverride(false); //重新生成时文件是否覆盖
gc.setServiceName("%sService"); //去掉Service接口的首字母I
@@ -51,10 +51,9 @@ public class CodeGenerator {
// 5、策略配置
StrategyConfig strategy = new StrategyConfig();
//strategy.setInclude("ks_\\w*");//设置要映射的表名
strategy.setInclude("ks_download");//设置要映射的表名
strategy.setInclude("qn_about");//设置要映射的表名
strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略
strategy.setTablePrefix("ks_");//设置表前缀不生成
strategy.setTablePrefix("qn_");//设置表前缀不生成
strategy.setColumnNaming(NamingStrategy.underline_to_camel);//数据库表字段映射到实体的命名策略
strategy.setEntityLombokModel(true); // lombok 模型 @Accessors(chain = true) setter链式操作

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* Mapper 接口
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-29
*/
public interface BlogCategoryMapper extends BaseMapper<BlogCategory> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* Mapper 接口
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-29
*/
public interface BlogMapper extends BaseMapper<Blog> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* Mapper 接口
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-30
*/
public interface CommentMapper extends BaseMapper<Comment> {

View File

@@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository;
* Mapper 接口
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-07-08
*/
@Repository

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* Mapper 接口
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
public interface InviteMapper extends BaseMapper<Invite> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* Mapper 接口
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
public interface QuestionCategoryMapper extends BaseMapper<QuestionCategory> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* Mapper 接口
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
public interface QuestionMapper extends BaseMapper<Question> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* Mapper 接口
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-07-01
*/
public interface SayMapper extends BaseMapper<Say> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* Mapper 接口
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-29
*/
public interface UserInfoMapper extends BaseMapper<UserInfo> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* Mapper 接口
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
public interface UserMapper extends BaseMapper<User> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* Mapper 接口
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
public interface UserRoleMapper extends BaseMapper<UserRole> {

View File

@@ -16,13 +16,13 @@ import lombok.experimental.Accessors;
*
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-29
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ks_blog")
@TableName("qn_blog")
@ApiModel(value="Blog对象", description="")
public class Blog implements Serializable {

View File

@@ -15,13 +15,13 @@ import lombok.experimental.Accessors;
*
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-29
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ks_blog_category")
@TableName("qn_blog_category")
@ApiModel(value="BlogCategory对象", description="")
public class BlogCategory implements Serializable {

View File

@@ -16,13 +16,13 @@ import lombok.experimental.Accessors;
*
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ks_comment")
@TableName("qn_comment")
@ApiModel(value="Comment对象", description="")
public class Comment implements Serializable {

View File

@@ -14,13 +14,13 @@ import lombok.experimental.Accessors;
*
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-07-08
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ks_download")
@TableName("qn_download")
@ApiModel(value="Download对象", description="")
public class Download implements Serializable {

View File

@@ -12,13 +12,13 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ks_invite")
@TableName("qn_invite")
@ApiModel(value="Invite邀请码", description="邀请码")
public class Invite implements Serializable {

View File

@@ -16,13 +16,13 @@ import lombok.experimental.Accessors;
*
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ks_question")
@TableName("qn_question")
@ApiModel(value="Question对象", description="")
public class Question implements Serializable {

View File

@@ -15,13 +15,13 @@ import lombok.experimental.Accessors;
*
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ks_question_category")
@TableName("qn_question_category")
@ApiModel(value="QuestionCategory对象", description="")
public class QuestionCategory implements Serializable {

View File

@@ -16,13 +16,13 @@ import lombok.experimental.Accessors;
*
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-07-01
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ks_say")
@TableName("qn_say")
@ApiModel(value="Say对象", description="")
public class Say implements Serializable {

View File

@@ -16,13 +16,13 @@ import lombok.experimental.Accessors;
*
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ks_user")
@TableName("qn_user")
@ApiModel(value="User对象", description="")
public class User implements Serializable {

View File

@@ -15,13 +15,13 @@ import lombok.experimental.Accessors;
*
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-29
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ks_user_info")
@TableName("qn_user_info")
@ApiModel(value="UserInfo对象", description="")
public class UserInfo implements Serializable {

View File

@@ -16,13 +16,13 @@ import lombok.experimental.Accessors;
*
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ks_user_role")
@TableName("qn_user_role")
@ApiModel(value="UserRole对象", description="")
public class UserRole implements Serializable {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* 服务类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-29
*/
public interface BlogCategoryService extends IService<BlogCategory> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* 服务类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-29
*/
public interface BlogService extends IService<Blog> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* 服务类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-30
*/
public interface CommentService extends IService<Comment> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* 服务类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-07-08
*/
public interface DownloadService extends IService<Download> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* 服务类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
public interface InviteService extends IService<Invite> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* 服务类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
public interface QuestionCategoryService extends IService<QuestionCategory> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* 服务类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
public interface QuestionService extends IService<Question> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* 服务类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-07-01
*/
public interface SayService extends IService<Say> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* 服务类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-29
*/
public interface UserInfoService extends IService<UserInfo> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* 服务类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
public interface UserRoleService extends IService<UserRole> {

View File

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* 服务类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
public interface UserService extends IService<User> {

View File

@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
* 服务实现类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-29
*/
@Service

View File

@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
* 服务实现类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-29
*/
@Service

View File

@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
* 服务实现类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-30
*/
@Service

View File

@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
* 服务实现类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-07-08
*/
@Service

View File

@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
* 服务实现类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
@Service

View File

@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
* 服务实现类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
@Service

View File

@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
* 服务实现类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
@Service

View File

@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
* 服务实现类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-07-01
*/
@Service

View File

@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
* 服务实现类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-29
*/
@Service

View File

@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
* 服务实现类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
@Service

View File

@@ -25,7 +25,7 @@ import java.util.List;
* 服务实现类
* </p>
*
* @author 遇见狂神说
* @author limqsh
* @since 2020-06-28
*/
// UserDetailsService接口用于返回用户相关数据。