|
@@ -1,17 +1,14 @@
|
|
package com.miaxis.app.controller.icon;
|
|
package com.miaxis.app.controller.icon;
|
|
|
|
|
|
-import com.miaxis.common.annotation.Log;
|
|
|
|
import com.miaxis.common.constant.Constants;
|
|
import com.miaxis.common.constant.Constants;
|
|
import com.miaxis.common.core.controller.BaseController;
|
|
import com.miaxis.common.core.controller.BaseController;
|
|
import com.miaxis.common.core.domain.Response;
|
|
import com.miaxis.common.core.domain.Response;
|
|
import com.miaxis.common.core.page.ResponsePageInfo;
|
|
import com.miaxis.common.core.page.ResponsePageInfo;
|
|
-import com.miaxis.common.enums.BusinessTypeEnum;
|
|
|
|
import com.miaxis.common.utils.poi.ExcelUtil;
|
|
import com.miaxis.common.utils.poi.ExcelUtil;
|
|
import com.miaxis.icon.domain.IconClassify;
|
|
import com.miaxis.icon.domain.IconClassify;
|
|
import com.miaxis.icon.service.IIconClassifyService;
|
|
import com.miaxis.icon.service.IIconClassifyService;
|
|
import io.swagger.annotations.*;
|
|
import io.swagger.annotations.*;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
-import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
@@ -33,7 +30,6 @@ public class IconClassifyController extends BaseController{
|
|
/**
|
|
/**
|
|
* 查询图标分类列表
|
|
* 查询图标分类列表
|
|
*/
|
|
*/
|
|
- @PreAuthorize("@ss.hasPermi('icon:icon:list')")
|
|
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
@ApiOperation("查询图标分类列表")
|
|
@ApiOperation("查询图标分类列表")
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParams({
|
|
@@ -46,23 +42,10 @@ public class IconClassifyController extends BaseController{
|
|
return toResponsePageInfo(list);
|
|
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}")
|
|
@GetMapping(value = "/{id}")
|
|
@ApiOperation("获取图标分类详细信息")
|
|
@ApiOperation("获取图标分类详细信息")
|
|
public Response<IconClassify> getInfo(
|
|
public Response<IconClassify> getInfo(
|
|
@@ -72,39 +55,5 @@ public class IconClassifyController extends BaseController{
|
|
return Response.success(iconClassifyService.getById(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);
|
|
|
|
- }
|
|
|
|
}
|
|
}
|