|
@@ -0,0 +1,110 @@
|
|
|
|
+package com.miaxis.app.controller.icon;
|
|
|
|
+
|
|
|
|
+import com.miaxis.common.annotation.Log;
|
|
|
|
+import com.miaxis.common.constant.Constants;
|
|
|
|
+import com.miaxis.common.core.controller.BaseController;
|
|
|
|
+import com.miaxis.common.core.domain.Response;
|
|
|
|
+import com.miaxis.common.core.page.ResponsePageInfo;
|
|
|
|
+import com.miaxis.common.enums.BusinessTypeEnum;
|
|
|
|
+import com.miaxis.common.utils.poi.ExcelUtil;
|
|
|
|
+import com.miaxis.icon.domain.IconClassify;
|
|
|
|
+import com.miaxis.icon.service.IIconClassifyService;
|
|
|
|
+import io.swagger.annotations.*;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
+
|
|
|
|
+import java.util.Arrays;
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * 【图标分类】Controller
|
|
|
|
+ *
|
|
|
|
+ * @author miaxis
|
|
|
|
+ * @date 2025-07-16
|
|
|
|
+ */
|
|
|
|
+@RestController
|
|
|
|
+@RequestMapping(Constants.OPEN_PREFIX+"/icon/classify")
|
|
|
|
+@Api(tags={"【APP-图标分类】"})
|
|
|
|
+public class IconClassifyController extends BaseController{
|
|
|
|
+ @Autowired
|
|
|
|
+ private IIconClassifyService iconClassifyService;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 查询图标分类列表
|
|
|
|
+ */
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('icon:icon:list')")
|
|
|
|
+ @GetMapping("/list")
|
|
|
|
+ @ApiOperation("查询图标分类列表")
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
+ @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
|
|
|
|
+ @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
|
|
|
|
+ })
|
|
|
|
+ public ResponsePageInfo<IconClassify> list(@ModelAttribute IconClassify iconClassify){
|
|
|
|
+ startPage();
|
|
|
|
+ List<IconClassify> list = iconClassifyService.selectIconClassifyList(iconClassify);
|
|
|
|
+ return toResponsePageInfo(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 导出图标分类列表
|
|
|
|
+ */
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('icon:icon:export')")
|
|
|
|
+ @Log(title = "图标分类", businessType = BusinessTypeEnum.EXPORT)
|
|
|
|
+ @GetMapping("/export")
|
|
|
|
+ @ApiOperation("导出图标分类列表Excel")
|
|
|
|
+ public Response<String> export(@ModelAttribute IconClassify iconClassify){
|
|
|
|
+ List<IconClassify> list = iconClassifyService.selectIconClassifyList(iconClassify);
|
|
|
|
+ ExcelUtil<IconClassify> util = new ExcelUtil<IconClassify>(IconClassify.class);
|
|
|
|
+ return util.exportExcel(list, "icon");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 获取图标分类详细信息
|
|
|
|
+ */
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('icon:icon:query')")
|
|
|
|
+ @GetMapping(value = "/{id}")
|
|
|
|
+ @ApiOperation("获取图标分类详细信息")
|
|
|
|
+ public Response<IconClassify> getInfo(
|
|
|
|
+ @ApiParam(name = "id", value = "图标分类参数", required = true)
|
|
|
|
+ @PathVariable("id") String id
|
|
|
|
+ ){
|
|
|
|
+ return Response.success(iconClassifyService.getById(id));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 新增图标分类
|
|
|
|
+ */
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('icon:icon:add')")
|
|
|
|
+ @Log(title = "图标分类", businessType = BusinessTypeEnum.INSERT)
|
|
|
|
+ @PostMapping
|
|
|
|
+ @ApiOperation("新增图标分类")
|
|
|
|
+ public Response<Integer> add(@RequestBody IconClassify iconClassify){
|
|
|
|
+ return toResponse(iconClassifyService.save(iconClassify) ? 1 : 0);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 修改图标分类
|
|
|
|
+ */
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('icon:icon:edit')")
|
|
|
|
+ @Log(title = "图标分类", businessType = BusinessTypeEnum.UPDATE)
|
|
|
|
+ @PutMapping
|
|
|
|
+ @ApiOperation("修改图标分类")
|
|
|
|
+ public Response<Integer> edit(@RequestBody IconClassify iconClassify){
|
|
|
|
+ return toResponse(iconClassifyService.updateById(iconClassify) ? 1 : 0);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 删除图标分类
|
|
|
|
+ */
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('icon:icon:remove')")
|
|
|
|
+ @Log(title = "图标分类", businessType = BusinessTypeEnum.DELETE)
|
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
|
+ @ApiOperation("删除图标分类")
|
|
|
|
+ public Response<Integer> remove(
|
|
|
|
+ @ApiParam(name = "ids", value = "图标分类ids参数", required = true)
|
|
|
|
+ @PathVariable String[] ids
|
|
|
|
+ ){
|
|
|
|
+ return toResponse(iconClassifyService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
|
|
|
+ }
|
|
|
|
+}
|