♻️ Refactoring code. mybatis plus 3.x refactor

This commit is contained in:
冷冷 committed 2018-11-23 14:17:33 +08:00
1 parent ff47da2767
commit c981e6137d
77 files changed
+463 -1340

No files matched your search

@@ -49,8 +49,8 @@ public class ${className}Controller {
* @return
*/
@GetMapping("/page")
public R<IPage<${className}>> get${className}Page(Page<${className}> page, ${className} ${classname}) {
return new R<>(${classname}Service.get${className}Page(page,${classname}));
public R get${className}Page(Page page, ${className} ${classname}) {
return new R<>(${classname}Service.page(page,Wrappers.query(${classname})));
}
@@ -60,7 +60,7 @@ public class ${className}Controller {
* @return R
*/
@GetMapping("/{${pk.lowerAttrName}}")
public R<${className}> getById(@PathVariable("${pk.lowerAttrName}") ${pk.attrType} ${pk.lowerAttrName}){
public R getById(@PathVariable("${pk.lowerAttrName}") ${pk.attrType} ${pk.lowerAttrName}){
return new R<>(${classname}Service.getById(${pk.lowerAttrName}));
}