Althars123 4 anni fa
parent
commit
18adb58b55

+ 19 - 11
hzgzpt-admin/src/main/java/com/miaxis/app/controller/test/TestTableController.java

@@ -1,25 +1,32 @@
 package com.miaxis.app.controller.test;
 
-import com.miaxis.app.test.domain.TestTable;
-import com.miaxis.app.test.service.ITestTableService;
+import java.util.List;
+import io.swagger.annotations.*;
+import com.miaxis.common.core.domain.Response;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.ModelAttribute;
 import com.miaxis.common.annotation.Log;
 import com.miaxis.common.core.controller.BaseController;
-import com.miaxis.common.core.domain.Response;
-import com.miaxis.common.core.page.ResponsePageInfo;
 import com.miaxis.common.enums.BusinessTypeEnum;
+import com.miaxis.app.test.domain.TestTable;
+import com.miaxis.app.test.service.ITestTableService;
 import com.miaxis.common.utils.poi.ExcelUtil;
-import io.swagger.annotations.*;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
+import com.miaxis.common.core.page.ResponsePageInfo;
 
 /**
  * 【测试表】Controller
  *
  * @author miaxis
- * @date 2020-12-21
+ * @date 2020-12-22
  */
 @RestController
 @RequestMapping("/test/table")
@@ -39,6 +46,7 @@ public class TestTableController extends BaseController{
             @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
     })
     public ResponsePageInfo<TestTable> list(@ModelAttribute TestTable testTable){
+        startPage();
         List<TestTable> list = testTableService.selectTestTableList(testTable);
         return toResponsePageInfo(list);
     }

+ 8 - 7
hzgzpt-generator/src/main/resources/vm/java/mapper.java.vm

@@ -1,18 +1,19 @@
 package ${packageName}.mapper;
 
 import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import ${packageName}.domain.${ClassName};
 
 /**
  * ${functionName}Mapper接口
- * 
+ *
  * @author ${author}
  * @date ${datetime}
  */
 public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> {
     /**
      * 查询${functionName}
-     * 
+     *
      * @param ${pkColumn.javaField} ${functionName}ID
      * @return ${functionName}
      */
@@ -20,7 +21,7 @@ public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> {
 
     /**
      * 查询${functionName}列表
-     * 
+     *
      * @param ${className} ${functionName}
      * @return ${functionName}集合
      */
@@ -28,7 +29,7 @@ public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> {
 
     /**
      * 新增${functionName}
-     * 
+     *
      * @param ${className} ${functionName}
      * @return 结果
      */
@@ -36,7 +37,7 @@ public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> {
 
     /**
      * 修改${functionName}
-     * 
+     *
      * @param ${className} ${functionName}
      * @return 结果
      */
@@ -44,7 +45,7 @@ public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> {
 
     /**
      * 删除${functionName}
-     * 
+     *
      * @param ${pkColumn.javaField} ${functionName}ID
      * @return 结果
      */
@@ -52,7 +53,7 @@ public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> {
 
     /**
      * 批量删除${functionName}
-     * 
+     *
      * @param ${pkColumn.javaField}s 需要删除的数据ID
      * @return 结果
      */

+ 3 - 3
hzgzpt-service-app/src/main/java/com/miaxis/app/test/domain/TestTable.java

@@ -15,7 +15,7 @@ import lombok.Data;
  * 测试表对象 test_table
  *
  * @author miaxis
- * @date 2020-12-21
+ * @date 2020-12-22
  */
 @Data
 @TableName("test_table")
@@ -23,9 +23,9 @@ import lombok.Data;
 public class TestTable extends BaseEntity{
     private static final long serialVersionUID = 1L;
 
-    /** 主键 */
+    /**  我是id */
     @TableId(value = "id")
-    @ApiModelProperty(value = "主键")
+    @ApiModelProperty(value = " 我是id")
     private Long id;
 
     /** 名称 */

+ 8 - 8
hzgzpt-service-app/src/main/java/com/miaxis/app/test/mapper/TestTableMapper.java

@@ -7,14 +7,14 @@ import com.miaxis.app.test.domain.TestTable;
 
 /**
  * 测试表Mapper接口
- * 
+ *
  * @author miaxis
- * @date 2020-12-21
+ * @date 2020-12-22
  */
 public interface TestTableMapper extends BaseMapper<TestTable> {
     /**
      * 查询测试表
-     * 
+     *
      * @param id 测试表ID
      * @return 测试表
      */
@@ -22,7 +22,7 @@ public interface TestTableMapper extends BaseMapper<TestTable> {
 
     /**
      * 查询测试表列表
-     * 
+     *
      * @param testTable 测试表
      * @return 测试表集合
      */
@@ -30,7 +30,7 @@ public interface TestTableMapper extends BaseMapper<TestTable> {
 
     /**
      * 新增测试表
-     * 
+     *
      * @param testTable 测试表
      * @return 结果
      */
@@ -38,7 +38,7 @@ public interface TestTableMapper extends BaseMapper<TestTable> {
 
     /**
      * 修改测试表
-     * 
+     *
      * @param testTable 测试表
      * @return 结果
      */
@@ -46,7 +46,7 @@ public interface TestTableMapper extends BaseMapper<TestTable> {
 
     /**
      * 删除测试表
-     * 
+     *
      * @param id 测试表ID
      * @return 结果
      */
@@ -54,7 +54,7 @@ public interface TestTableMapper extends BaseMapper<TestTable> {
 
     /**
      * 批量删除测试表
-     * 
+     *
      * @param ids 需要删除的数据ID
      * @return 结果
      */

+ 1 - 1
hzgzpt-service-app/src/main/java/com/miaxis/app/test/service/ITestTableService.java

@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * 测试表Service接口
  * 
  * @author miaxis
- * @date 2020-12-21
+ * @date 2020-12-22
  */
 public interface ITestTableService extends IService<TestTable>{
     /**

+ 9 - 8
hzgzpt-service-app/src/main/java/com/miaxis/app/test/service/impl/TestTableServiceImpl.java

@@ -4,6 +4,7 @@ import java.util.List;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.miaxis.common.utils.DateUtils;
+import com.miaxis.common.utils.SecurityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.miaxis.app.test.mapper.TestTableMapper;
@@ -12,9 +13,9 @@ import com.miaxis.app.test.service.ITestTableService;
 
 /**
  * 测试表Service业务层处理
- * 
+ *
  * @author miaxis
- * @date 2020-12-21
+ * @date 2020-12-22
  */
 @Service
 public class TestTableServiceImpl extends ServiceImpl<TestTableMapper, TestTable> implements ITestTableService {
@@ -23,7 +24,7 @@ public class TestTableServiceImpl extends ServiceImpl<TestTableMapper, TestTable
 
     /**
      * 查询测试表
-     * 
+     *
      * @param id 测试表ID
      * @return 测试表
      */
@@ -34,7 +35,7 @@ public class TestTableServiceImpl extends ServiceImpl<TestTableMapper, TestTable
 
     /**
      * 查询测试表列表
-     * 
+     *
      * @param testTable 测试表
      * @return 测试表
      */
@@ -45,7 +46,7 @@ public class TestTableServiceImpl extends ServiceImpl<TestTableMapper, TestTable
 
     /**
      * 新增测试表
-     * 
+     *
      * @param testTable 测试表
      * @return 结果
      */
@@ -57,7 +58,7 @@ public class TestTableServiceImpl extends ServiceImpl<TestTableMapper, TestTable
 
     /**
      * 修改测试表
-     * 
+     *
      * @param testTable 测试表
      * @return 结果
      */
@@ -69,7 +70,7 @@ public class TestTableServiceImpl extends ServiceImpl<TestTableMapper, TestTable
 
     /**
      * 批量删除测试表
-     * 
+     *
      * @param ids 需要删除的测试表ID
      * @return 结果
      */
@@ -80,7 +81,7 @@ public class TestTableServiceImpl extends ServiceImpl<TestTableMapper, TestTable
 
     /**
      * 删除测试表信息
-     * 
+     *
      * @param id 测试表ID
      * @return 结果
      */