Commit 070cc0ba945180d5f37dd29a6219544207f6e46d
1 parent
ffd53821
生成代码返回结果泛型支持问题处理
Showing
8 changed files
with
71 additions
and
65 deletions
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/controller/${entityName}Controller.javai
... | ... | @@ -149,7 +149,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
149 | 149 | public Result<${entityName}> queryById(@RequestParam(name="id",required=true) String id) { |
150 | 150 | ${entityName} ${entityName?uncap_first} = ${entityName?uncap_first}Service.getById(id); |
151 | 151 | if(${entityName?uncap_first}==null) { |
152 | - return Result.error("未找到对应数据",null); | |
152 | + return Result.error("未找到对应数据"); | |
153 | 153 | } |
154 | 154 | return Result.OK(${entityName?uncap_first}); |
155 | 155 | } |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/onetomany/java/${bussiPackage}/${entityPackage}/controller/${entityName}Controller.javai
... | ... | @@ -79,10 +79,10 @@ public class ${entityName}Controller { |
79 | 79 | * @param req |
80 | 80 | * @return |
81 | 81 | */ |
82 | - @AutoLog(value = "${tableVo.ftlDescription}-分页列表查询") | |
82 | + //@AutoLog(value = "${tableVo.ftlDescription}-分页列表查询") | |
83 | 83 | @ApiOperation(value="${tableVo.ftlDescription}-分页列表查询", notes="${tableVo.ftlDescription}-分页列表查询") |
84 | 84 | @GetMapping(value = "/list") |
85 | - public Result<?> queryPageList(${entityName} ${entityName?uncap_first}, | |
85 | + public Result<IPage<${entityName}>> queryPageList(${entityName} ${entityName?uncap_first}, | |
86 | 86 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
87 | 87 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
88 | 88 | HttpServletRequest req) { |
... | ... | @@ -101,7 +101,7 @@ public class ${entityName}Controller { |
101 | 101 | @AutoLog(value = "${tableVo.ftlDescription}-添加") |
102 | 102 | @ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加") |
103 | 103 | @PostMapping(value = "/add") |
104 | - public Result<?> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) { | |
104 | + public Result<String> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) { | |
105 | 105 | ${entityName} ${entityName?uncap_first} = new ${entityName}(); |
106 | 106 | BeanUtils.copyProperties(${entityName?uncap_first}Page, ${entityName?uncap_first}); |
107 | 107 | <#if bpm_flag> |
... | ... | @@ -120,7 +120,7 @@ public class ${entityName}Controller { |
120 | 120 | @AutoLog(value = "${tableVo.ftlDescription}-编辑") |
121 | 121 | @ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑") |
122 | 122 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
123 | - public Result<?> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) { | |
123 | + public Result<String> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) { | |
124 | 124 | ${entityName} ${entityName?uncap_first} = new ${entityName}(); |
125 | 125 | BeanUtils.copyProperties(${entityName?uncap_first}Page, ${entityName?uncap_first}); |
126 | 126 | ${entityName} ${entityName?uncap_first}Entity = ${entityName?uncap_first}Service.getById(${entityName?uncap_first}.getId()); |
... | ... | @@ -140,7 +140,7 @@ public class ${entityName}Controller { |
140 | 140 | @AutoLog(value = "${tableVo.ftlDescription}-通过id删除") |
141 | 141 | @ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除") |
142 | 142 | @DeleteMapping(value = "/delete") |
143 | - public Result<?> delete(@RequestParam(name="id",required=true) String id) { | |
143 | + public Result<String> delete(@RequestParam(name="id",required=true) String id) { | |
144 | 144 | ${entityName?uncap_first}Service.delMain(id); |
145 | 145 | return Result.OK("删除成功!"); |
146 | 146 | } |
... | ... | @@ -154,7 +154,7 @@ public class ${entityName}Controller { |
154 | 154 | @AutoLog(value = "${tableVo.ftlDescription}-批量删除") |
155 | 155 | @ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除") |
156 | 156 | @DeleteMapping(value = "/deleteBatch") |
157 | - public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |
157 | + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |
158 | 158 | this.${entityName?uncap_first}Service.delBatchMain(Arrays.asList(ids.split(","))); |
159 | 159 | return Result.OK("批量删除成功!"); |
160 | 160 | } |
... | ... | @@ -165,10 +165,10 @@ public class ${entityName}Controller { |
165 | 165 | * @param id |
166 | 166 | * @return |
167 | 167 | */ |
168 | - @AutoLog(value = "${tableVo.ftlDescription}-通过id查询") | |
168 | + //@AutoLog(value = "${tableVo.ftlDescription}-通过id查询") | |
169 | 169 | @ApiOperation(value="${tableVo.ftlDescription}-通过id查询", notes="${tableVo.ftlDescription}-通过id查询") |
170 | 170 | @GetMapping(value = "/queryById") |
171 | - public Result<?> queryById(@RequestParam(name="id",required=true) String id) { | |
171 | + public Result<${entityName}> queryById(@RequestParam(name="id",required=true) String id) { | |
172 | 172 | ${entityName} ${entityName?uncap_first} = ${entityName?uncap_first}Service.getById(id); |
173 | 173 | if(${entityName?uncap_first}==null) { |
174 | 174 | return Result.error("未找到对应数据"); |
... | ... | @@ -184,10 +184,10 @@ public class ${entityName}Controller { |
184 | 184 | * @param id |
185 | 185 | * @return |
186 | 186 | */ |
187 | - @AutoLog(value = "${sub.ftlDescription}通过主表ID查询") | |
187 | + //@AutoLog(value = "${sub.ftlDescription}通过主表ID查询") | |
188 | 188 | @ApiOperation(value="${sub.ftlDescription}主表ID查询", notes="${sub.ftlDescription}-通主表ID查询") |
189 | 189 | @GetMapping(value = "/query${sub.entityName}ByMainId") |
190 | - public Result<?> query${sub.entityName}ListByMainId(@RequestParam(name="id",required=true) String id) { | |
190 | + public Result<List<${sub.entityName}>> query${sub.entityName}ListByMainId(@RequestParam(name="id",required=true) String id) { | |
191 | 191 | List<${sub.entityName}> ${sub.entityName?uncap_first}List = ${sub.entityName?uncap_first}Service.selectByMainId(id); |
192 | 192 | return Result.OK(${sub.entityName?uncap_first}List); |
193 | 193 | } |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/controller/${entityName}Controller.javai
... | ... | @@ -65,10 +65,10 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
65 | 65 | * @param req |
66 | 66 | * @return |
67 | 67 | */ |
68 | - @AutoLog(value = "${tableVo.ftlDescription}-分页列表查询") | |
68 | + //@AutoLog(value = "${tableVo.ftlDescription}-分页列表查询") | |
69 | 69 | @ApiOperation(value="${tableVo.ftlDescription}-分页列表查询", notes="${tableVo.ftlDescription}-分页列表查询") |
70 | 70 | @GetMapping(value = "/rootList") |
71 | - public Result<?> queryPageList(${entityName} ${entityName?uncap_first}, | |
71 | + public Result<IPage<${entityName}>> queryPageList(${entityName} ${entityName?uncap_first}, | |
72 | 72 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
73 | 73 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
74 | 74 | HttpServletRequest req) { |
... | ... | @@ -100,10 +100,10 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
100 | 100 | * @param req |
101 | 101 | * @return |
102 | 102 | */ |
103 | - @AutoLog(value = "${tableVo.ftlDescription}-获取子数据") | |
103 | + //@AutoLog(value = "${tableVo.ftlDescription}-获取子数据") | |
104 | 104 | @ApiOperation(value="${tableVo.ftlDescription}-获取子数据", notes="${tableVo.ftlDescription}-获取子数据") |
105 | 105 | @GetMapping(value = "/childList") |
106 | - public Result<?> queryPageList(${entityName} ${entityName?uncap_first},HttpServletRequest req) { | |
106 | + public Result<IPage<${entityName}>> queryPageList(${entityName} ${entityName?uncap_first},HttpServletRequest req) { | |
107 | 107 | QueryWrapper<${entityName}> queryWrapper = QueryGenerator.initQueryWrapper(${entityName?uncap_first}, req.getParameterMap()); |
108 | 108 | List<${entityName}> list = ${entityName?uncap_first}Service.list(queryWrapper); |
109 | 109 | IPage<${entityName}> pageList = new Page<>(1, 10, list.size()); |
... | ... | @@ -118,7 +118,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
118 | 118 | * @param parentIds |
119 | 119 | * @return |
120 | 120 | */ |
121 | - @AutoLog(value = "${tableVo.ftlDescription}-批量获取子数据") | |
121 | + //@AutoLog(value = "${tableVo.ftlDescription}-批量获取子数据") | |
122 | 122 | @ApiOperation(value="${tableVo.ftlDescription}-批量获取子数据", notes="${tableVo.ftlDescription}-批量获取子数据") |
123 | 123 | @GetMapping("/getChildListBatch") |
124 | 124 | public Result getChildListBatch(@RequestParam("parentIds") String parentIds) { |
... | ... | @@ -145,7 +145,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
145 | 145 | @AutoLog(value = "${tableVo.ftlDescription}-添加") |
146 | 146 | @ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加") |
147 | 147 | @PostMapping(value = "/add") |
148 | - public Result<?> add(@RequestBody ${entityName} ${entityName?uncap_first}) { | |
148 | + public Result<String> add(@RequestBody ${entityName} ${entityName?uncap_first}) { | |
149 | 149 | ${entityName?uncap_first}Service.add${entityName}(${entityName?uncap_first}); |
150 | 150 | return Result.OK("添加成功!"); |
151 | 151 | } |
... | ... | @@ -159,7 +159,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
159 | 159 | @AutoLog(value = "${tableVo.ftlDescription}-编辑") |
160 | 160 | @ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑") |
161 | 161 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
162 | - public Result<?> edit(@RequestBody ${entityName} ${entityName?uncap_first}) { | |
162 | + public Result<String> edit(@RequestBody ${entityName} ${entityName?uncap_first}) { | |
163 | 163 | ${entityName?uncap_first}Service.update${entityName}(${entityName?uncap_first}); |
164 | 164 | return Result.OK("编辑成功!"); |
165 | 165 | } |
... | ... | @@ -173,7 +173,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
173 | 173 | @AutoLog(value = "${tableVo.ftlDescription}-通过id删除") |
174 | 174 | @ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除") |
175 | 175 | @DeleteMapping(value = "/delete") |
176 | - public Result<?> delete(@RequestParam(name="id",required=true) String id) { | |
176 | + public Result<String> delete(@RequestParam(name="id",required=true) String id) { | |
177 | 177 | ${entityName?uncap_first}Service.delete${entityName}(id); |
178 | 178 | return Result.OK("删除成功!"); |
179 | 179 | } |
... | ... | @@ -187,7 +187,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
187 | 187 | @AutoLog(value = "${tableVo.ftlDescription}-批量删除") |
188 | 188 | @ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除") |
189 | 189 | @DeleteMapping(value = "/deleteBatch") |
190 | - public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |
190 | + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |
191 | 191 | this.${entityName?uncap_first}Service.removeByIds(Arrays.asList(ids.split(","))); |
192 | 192 | return Result.OK("批量删除成功!"); |
193 | 193 | } |
... | ... | @@ -198,10 +198,10 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
198 | 198 | * @param id |
199 | 199 | * @return |
200 | 200 | */ |
201 | - @AutoLog(value = "${tableVo.ftlDescription}-通过id查询") | |
201 | + //@AutoLog(value = "${tableVo.ftlDescription}-通过id查询") | |
202 | 202 | @ApiOperation(value="${tableVo.ftlDescription}-通过id查询", notes="${tableVo.ftlDescription}-通过id查询") |
203 | 203 | @GetMapping(value = "/queryById") |
204 | - public Result<?> queryById(@RequestParam(name="id",required=true) String id) { | |
204 | + public Result<${entityName}> queryById(@RequestParam(name="id",required=true) String id) { | |
205 | 205 | ${entityName} ${entityName?uncap_first} = ${entityName?uncap_first}Service.getById(id); |
206 | 206 | if(${entityName?uncap_first}==null) { |
207 | 207 | return Result.error("未找到对应数据"); |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/controller/${entityName}Controller.javai
... | ... | @@ -70,10 +70,10 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
70 | 70 | * @param req |
71 | 71 | * @return |
72 | 72 | */ |
73 | - @AutoLog(value = "${tableVo.ftlDescription}-分页列表查询") | |
73 | + //@AutoLog(value = "${tableVo.ftlDescription}-分页列表查询") | |
74 | 74 | @ApiOperation(value="${tableVo.ftlDescription}-分页列表查询", notes="${tableVo.ftlDescription}-分页列表查询") |
75 | 75 | @GetMapping(value = "/list") |
76 | - public Result<?> queryPageList(${entityName} ${entityName?uncap_first}, | |
76 | + public Result<IPage<${entityName}>> queryPageList(${entityName} ${entityName?uncap_first}, | |
77 | 77 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
78 | 78 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
79 | 79 | HttpServletRequest req) { |
... | ... | @@ -91,7 +91,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
91 | 91 | @AutoLog(value = "${tableVo.ftlDescription}-添加") |
92 | 92 | @ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加") |
93 | 93 | @PostMapping(value = "/add") |
94 | - public Result<?> add(@RequestBody ${entityName} ${entityName?uncap_first}) { | |
94 | + public Result<String> add(@RequestBody ${entityName} ${entityName?uncap_first}) { | |
95 | 95 | ${entityName?uncap_first}Service.save(${entityName?uncap_first}); |
96 | 96 | return Result.OK("添加成功!"); |
97 | 97 | } |
... | ... | @@ -104,7 +104,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
104 | 104 | @AutoLog(value = "${tableVo.ftlDescription}-编辑") |
105 | 105 | @ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑") |
106 | 106 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
107 | - public Result<?> edit(@RequestBody ${entityName} ${entityName?uncap_first}) { | |
107 | + public Result<String> edit(@RequestBody ${entityName} ${entityName?uncap_first}) { | |
108 | 108 | ${entityName?uncap_first}Service.updateById(${entityName?uncap_first}); |
109 | 109 | return Result.OK("编辑成功!"); |
110 | 110 | } |
... | ... | @@ -117,7 +117,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
117 | 117 | @AutoLog(value = "${tableVo.ftlDescription}-通过id删除") |
118 | 118 | @ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除") |
119 | 119 | @DeleteMapping(value = "/delete") |
120 | - public Result<?> delete(@RequestParam(name="id",required=true) String id) { | |
120 | + public Result<String> delete(@RequestParam(name="id",required=true) String id) { | |
121 | 121 | ${entityName?uncap_first}Service.delMain(id); |
122 | 122 | return Result.OK("删除成功!"); |
123 | 123 | } |
... | ... | @@ -130,7 +130,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
130 | 130 | @AutoLog(value = "${tableVo.ftlDescription}-批量删除") |
131 | 131 | @ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除") |
132 | 132 | @DeleteMapping(value = "/deleteBatch") |
133 | - public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |
133 | + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |
134 | 134 | this.${entityName?uncap_first}Service.delBatchMain(Arrays.asList(ids.split(","))); |
135 | 135 | return Result.OK("批量删除成功!"); |
136 | 136 | } |
... | ... | @@ -161,10 +161,10 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
161 | 161 | * 通过主表ID查询 |
162 | 162 | * @return |
163 | 163 | */ |
164 | - @AutoLog(value = "${sub.ftlDescription}-通过主表ID查询") | |
164 | + //@AutoLog(value = "${sub.ftlDescription}-通过主表ID查询") | |
165 | 165 | @ApiOperation(value="${sub.ftlDescription}-通过主表ID查询", notes="${sub.ftlDescription}-通过主表ID查询") |
166 | 166 | @GetMapping(value = "/list${sub.entityName}ByMainId") |
167 | - public Result<?> list${sub.entityName}ByMainId(${sub.entityName} ${sub.entityName?uncap_first}, | |
167 | + public Result<IPage<${sub.entityName}>> list${sub.entityName}ByMainId(${sub.entityName} ${sub.entityName?uncap_first}, | |
168 | 168 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
169 | 169 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
170 | 170 | HttpServletRequest req) { |
... | ... | @@ -182,7 +182,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
182 | 182 | @AutoLog(value = "${sub.ftlDescription}-添加") |
183 | 183 | @ApiOperation(value="${sub.ftlDescription}-添加", notes="${sub.ftlDescription}-添加") |
184 | 184 | @PostMapping(value = "/add${sub.entityName}") |
185 | - public Result<?> add${sub.entityName}(@RequestBody ${sub.entityName} ${sub.entityName?uncap_first}) { | |
185 | + public Result<String> add${sub.entityName}(@RequestBody ${sub.entityName} ${sub.entityName?uncap_first}) { | |
186 | 186 | ${sub.entityName?uncap_first}Service.save(${sub.entityName?uncap_first}); |
187 | 187 | return Result.OK("添加成功!"); |
188 | 188 | } |
... | ... | @@ -195,7 +195,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
195 | 195 | @AutoLog(value = "${sub.ftlDescription}-编辑") |
196 | 196 | @ApiOperation(value="${sub.ftlDescription}-编辑", notes="${sub.ftlDescription}-编辑") |
197 | 197 | @RequestMapping(value = "/edit${sub.entityName}", method = {RequestMethod.PUT,RequestMethod.POST}) |
198 | - public Result<?> edit${sub.entityName}(@RequestBody ${sub.entityName} ${sub.entityName?uncap_first}) { | |
198 | + public Result<String> edit${sub.entityName}(@RequestBody ${sub.entityName} ${sub.entityName?uncap_first}) { | |
199 | 199 | ${sub.entityName?uncap_first}Service.updateById(${sub.entityName?uncap_first}); |
200 | 200 | return Result.OK("编辑成功!"); |
201 | 201 | } |
... | ... | @@ -208,7 +208,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
208 | 208 | @AutoLog(value = "${sub.ftlDescription}-通过id删除") |
209 | 209 | @ApiOperation(value="${sub.ftlDescription}-通过id删除", notes="${sub.ftlDescription}-通过id删除") |
210 | 210 | @DeleteMapping(value = "/delete${sub.entityName}") |
211 | - public Result<?> delete${sub.entityName}(@RequestParam(name="id",required=true) String id) { | |
211 | + public Result<String> delete${sub.entityName}(@RequestParam(name="id",required=true) String id) { | |
212 | 212 | ${sub.entityName?uncap_first}Service.removeById(id); |
213 | 213 | return Result.OK("删除成功!"); |
214 | 214 | } |
... | ... | @@ -221,7 +221,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e |
221 | 221 | @AutoLog(value = "${sub.ftlDescription}-批量删除") |
222 | 222 | @ApiOperation(value="${sub.ftlDescription}-批量删除", notes="${sub.ftlDescription}-批量删除") |
223 | 223 | @DeleteMapping(value = "/deleteBatch${sub.entityName}") |
224 | - public Result<?> deleteBatch${sub.entityName}(@RequestParam(name="ids",required=true) String ids) { | |
224 | + public Result<String> deleteBatch${sub.entityName}(@RequestParam(name="ids",required=true) String ids) { | |
225 | 225 | this.${sub.entityName?uncap_first}Service.removeByIds(Arrays.asList(ids.split(","))); |
226 | 226 | return Result.OK("批量删除成功!"); |
227 | 227 | } |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/controller/${entityName}Controller.javai
... | ... | @@ -73,10 +73,10 @@ public class ${entityName}Controller { |
73 | 73 | * @param req |
74 | 74 | * @return |
75 | 75 | */ |
76 | - @AutoLog(value = "${tableVo.ftlDescription}-分页列表查询") | |
76 | + //@AutoLog(value = "${tableVo.ftlDescription}-分页列表查询") | |
77 | 77 | @ApiOperation(value="${tableVo.ftlDescription}-分页列表查询", notes="${tableVo.ftlDescription}-分页列表查询") |
78 | 78 | @GetMapping(value = "/list") |
79 | - public Result<?> queryPageList(${entityName} ${entityName?uncap_first}, | |
79 | + public Result<IPage<${entityName}>> queryPageList(${entityName} ${entityName?uncap_first}, | |
80 | 80 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
81 | 81 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
82 | 82 | HttpServletRequest req) { |
... | ... | @@ -95,7 +95,7 @@ public class ${entityName}Controller { |
95 | 95 | @AutoLog(value = "${tableVo.ftlDescription}-添加") |
96 | 96 | @ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加") |
97 | 97 | @PostMapping(value = "/add") |
98 | - public Result<?> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) { | |
98 | + public Result<String> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) { | |
99 | 99 | ${entityName} ${entityName?uncap_first} = new ${entityName}(); |
100 | 100 | BeanUtils.copyProperties(${entityName?uncap_first}Page, ${entityName?uncap_first}); |
101 | 101 | ${entityName?uncap_first}Service.saveMain(${entityName?uncap_first}, <#list subTables as sub>${entityName?uncap_first}Page.get${sub.entityName}List()<#if sub_has_next>,</#if></#list>); |
... | ... | @@ -111,7 +111,7 @@ public class ${entityName}Controller { |
111 | 111 | @AutoLog(value = "${tableVo.ftlDescription}-编辑") |
112 | 112 | @ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑") |
113 | 113 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
114 | - public Result<?> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) { | |
114 | + public Result<String> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) { | |
115 | 115 | ${entityName} ${entityName?uncap_first} = new ${entityName}(); |
116 | 116 | BeanUtils.copyProperties(${entityName?uncap_first}Page, ${entityName?uncap_first}); |
117 | 117 | ${entityName} ${entityName?uncap_first}Entity = ${entityName?uncap_first}Service.getById(${entityName?uncap_first}.getId()); |
... | ... | @@ -131,7 +131,7 @@ public class ${entityName}Controller { |
131 | 131 | @AutoLog(value = "${tableVo.ftlDescription}-通过id删除") |
132 | 132 | @ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除") |
133 | 133 | @DeleteMapping(value = "/delete") |
134 | - public Result<?> delete(@RequestParam(name="id",required=true) String id) { | |
134 | + public Result<String> delete(@RequestParam(name="id",required=true) String id) { | |
135 | 135 | ${entityName?uncap_first}Service.delMain(id); |
136 | 136 | return Result.OK("删除成功!"); |
137 | 137 | } |
... | ... | @@ -145,7 +145,7 @@ public class ${entityName}Controller { |
145 | 145 | @AutoLog(value = "${tableVo.ftlDescription}-批量删除") |
146 | 146 | @ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除") |
147 | 147 | @DeleteMapping(value = "/deleteBatch") |
148 | - public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |
148 | + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |
149 | 149 | this.${entityName?uncap_first}Service.delBatchMain(Arrays.asList(ids.split(","))); |
150 | 150 | return Result.OK("批量删除成功!"); |
151 | 151 | } |
... | ... | @@ -156,10 +156,10 @@ public class ${entityName}Controller { |
156 | 156 | * @param id |
157 | 157 | * @return |
158 | 158 | */ |
159 | - @AutoLog(value = "${tableVo.ftlDescription}-通过id查询") | |
159 | + //@AutoLog(value = "${tableVo.ftlDescription}-通过id查询") | |
160 | 160 | @ApiOperation(value="${tableVo.ftlDescription}-通过id查询", notes="${tableVo.ftlDescription}-通过id查询") |
161 | 161 | @GetMapping(value = "/queryById") |
162 | - public Result<?> queryById(@RequestParam(name="id",required=true) String id) { | |
162 | + public Result<${entityName}> queryById(@RequestParam(name="id",required=true) String id) { | |
163 | 163 | ${entityName} ${entityName?uncap_first} = ${entityName?uncap_first}Service.getById(id); |
164 | 164 | if(${entityName?uncap_first}==null) { |
165 | 165 | return Result.error("未找到对应数据"); |
... | ... | @@ -175,10 +175,10 @@ public class ${entityName}Controller { |
175 | 175 | * @param id |
176 | 176 | * @return |
177 | 177 | */ |
178 | - @AutoLog(value = "${sub.ftlDescription}-通过主表ID查询") | |
178 | + //@AutoLog(value = "${sub.ftlDescription}-通过主表ID查询") | |
179 | 179 | @ApiOperation(value="${sub.ftlDescription}-通过主表ID查询", notes="${sub.ftlDescription}-通过主表ID查询") |
180 | 180 | @GetMapping(value = "/query${sub.entityName}ByMainId") |
181 | - public Result<?> query${sub.entityName}ListByMainId(@RequestParam(name="id",required=true) String id) { | |
181 | + public Result<IPage<${sub.entityName}>> query${sub.entityName}ListByMainId(@RequestParam(name="id",required=true) String id) { | |
182 | 182 | List<${sub.entityName}> ${sub.entityName?uncap_first}List = ${sub.entityName?uncap_first}Service.selectByMainId(id); |
183 | 183 | <#-- 包裹分页对象,用于翻译注解 --> |
184 | 184 | IPage <${sub.entityName}> page = new Page<>(); |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei
... | ... | @@ -54,7 +54,13 @@ |
54 | 54 | <#assign indent=" "> |
55 | 55 | <template v-if="toggleSearchStatus"> |
56 | 56 | </#if> |
57 | + <#-- update-begin-author:taoyan date:20220303 for: /issues/3420 内嵌风格,datetime控件样式异常 --> | |
58 | + <#if po.queryModel=='group' && po.classType=='datetime'> | |
59 | + ${indent}<a-col :xl="10" :lg="12" :md="12" :sm="24"> | |
60 | + <#else> | |
57 | 61 | ${indent}<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
62 | + </#if> | |
63 | + <#-- update-end-author:taoyan date:20220303 for: /issues/3420 内嵌风格,datetime控件样式异常 --> | |
58 | 64 | ${indent}<a-form-item label="${po.filedComment}"> |
59 | 65 | <#-- 普通查询 --> |
60 | 66 | <#if po.queryMode=='single'> |
... | ... | @@ -409,7 +415,7 @@ |
409 | 415 | customRender: (text) => (text ? filterMultiDictText(this.dictOptions['${po.fieldName}'], text) : '') |
410 | 416 | <#else> |
411 | 417 | dataIndex: '${po.fieldName}', |
412 | - customRender: (text, record) => (text ? record['${po.dictText}'] : '') | |
418 | + customRender: (text, record) => (text ? record['${dashedToCamel(po.dictText)}'] : '') | |
413 | 419 | </#if> |
414 | 420 | <#elseif po.classType=='switch'> |
415 | 421 | dataIndex: '${po.fieldName}', |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/controller/${entityName}Controller.javai
... | ... | @@ -79,10 +79,10 @@ public class ${entityName}Controller { |
79 | 79 | * @param req |
80 | 80 | * @return |
81 | 81 | */ |
82 | - @AutoLog(value = "${tableVo.ftlDescription}-分页列表查询") | |
82 | + //@AutoLog(value = "${tableVo.ftlDescription}-分页列表查询") | |
83 | 83 | @ApiOperation(value="${tableVo.ftlDescription}-分页列表查询", notes="${tableVo.ftlDescription}-分页列表查询") |
84 | 84 | @GetMapping(value = "/list") |
85 | - public Result<?> queryPageList(${entityName} ${entityName?uncap_first}, | |
85 | + public Result<IPage<${entityName}>> queryPageList(${entityName} ${entityName?uncap_first}, | |
86 | 86 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
87 | 87 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
88 | 88 | HttpServletRequest req) { |
... | ... | @@ -101,7 +101,7 @@ public class ${entityName}Controller { |
101 | 101 | @AutoLog(value = "${tableVo.ftlDescription}-添加") |
102 | 102 | @ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加") |
103 | 103 | @PostMapping(value = "/add") |
104 | - public Result<?> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) { | |
104 | + public Result<String> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) { | |
105 | 105 | ${entityName} ${entityName?uncap_first} = new ${entityName}(); |
106 | 106 | BeanUtils.copyProperties(${entityName?uncap_first}Page, ${entityName?uncap_first}); |
107 | 107 | <#if bpm_flag> |
... | ... | @@ -120,7 +120,7 @@ public class ${entityName}Controller { |
120 | 120 | @AutoLog(value = "${tableVo.ftlDescription}-编辑") |
121 | 121 | @ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑") |
122 | 122 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
123 | - public Result<?> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) { | |
123 | + public Result<String> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) { | |
124 | 124 | ${entityName} ${entityName?uncap_first} = new ${entityName}(); |
125 | 125 | BeanUtils.copyProperties(${entityName?uncap_first}Page, ${entityName?uncap_first}); |
126 | 126 | ${entityName} ${entityName?uncap_first}Entity = ${entityName?uncap_first}Service.getById(${entityName?uncap_first}.getId()); |
... | ... | @@ -140,7 +140,7 @@ public class ${entityName}Controller { |
140 | 140 | @AutoLog(value = "${tableVo.ftlDescription}-通过id删除") |
141 | 141 | @ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除") |
142 | 142 | @DeleteMapping(value = "/delete") |
143 | - public Result<?> delete(@RequestParam(name="id",required=true) String id) { | |
143 | + public Result<String> delete(@RequestParam(name="id",required=true) String id) { | |
144 | 144 | ${entityName?uncap_first}Service.delMain(id); |
145 | 145 | return Result.OK("删除成功!"); |
146 | 146 | } |
... | ... | @@ -154,7 +154,7 @@ public class ${entityName}Controller { |
154 | 154 | @AutoLog(value = "${tableVo.ftlDescription}-批量删除") |
155 | 155 | @ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除") |
156 | 156 | @DeleteMapping(value = "/deleteBatch") |
157 | - public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |
157 | + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |
158 | 158 | this.${entityName?uncap_first}Service.delBatchMain(Arrays.asList(ids.split(","))); |
159 | 159 | return Result.OK("批量删除成功!"); |
160 | 160 | } |
... | ... | @@ -165,10 +165,10 @@ public class ${entityName}Controller { |
165 | 165 | * @param id |
166 | 166 | * @return |
167 | 167 | */ |
168 | - @AutoLog(value = "${tableVo.ftlDescription}-通过id查询") | |
168 | + //@AutoLog(value = "${tableVo.ftlDescription}-通过id查询") | |
169 | 169 | @ApiOperation(value="${tableVo.ftlDescription}-通过id查询", notes="${tableVo.ftlDescription}-通过id查询") |
170 | 170 | @GetMapping(value = "/queryById") |
171 | - public Result<?> queryById(@RequestParam(name="id",required=true) String id) { | |
171 | + public Result<${entityName}> queryById(@RequestParam(name="id",required=true) String id) { | |
172 | 172 | ${entityName} ${entityName?uncap_first} = ${entityName?uncap_first}Service.getById(id); |
173 | 173 | if(${entityName?uncap_first}==null) { |
174 | 174 | return Result.error("未找到对应数据"); |
... | ... | @@ -184,10 +184,10 @@ public class ${entityName}Controller { |
184 | 184 | * @param id |
185 | 185 | * @return |
186 | 186 | */ |
187 | - @AutoLog(value = "${sub.ftlDescription}通过主表ID查询") | |
187 | + //@AutoLog(value = "${sub.ftlDescription}通过主表ID查询") | |
188 | 188 | @ApiOperation(value="${sub.ftlDescription}主表ID查询", notes="${sub.ftlDescription}-通主表ID查询") |
189 | 189 | @GetMapping(value = "/query${sub.entityName}ByMainId") |
190 | - public Result<?> query${sub.entityName}ListByMainId(@RequestParam(name="id",required=true) String id) { | |
190 | + public Result<List<${sub.entityName}>> query${sub.entityName}ListByMainId(@RequestParam(name="id",required=true) String id) { | |
191 | 191 | List<${sub.entityName}> ${sub.entityName?uncap_first}List = ${sub.entityName?uncap_first}Service.selectByMainId(id); |
192 | 192 | return Result.OK(${sub.entityName?uncap_first}List); |
193 | 193 | } |
... | ... |
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/controller/${entityName}Controller.javai
... | ... | @@ -73,10 +73,10 @@ public class ${entityName}Controller { |
73 | 73 | * @param req |
74 | 74 | * @return |
75 | 75 | */ |
76 | - @AutoLog(value = "${tableVo.ftlDescription}-分页列表查询") | |
76 | + //@AutoLog(value = "${tableVo.ftlDescription}-分页列表查询") | |
77 | 77 | @ApiOperation(value="${tableVo.ftlDescription}-分页列表查询", notes="${tableVo.ftlDescription}-分页列表查询") |
78 | 78 | @GetMapping(value = "/list") |
79 | - public Result<?> queryPageList(${entityName} ${entityName?uncap_first}, | |
79 | + public Result<IPage<${entityName}>> queryPageList(${entityName} ${entityName?uncap_first}, | |
80 | 80 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
81 | 81 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
82 | 82 | HttpServletRequest req) { |
... | ... | @@ -95,7 +95,7 @@ public class ${entityName}Controller { |
95 | 95 | @AutoLog(value = "${tableVo.ftlDescription}-添加") |
96 | 96 | @ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加") |
97 | 97 | @PostMapping(value = "/add") |
98 | - public Result<?> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) { | |
98 | + public Result<String> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) { | |
99 | 99 | ${entityName} ${entityName?uncap_first} = new ${entityName}(); |
100 | 100 | BeanUtils.copyProperties(${entityName?uncap_first}Page, ${entityName?uncap_first}); |
101 | 101 | ${entityName?uncap_first}Service.saveMain(${entityName?uncap_first}, <#list subTables as sub>${entityName?uncap_first}Page.get${sub.entityName}List()<#if sub_has_next>,</#if></#list>); |
... | ... | @@ -111,7 +111,7 @@ public class ${entityName}Controller { |
111 | 111 | @AutoLog(value = "${tableVo.ftlDescription}-编辑") |
112 | 112 | @ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑") |
113 | 113 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
114 | - public Result<?> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) { | |
114 | + public Result<String> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) { | |
115 | 115 | ${entityName} ${entityName?uncap_first} = new ${entityName}(); |
116 | 116 | BeanUtils.copyProperties(${entityName?uncap_first}Page, ${entityName?uncap_first}); |
117 | 117 | ${entityName} ${entityName?uncap_first}Entity = ${entityName?uncap_first}Service.getById(${entityName?uncap_first}.getId()); |
... | ... | @@ -131,7 +131,7 @@ public class ${entityName}Controller { |
131 | 131 | @AutoLog(value = "${tableVo.ftlDescription}-通过id删除") |
132 | 132 | @ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除") |
133 | 133 | @DeleteMapping(value = "/delete") |
134 | - public Result<?> delete(@RequestParam(name="id",required=true) String id) { | |
134 | + public Result<String> delete(@RequestParam(name="id",required=true) String id) { | |
135 | 135 | ${entityName?uncap_first}Service.delMain(id); |
136 | 136 | return Result.OK("删除成功!"); |
137 | 137 | } |
... | ... | @@ -145,7 +145,7 @@ public class ${entityName}Controller { |
145 | 145 | @AutoLog(value = "${tableVo.ftlDescription}-批量删除") |
146 | 146 | @ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除") |
147 | 147 | @DeleteMapping(value = "/deleteBatch") |
148 | - public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |
148 | + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |
149 | 149 | this.${entityName?uncap_first}Service.delBatchMain(Arrays.asList(ids.split(","))); |
150 | 150 | return Result.OK("批量删除成功!"); |
151 | 151 | } |
... | ... | @@ -156,10 +156,10 @@ public class ${entityName}Controller { |
156 | 156 | * @param id |
157 | 157 | * @return |
158 | 158 | */ |
159 | - @AutoLog(value = "${tableVo.ftlDescription}-通过id查询") | |
159 | + //@AutoLog(value = "${tableVo.ftlDescription}-通过id查询") | |
160 | 160 | @ApiOperation(value="${tableVo.ftlDescription}-通过id查询", notes="${tableVo.ftlDescription}-通过id查询") |
161 | 161 | @GetMapping(value = "/queryById") |
162 | - public Result<?> queryById(@RequestParam(name="id",required=true) String id) { | |
162 | + public Result<${entityName}> queryById(@RequestParam(name="id",required=true) String id) { | |
163 | 163 | ${entityName} ${entityName?uncap_first} = ${entityName?uncap_first}Service.getById(id); |
164 | 164 | if(${entityName?uncap_first}==null) { |
165 | 165 | return Result.error("未找到对应数据"); |
... | ... | @@ -175,10 +175,10 @@ public class ${entityName}Controller { |
175 | 175 | * @param id |
176 | 176 | * @return |
177 | 177 | */ |
178 | - @AutoLog(value = "${sub.ftlDescription}通过主表ID查询") | |
178 | + //@AutoLog(value = "${sub.ftlDescription}通过主表ID查询") | |
179 | 179 | @ApiOperation(value="${sub.ftlDescription}主表ID查询", notes="${sub.ftlDescription}-通主表ID查询") |
180 | 180 | @GetMapping(value = "/query${sub.entityName}ByMainId") |
181 | - public Result<?> query${sub.entityName}ListByMainId(@RequestParam(name="id",required=true) String id) { | |
181 | + public Result<List<${sub.entityName}>> query${sub.entityName}ListByMainId(@RequestParam(name="id",required=true) String id) { | |
182 | 182 | List<${sub.entityName}> ${sub.entityName?uncap_first}List = ${sub.entityName?uncap_first}Service.selectByMainId(id); |
183 | 183 | return Result.OK(${sub.entityName?uncap_first}List); |
184 | 184 | } |
... | ... |