|
|
@@ -1,35 +1,26 @@
|
|
|
package com.zd.chemical.controller;
|
|
|
|
|
|
-import java.util.List;
|
|
|
-import java.io.IOException;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
|
|
-import com.zd.common.core.domain.per.PerFun;
|
|
|
-import com.zd.common.core.domain.per.PerPrefix;
|
|
|
-import com.zd.common.core.web.domain.ResultData;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
-import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
-import com.zd.common.log.annotation.Log;
|
|
|
-import com.zd.common.log.enums.BusinessType;
|
|
|
-import com.zd.common.security.annotation.PreAuthorize;
|
|
|
import com.zd.chemical.domain.HxpClassifyConfig;
|
|
|
import com.zd.chemical.service.IHxpClassifyConfigService;
|
|
|
+import com.zd.common.core.annotation.Log;
|
|
|
+import com.zd.common.core.annotation.PreAuthorize;
|
|
|
+import com.zd.common.core.log.BusinessType;
|
|
|
+import com.zd.common.core.utils.ExcelUtil;
|
|
|
import com.zd.common.core.web.controller.BaseController;
|
|
|
-import com.zd.common.core.web.domain.AjaxResult;
|
|
|
-import com.zd.common.core.utils.poi.ExcelUtil;
|
|
|
+import com.zd.common.swagger.config.Knife4jConfiguration;
|
|
|
+import com.zd.model.domain.ResultData;
|
|
|
+import com.zd.model.domain.per.PerFun;
|
|
|
+import com.zd.model.domain.per.PerPrefix;
|
|
|
+import com.zd.model.page.TableDataInfo;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
-import com.zd.common.swagger.config.Knife4jConfiguration;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import com.zd.common.core.web.page.TableDataInfo;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.io.IOException;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 【请填写功能名称】Controller
|
|
|
@@ -39,11 +30,9 @@ import com.zd.common.core.web.page.TableDataInfo;
|
|
|
*/
|
|
|
@RestController
|
|
|
@Api(tags = "【【请填写功能名称】】")
|
|
|
-//作者手动加入 ,在接口上加作者@ApiOperationSupport(author = "XXX")
|
|
|
@ApiSupport(author = Knife4jConfiguration.Author.CYL)
|
|
|
@RequestMapping("/classifyConfig")
|
|
|
-public class HxpClassifyConfigController extends BaseController
|
|
|
-{
|
|
|
+public class HxpClassifyConfigController extends BaseController {
|
|
|
@Autowired
|
|
|
private IHxpClassifyConfigService hxpClassifyConfigService;
|
|
|
|
|
|
@@ -53,8 +42,7 @@ public class HxpClassifyConfigController extends BaseController
|
|
|
@PreAuthorize(hasPermi = "chemical:config:list")
|
|
|
@GetMapping("/list")
|
|
|
@ApiOperation(value = "查询【请填写功能名称】列表")
|
|
|
- public TableDataInfo<HxpClassifyConfig> list(HxpClassifyConfig hxpClassifyConfig)
|
|
|
- {
|
|
|
+ public TableDataInfo<HxpClassifyConfig> list(HxpClassifyConfig hxpClassifyConfig) {
|
|
|
startPage();
|
|
|
List<HxpClassifyConfig> list = hxpClassifyConfigService.selectHxpClassifyConfigList(hxpClassifyConfig);
|
|
|
return getDataTable(list);
|
|
|
@@ -67,8 +55,7 @@ public class HxpClassifyConfigController extends BaseController
|
|
|
@PreAuthorize(hasPermi = "chemical:config:export")
|
|
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/export")
|
|
|
- public void export(HttpServletResponse response, HxpClassifyConfig hxpClassifyConfig) throws IOException
|
|
|
- {
|
|
|
+ public void export(HttpServletResponse response, HxpClassifyConfig hxpClassifyConfig) throws IOException {
|
|
|
List<HxpClassifyConfig> list = hxpClassifyConfigService.selectHxpClassifyConfigList(hxpClassifyConfig);
|
|
|
ExcelUtil<HxpClassifyConfig> util = new ExcelUtil<HxpClassifyConfig>(HxpClassifyConfig.class);
|
|
|
util.exportExcel(response, list, "【请填写功能名称】数据");
|
|
|
@@ -78,10 +65,9 @@ public class HxpClassifyConfigController extends BaseController
|
|
|
* 获取【请填写功能名称】详细信息
|
|
|
*/
|
|
|
@ApiOperation(value = "获取【请填写功能名称】详细信息")
|
|
|
- @PreAuthorize(hasPermi = PerPrefix.HXP_CONFIG+ PerFun.QUERY)
|
|
|
+ @PreAuthorize(hasPermi = PerPrefix.HXP_CONFIG + PerFun.QUERY)
|
|
|
@GetMapping(value = "/{id}")
|
|
|
- public ResultData<HxpClassifyConfig> getInfo(@PathVariable("id") Long id)
|
|
|
- {
|
|
|
+ public ResultData<HxpClassifyConfig> getInfo(@PathVariable("id") Long id) {
|
|
|
return ResultData.success(hxpClassifyConfigService.selectHxpClassifyConfigById(id));
|
|
|
}
|
|
|
|
|
|
@@ -89,11 +75,10 @@ public class HxpClassifyConfigController extends BaseController
|
|
|
* 新增【请填写功能名称】
|
|
|
*/
|
|
|
@ApiOperation(value = "新增【请填写功能名称】")
|
|
|
- @PreAuthorize(hasPermi = PerPrefix.HXP_CONFIG+ PerFun.ADD)
|
|
|
+ @PreAuthorize(hasPermi = PerPrefix.HXP_CONFIG + PerFun.ADD)
|
|
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
- public ResultData add(@RequestBody HxpClassifyConfig hxpClassifyConfig)
|
|
|
- {
|
|
|
+ public ResultData add(@RequestBody HxpClassifyConfig hxpClassifyConfig) {
|
|
|
return ResultData.result(hxpClassifyConfigService.insertHxpClassifyConfig(hxpClassifyConfig));
|
|
|
}
|
|
|
|
|
|
@@ -101,12 +86,11 @@ public class HxpClassifyConfigController extends BaseController
|
|
|
* 修改【请填写功能名称】
|
|
|
*/
|
|
|
@ApiOperation(value = "修改【请填写功能名称】")
|
|
|
- @PreAuthorize(hasPermi = PerPrefix.HXP_CONFIG+ PerFun.ADD)
|
|
|
+ @PreAuthorize(hasPermi = PerPrefix.HXP_CONFIG + PerFun.ADD)
|
|
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
|
- public ResultData edit(@RequestBody HxpClassifyConfig hxpClassifyConfig)
|
|
|
- {
|
|
|
- return ResultData.result(hxpClassifyConfigService.updateHxpClassifyConfig(hxpClassifyConfig));
|
|
|
+ public ResultData edit(@RequestBody HxpClassifyConfig hxpClassifyConfig) {
|
|
|
+ return ResultData.result(hxpClassifyConfigService.updateHxpClassifyConfig(hxpClassifyConfig));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -115,9 +99,8 @@ public class HxpClassifyConfigController extends BaseController
|
|
|
@ApiOperation(value = "删除【请填写功能名称】")
|
|
|
@PreAuthorize(hasPermi = "chemical:config:remove")
|
|
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
|
|
- @DeleteMapping("/{ids}")
|
|
|
- public ResultData remove(@PathVariable Long[] ids)
|
|
|
- {
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
+ public ResultData remove(@PathVariable Long[] ids) {
|
|
|
return ResultData.result(hxpClassifyConfigService.deleteHxpClassifyConfigByIds(ids));
|
|
|
}
|
|
|
}
|