86 Star 362 Fork 122

wxd_tony1984/DevelopAssistant

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
ControllerTemplate.cs 1.41 KB
Copy Edit Raw Blame History
wxdongtt2007 authored 2022-12-02 11:42 +08:00 . 修改toolstripTextBox 样式
package ${PakageName}.controller;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import ${PakageName}.exception.BizException;
import ${PakageName}.service.I${EntityName}Service;
import lombok.extern.log4j.Log4j2;
@Log4j2
@RestController
public class ${EntityName}Controller {
@Autowired
private I${EntityName}Service ${InstanceName}Service;
@RequestMapping("/${EntityName}/list")
@ApiOperation( httpMethod = "POST", value = "分页获取数据", notes = "分页获取数据")
public ResultEnity<IPage<Map<String, Object>>> List(@ApiParam(name = "params", value = "查询条件",required = true) @RequestBody Map<String,Object> params){
IPage<Map<String, Object>> result = null;
try {
result = ${InstanceName}Service.query${EntityName}PageList(params);
}
catch (BizException ex) {
// TODO: handle exception
log.error("查询数据出错:"+ex.getMessage(),ex);
return ResultEnity.Error("查询数据出错:"+ex.getMessage(), null);
}
catch (Exception ex) {
// TODO: handle exception
log.error("查询数据出错:"+ex.getMessage(),ex);
return ResultEnity.Error("查询数据出错", null);
}
return ResultEnity.Success("查询成功", result);
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/sqlorm/DevelopAssistant.git
git@gitee.com:sqlorm/DevelopAssistant.git
sqlorm
DevelopAssistant
DevelopAssistant
master

Search