diff --git a/ghy-generator/src/main/resources/vm/java/controller.java.vm b/ghy-generator/src/main/resources/vm/java/controller.java.vm index 3498ac1a..8b81384a 100644 --- a/ghy-generator/src/main/resources/vm/java/controller.java.vm +++ b/ghy-generator/src/main/resources/vm/java/controller.java.vm @@ -5,11 +5,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.*; import com.ghy.common.annotation.Log; import com.ghy.common.enums.BusinessType; import ${packageName}.domain.${ClassName}; @@ -59,6 +55,19 @@ public class ${ClassName}Controller extends BaseController List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); return getDataTable(list); } + + /** + * App查询${functionName}列表 + */ + @PostMapping("/app/list") + @ResponseBody + public TableDataInfo appList(@RequestBody ${ClassName} ${className}) + { + startPage(); + List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); + return getDataTable(list); + } + #elseif($table.tree) /** * 查询${functionName}树列表