Browse Source

修复bug

= 8 years ago
parent
commit
1ed4891f76

+ 57 - 0
mybatis-plus/D:/mybatis-plus/com/baomidou/entity/AbcUser.java

@@ -0,0 +1,57 @@
+package com.baomidou.entity;
+
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotations.IdType;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+
+/**
+ *
+ * 
+ *
+ */
+@TableName("abc_user")
+public class AbcUser implements Serializable {
+
+	@TableField(exist = false)
+	private static final long serialVersionUID = 1L;
+
+	/**  */
+	@TableId(type = IdType.AUTO)
+	private Integer id;
+
+	/**  */
+	private String order;
+
+	/**  */
+	private Integer uid;
+
+
+	public Integer getId() {
+		return this.id;
+	}
+
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	public String getOrder() {
+		return this.order;
+	}
+
+	public void setOrder(String order) {
+		this.order = order;
+	}
+
+	public Integer getUid() {
+		return this.uid;
+	}
+
+	public void setUid(Integer uid) {
+		this.uid = uid;
+	}
+
+}

+ 66 - 0
mybatis-plus/D:/mybatis-plus/com/baomidou/entity/Role.java

@@ -0,0 +1,66 @@
+package com.baomidou.entity;
+
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotations.IdType;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+
+/**
+ *
+ * 
+ *
+ */
+public class Role implements Serializable {
+
+	@TableField(exist = false)
+	private static final long serialVersionUID = 1L;
+
+	/**  */
+	@TableId(type = IdType.AUTO)
+	private Long id;
+
+	/**  */
+	private String name;
+
+	/**  */
+	private Integer sort;
+
+	/**  */
+	private String description;
+
+
+	public Long getId() {
+		return this.id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Integer getSort() {
+		return this.sort;
+	}
+
+	public void setSort(Integer sort) {
+		this.sort = sort;
+	}
+
+	public String getDescription() {
+		return this.description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+}

+ 89 - 0
mybatis-plus/D:/mybatis-plus/com/baomidou/entity/User.java

@@ -0,0 +1,89 @@
+package com.baomidou.entity;
+
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotations.IdType;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+
+/**
+ *
+ * 用户表
+ *
+ */
+public class User implements Serializable {
+
+	@TableField(exist = false)
+	private static final long serialVersionUID = 1L;
+
+	/** 主键ID */
+	@TableId(value = "test_id", type = IdType.AUTO)
+	private Long testId;
+
+	/** 名称 */
+	private String name;
+
+	/** 年龄 */
+	private Integer age;
+
+	/** 测试下划线字段命名类型 */
+	@TableField(value = "test_type")
+	private Integer testType;
+
+	/**  */
+	private Long role;
+
+	/**  */
+	private String phone;
+
+
+	public Long getTestId() {
+		return this.testId;
+	}
+
+	public void setTestId(Long testId) {
+		this.testId = testId;
+	}
+
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Integer getAge() {
+		return this.age;
+	}
+
+	public void setAge(Integer age) {
+		this.age = age;
+	}
+
+	public Integer getTestType() {
+		return this.testType;
+	}
+
+	public void setTestType(Integer testType) {
+		this.testType = testType;
+	}
+
+	public Long getRole() {
+		return this.role;
+	}
+
+	public void setRole(Long role) {
+		this.role = role;
+	}
+
+	public String getPhone() {
+		return this.phone;
+	}
+
+	public void setPhone(String phone) {
+		this.phone = phone;
+	}
+
+}

+ 14 - 0
mybatis-plus/D:/mybatis-plus/com/baomidou/mapper/AbcUserMapper.java

@@ -0,0 +1,14 @@
+package com.baomidou.mapper;
+
+import com.baomidou.entity.AbcUser;
+import com.baomidou.mybatisplus.mapper.AutoMapper;
+
+/**
+ *
+ * AbcUser 表数据库控制层接口
+ *
+ */
+public interface AbcUserMapper extends AutoMapper<AbcUser> {
+
+
+}

+ 14 - 0
mybatis-plus/D:/mybatis-plus/com/baomidou/mapper/RoleMapper.java

@@ -0,0 +1,14 @@
+package com.baomidou.mapper;
+
+import com.baomidou.entity.Role;
+import com.baomidou.mybatisplus.mapper.AutoMapper;
+
+/**
+ *
+ * Role 表数据库控制层接口
+ *
+ */
+public interface RoleMapper extends AutoMapper<Role> {
+
+
+}

+ 14 - 0
mybatis-plus/D:/mybatis-plus/com/baomidou/mapper/UserMapper.java

@@ -0,0 +1,14 @@
+package com.baomidou.mapper;
+
+import com.baomidou.entity.User;
+import com.baomidou.mybatisplus.mapper.AutoMapper;
+
+/**
+ *
+ * User 表数据库控制层接口
+ *
+ */
+public interface UserMapper extends AutoMapper<User> {
+
+
+}

+ 10 - 0
mybatis-plus/D:/mybatis-plus/com/baomidou/mapper/xml/AbcUserMapper.xml

@@ -0,0 +1,10 @@
+<?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="com.baomidou.mapper.AbcUserMapper">
+
+	<!-- 通用查询结果列-->
+	<sql id="Base_Column_List">
+		id, `order`, uid
+	</sql>
+
+</mapper>

+ 10 - 0
mybatis-plus/D:/mybatis-plus/com/baomidou/mapper/xml/RoleMapper.xml

@@ -0,0 +1,10 @@
+<?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="com.baomidou.mapper.RoleMapper">
+
+	<!-- 通用查询结果列-->
+	<sql id="Base_Column_List">
+		id, name, sort, description
+	</sql>
+
+</mapper>

+ 10 - 0
mybatis-plus/D:/mybatis-plus/com/baomidou/mapper/xml/UserMapper.xml

@@ -0,0 +1,10 @@
+<?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="com.baomidou.mapper.UserMapper">
+
+	<!-- 通用查询结果列-->
+	<sql id="Base_Column_List">
+		test_id AS testId, name, age, test_type AS testType, role, phone
+	</sql>
+
+</mapper>

+ 14 - 0
mybatis-plus/D:/mybatis-plus/com/baomidou/service/IAbcUserService.java

@@ -0,0 +1,14 @@
+package com.baomidou.service;
+
+import com.baomidou.entity.AbcUser;
+import com.baomidou.framework.service.ISuperService;
+
+/**
+ *
+ * AbcUser 表数据服务层接口
+ *
+ */
+public interface IAbcUserService extends ISuperService<AbcUser> {
+
+
+}

+ 14 - 0
mybatis-plus/D:/mybatis-plus/com/baomidou/service/IRoleService.java

@@ -0,0 +1,14 @@
+package com.baomidou.service;
+
+import com.baomidou.entity.Role;
+import com.baomidou.framework.service.ISuperService;
+
+/**
+ *
+ * Role 表数据服务层接口
+ *
+ */
+public interface IRoleService extends ISuperService<Role> {
+
+
+}

+ 14 - 0
mybatis-plus/D:/mybatis-plus/com/baomidou/service/IUserService.java

@@ -0,0 +1,14 @@
+package com.baomidou.service;
+
+import com.baomidou.entity.User;
+import com.baomidou.framework.service.ISuperService;
+
+/**
+ *
+ * User 表数据服务层接口
+ *
+ */
+public interface IUserService extends ISuperService<User> {
+
+
+}

+ 19 - 0
mybatis-plus/D:/mybatis-plus/com/baomidou/service/impl/AbcUserServiceImpl.java

@@ -0,0 +1,19 @@
+package com.baomidou.service.impl;
+
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mapper.AbcUserMapper;
+import com.baomidou.entity.AbcUser;
+import com.baomidou.service.IAbcUserService;
+import com.baomidou.framework.service.impl.SuperServiceImpl;
+
+/**
+ *
+ * AbcUser 表数据服务层接口实现类
+ *
+ */
+@Service
+public class AbcUserServiceImpl extends SuperServiceImpl<AbcUserMapper, AbcUser> implements IAbcUserService {
+
+
+}

+ 19 - 0
mybatis-plus/D:/mybatis-plus/com/baomidou/service/impl/RoleServiceImpl.java

@@ -0,0 +1,19 @@
+package com.baomidou.service.impl;
+
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mapper.RoleMapper;
+import com.baomidou.entity.Role;
+import com.baomidou.service.IRoleService;
+import com.baomidou.framework.service.impl.SuperServiceImpl;
+
+/**
+ *
+ * Role 表数据服务层接口实现类
+ *
+ */
+@Service
+public class RoleServiceImpl extends SuperServiceImpl<RoleMapper, Role> implements IRoleService {
+
+
+}

+ 19 - 0
mybatis-plus/D:/mybatis-plus/com/baomidou/service/impl/UserServiceImpl.java

@@ -0,0 +1,19 @@
+package com.baomidou.service.impl;
+
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mapper.UserMapper;
+import com.baomidou.entity.User;
+import com.baomidou.service.IUserService;
+import com.baomidou.framework.service.impl.SuperServiceImpl;
+
+/**
+ *
+ * User 表数据服务层接口实现类
+ *
+ */
+@Service
+public class UserServiceImpl extends SuperServiceImpl<UserMapper, User> implements IUserService {
+
+
+}

+ 1 - 1
mybatis-plus/src/main/java/com/baomidou/mybatisplus/generator/AutoGenerator.java

@@ -818,7 +818,7 @@ public class AutoGenerator {
 			throws IOException {
 		File serviceFile = new File(PATH_SERVICE_IMPL, serviceImplName + ".java");
 		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(serviceFile), "utf-8"));
-		bw.write("package " + config.getServicePackage() + ".impl;");
+		bw.write("package " + config.getServiceImplPackage() + ";");
 		bw.newLine();
 		bw.newLine();
 		bw.write("import org.springframework.stereotype.Service;");