duhongyu 1 ヶ月 前
コミット
010265fda4

+ 3 - 6
smart-steward-api/src/main/java/com/smartSteward/web/controller/generator/GenController.java

@@ -112,18 +112,16 @@ public class GenController extends BaseController
112 112
     /**
113 113
      * 导入表结构(保存)
114 114
      */
115
-    //@PreAuthorize("@ss.hasPermi('tool:gen:import')")
115
+    @PreAuthorize("@ss.hasPermi('tool:gen:import')")
116 116
     @Log(title = "代码生成", businessType = BusinessType.IMPORT)
117 117
     @PostMapping("/importTable")
118 118
     @ApiOperation("导入表结构(保存)")
119
-    @Anonymous
120 119
     public AjaxResult importTableSave(String tables)
121 120
     {
122 121
         String[] tableNames = Convert.toStrArray(tables);
123 122
         // 查询表信息
124 123
         List<GenTable> tableList = genTableService.selectDbTableListByNames(tableNames);
125
-        //genTableService.importGenTable(tableList, SecurityUtils.getUsername());
126
-        genTableService.importGenTable(tableList, "admin");
124
+        genTableService.importGenTable(tableList, SecurityUtils.getUsername());
127 125
         return success();
128 126
     }
129 127
 
@@ -215,11 +213,10 @@ public class GenController extends BaseController
215 213
     /**
216 214
      * 生成代码(自定义路径)
217 215
      */
218
-    //@PreAuthorize("@ss.hasPermi('tool:gen:code')")
216
+    @PreAuthorize("@ss.hasPermi('tool:gen:code')")
219 217
     @ApiOperation("代码生成")
220 218
     @Log(title = "代码生成", businessType = BusinessType.GENCODE)
221 219
     @GetMapping("/genCode/{tableName}")
222
-    @Anonymous
223 220
     public AjaxResult genCode(@PathVariable("tableName") String tableName)
224 221
     {
225 222
         if (!GenConfig.isAllowOverwrite())

+ 1 - 1
smart-steward-api/src/main/resources/application-dev.yml

@@ -47,7 +47,7 @@ spring:
47 47
                 allow:
48 48
                 url-pattern: /druid/*
49 49
                 # 控制台管理用户名和密码
50
-                login-username: smartSteward
50
+                login-username: admin
51 51
                 login-password: 123456
52 52
             filter:
53 53
                 stat:

+ 1 - 1
smart-steward-api/src/main/resources/application-production.yml

@@ -47,7 +47,7 @@ spring:
47 47
                 allow:
48 48
                 url-pattern: /druid/*
49 49
                 # 控制台管理用户名和密码
50
-                login-username: smartSteward
50
+                login-username: admin
51 51
                 login-password: 123456
52 52
             filter:
53 53
                 stat:

+ 0 - 1
smart-steward-service/src/main/java/com/smartSteward/service/generator/VelocityUtils.java

@@ -48,7 +48,6 @@ public class VelocityUtils
48 48
      */
49 49
     public static VelocityContext prepareContext(GenTable genTable)
50 50
     {
51
-        String moduleName = genTable.getModuleName();
52 51
         String businessName = genTable.getBusinessName();
53 52
         String packageName = genTable.getPackageName();
54 53
         String tplCategory = genTable.getTplCategory();

+ 0 - 2
smart-steward-service/src/main/java/com/smartSteward/service/generator/impl/GenTableServiceImpl.java

@@ -120,7 +120,6 @@ public class GenTableServiceImpl implements IGenTableService
120 120
      * 修改业务
121 121
      * 
122 122
      * @param genTable 业务信息
123
-     * @return 结果
124 123
      */
125 124
     @Override
126 125
     @Transactional
@@ -142,7 +141,6 @@ public class GenTableServiceImpl implements IGenTableService
142 141
      * 删除业务对象
143 142
      * 
144 143
      * @param tableIds 需要删除的数据ID
145
-     * @return 结果
146 144
      */
147 145
     @Override
148 146
     @Transactional