package org.jeecg.modules.dnc.controller; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.modules.dnc.entity.Button; import org.jeecg.modules.dnc.request.ButtonRequest; import org.jeecg.modules.dnc.response.CommonCode; import org.jeecg.modules.dnc.response.QueryListResponseResult; import org.jeecg.modules.dnc.response.QueryPageResponseResult; import org.jeecg.modules.dnc.response.ResponseResult; import org.jeecg.modules.dnc.service.IButtonService; import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.entity.ExportParams; import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.Collections; import java.util.List; @Slf4j @Api(tags = "按钮管理") @RestController @RequestMapping("/ucenter/btn") public class ButtonController { @Autowired private IButtonService buttonService; @AutoLog(value = "按钮管理-新增按钮对象") @ApiOperation(value = "按钮管理-新增按钮对象", notes = "按钮管理-新增按钮对象") @PostMapping("/add") public ResponseResult addButton(@RequestBody Button button) { boolean b = buttonService.addButton(button); if(b) { return new ResponseResult(CommonCode.SUCCESS); } return new ResponseResult(CommonCode.FAIL); } @AutoLog(value = "按钮管理-根据按钮类型查询按钮列表") @ApiOperation(value = "按钮管理-根据按钮类型查询按钮列表", notes = "按钮管理-根据按钮类型查询按钮列表") @GetMapping("/find/list") public QueryListResponseResult