代码INIT,修改基本框架
This commit is contained in:
@@ -20,7 +20,7 @@ import java.util.List;
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-06-29
|
||||
*/
|
||||
@Controller
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-06-29
|
||||
*/
|
||||
@Controller
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.PathVariable;
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-06-30
|
||||
*/
|
||||
@Controller
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-07-08
|
||||
*/
|
||||
@Controller
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-06-28
|
||||
*/
|
||||
@Controller
|
||||
|
||||
@@ -32,7 +32,7 @@ import java.util.UUID;
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-06-28
|
||||
*/
|
||||
@Controller
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.List;
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-06-28
|
||||
*/
|
||||
@Controller
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-06-29
|
||||
*/
|
||||
@Controller
|
||||
|
||||
@@ -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链式操作
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository;
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-07-08
|
||||
*/
|
||||
@Repository
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-06-29
|
||||
*/
|
||||
@Service
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-06-29
|
||||
*/
|
||||
@Service
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-06-30
|
||||
*/
|
||||
@Service
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-07-08
|
||||
*/
|
||||
@Service
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-06-28
|
||||
*/
|
||||
@Service
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-06-28
|
||||
*/
|
||||
@Service
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-06-28
|
||||
*/
|
||||
@Service
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-07-01
|
||||
*/
|
||||
@Service
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-06-29
|
||||
*/
|
||||
@Service
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-06-28
|
||||
*/
|
||||
@Service
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.List;
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author 遇见狂神说
|
||||
* @author limqsh
|
||||
* @since 2020-06-28
|
||||
*/
|
||||
// UserDetailsService接口用于返回用户相关数据。
|
||||
|
||||
Reference in New Issue
Block a user