Commit e35965c9 by bianpeng

修改

parent dfc57ca3
...@@ -56,8 +56,8 @@ public class ${entityName}Controller { ...@@ -56,8 +56,8 @@ public class ${entityName}Controller {
@GetMapping("/get${entityName}ById/{id}") @GetMapping("/get${entityName}ById/{id}")
@ApiOperation(value = "获取${entityComment}信息", notes = "获取${entityComment}信息[${objectName}],作者:${author}") @ApiOperation(value = "获取${entityComment}信息", notes = "获取${entityComment}信息[${objectName}],作者:${author}")
@ApiImplicitParam(paramType="path", name = "id", value = "${entityComment}id", required = true, dataType = "Long") @ApiImplicitParam(paramType="path", name = "id", value = "${entityComment}id", required = true, dataType = "Long")
public JsonResult get${entityName}ById(@PathVariable("id")Long id){ public JsonResult<${entityName}> get${entityName}ById(@PathVariable("id")Long id){
JsonResult result=new JsonResult(); JsonResult<${entityName}> result=new JsonResult<${entityName}>();
try { try {
${entityName} ${objectName}=${objectName}ServiceImpl.selectByPrimaryKey(id); ${entityName} ${objectName}=${objectName}ServiceImpl.selectByPrimaryKey(id);
if (${objectName}!=null) { if (${objectName}!=null) {
...@@ -86,8 +86,8 @@ public class ${entityName}Controller { ...@@ -86,8 +86,8 @@ public class ${entityName}Controller {
*/ */
@PostMapping("/insertSelective") @PostMapping("/insertSelective")
@ApiOperation(value = "添加${entityComment}", notes = "添加${entityComment}[${objectName}],作者:${author}") @ApiOperation(value = "添加${entityComment}", notes = "添加${entityComment}[${objectName}],作者:${author}")
public JsonResult insertSelective(${entityName} ${objectName}){ public JsonResult<${entityName}> insertSelective(${entityName} ${objectName}){
JsonResult result=new JsonResult(); JsonResult<${entityName}> result=new JsonResult<${entityName}>();
try { try {
int rg=${objectName}ServiceImpl.insertSelective(${objectName}); int rg=${objectName}ServiceImpl.insertSelective(${objectName});
if (rg>0) { if (rg>0) {
...@@ -147,8 +147,8 @@ public class ${entityName}Controller { ...@@ -147,8 +147,8 @@ public class ${entityName}Controller {
*/ */
@ApiOperation(value = "修改${entityComment}", notes = "修改${entityComment}[${objectName}],作者:${author}") @ApiOperation(value = "修改${entityComment}", notes = "修改${entityComment}[${objectName}],作者:${author}")
@PostMapping("/updateByPrimaryKeySelective") @PostMapping("/updateByPrimaryKeySelective")
public JsonResult updateByPrimaryKeySelective(${entityName} ${objectName}){ public JsonResult<${entityName}> updateByPrimaryKeySelective(${entityName} ${objectName}){
JsonResult result=new JsonResult(); JsonResult<${entityName}> result=new JsonResult<${entityName}>();
try { try {
int reg = ${objectName}ServiceImpl.updateByPrimaryKeySelective(${objectName}); int reg = ${objectName}ServiceImpl.updateByPrimaryKeySelective(${objectName});
if (reg>0) { if (reg>0) {
...@@ -177,8 +177,8 @@ public class ${entityName}Controller { ...@@ -177,8 +177,8 @@ public class ${entityName}Controller {
*/ */
@ApiOperation(value = "条件查询${entityComment}", notes = "条件查询[${objectName}],作者:${author}") @ApiOperation(value = "条件查询${entityComment}", notes = "条件查询[${objectName}],作者:${author}")
@PostMapping("/query${entityName}List") @PostMapping("/query${entityName}List")
public JsonResult query${entityName}List(${entityName} ${objectName}){ public JsonResult<${entityName}> query${entityName}List(${entityName} ${objectName}){
JsonResult result=new JsonResult(); JsonResult<${entityName}> result=new JsonResult<${entityName}>();
try { try {
List<${entityName}> list = ${objectName}ServiceImpl.query${entityName}List(${objectName}); List<${entityName}> list = ${objectName}ServiceImpl.query${entityName}List(${objectName});
result.setCode(1); result.setCode(1);
...@@ -205,8 +205,8 @@ public class ${entityName}Controller { ...@@ -205,8 +205,8 @@ public class ${entityName}Controller {
@ApiImplicitParam(paramType="query", name = "pageNum", value = "当前页", required = true, dataType = "int"), @ApiImplicitParam(paramType="query", name = "pageNum", value = "当前页", required = true, dataType = "int"),
@ApiImplicitParam(paramType="query", name = "pageSize", value = "页行数", required = true, dataType = "int") @ApiImplicitParam(paramType="query", name = "pageSize", value = "页行数", required = true, dataType = "int")
}) })
public JsonResult get${entityName}BySearch(Integer pageNum,Integer pageSize){ public JsonResult<${entityName}> get${entityName}BySearch(Integer pageNum,Integer pageSize){
JsonResult result=new JsonResult(); JsonResult<${entityName}> result=new JsonResult<${entityName}>();
AppPage<${entityName}> page =new AppPage<${entityName}>(); AppPage<${entityName}> page =new AppPage<${entityName}>();
page.setPageNum(pageNum); page.setPageNum(pageNum);
page.setPageSize(pageSize); page.setPageSize(pageSize);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment