|
@@ -6,9 +6,11 @@ import com.citu.framework.common.pojo.PageParam;
|
|
|
import com.citu.framework.common.pojo.PageResult;
|
|
|
import com.citu.framework.common.util.object.BeanUtils;
|
|
|
import com.citu.framework.excel.core.util.ExcelUtils;
|
|
|
+import com.citu.module.menduner.system.controller.admin.industry.vo.IndustryListReqVO;
|
|
|
import com.citu.module.menduner.system.controller.admin.industry.vo.IndustryPageReqVO;
|
|
|
import com.citu.module.menduner.system.controller.admin.industry.vo.IndustryRespVO;
|
|
|
import com.citu.module.menduner.system.controller.admin.industry.vo.IndustrySaveReqVO;
|
|
|
+
|
|
|
import com.citu.module.menduner.system.dal.dataobject.industry.IndustryDO;
|
|
|
import com.citu.module.menduner.system.service.industry.IndustryService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
@@ -39,14 +41,14 @@ public class IndustryController {
|
|
|
|
|
|
@PostMapping("/create")
|
|
|
@Operation(summary = "创建行业信息")
|
|
|
- @PreAuthorize("@ss.hasPermission('mde:industry:create')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('menduner:system:industry:create')")
|
|
|
public CommonResult<Long> createIndustry(@Valid @RequestBody IndustrySaveReqVO createReqVO) {
|
|
|
return success(industryService.createIndustry(createReqVO));
|
|
|
}
|
|
|
|
|
|
@PutMapping("/update")
|
|
|
@Operation(summary = "更新行业信息")
|
|
|
- @PreAuthorize("@ss.hasPermission('mde:industry:update')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('menduner:system:industry:update')")
|
|
|
public CommonResult<Boolean> updateIndustry(@Valid @RequestBody IndustrySaveReqVO updateReqVO) {
|
|
|
industryService.updateIndustry(updateReqVO);
|
|
|
return success(true);
|
|
@@ -55,7 +57,7 @@ public class IndustryController {
|
|
|
@DeleteMapping("/delete")
|
|
|
@Operation(summary = "删除行业信息")
|
|
|
@Parameter(name = "id", description = "编号", required = true)
|
|
|
- @PreAuthorize("@ss.hasPermission('mde:industry:delete')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('menduner:system:industry:delete')")
|
|
|
public CommonResult<Boolean> deleteIndustry(@RequestParam("id") Long id) {
|
|
|
industryService.deleteIndustry(id);
|
|
|
return success(true);
|
|
@@ -64,7 +66,7 @@ public class IndustryController {
|
|
|
@GetMapping("/get")
|
|
|
@Operation(summary = "获得行业信息")
|
|
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
|
- @PreAuthorize("@ss.hasPermission('mde:industry:query')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('menduner:system:industry:query')")
|
|
|
public CommonResult<IndustryRespVO> getIndustry(@RequestParam("id") Long id) {
|
|
|
IndustryDO industry = industryService.getIndustry(id);
|
|
|
return success(BeanUtils.toBean(industry, IndustryRespVO.class));
|
|
@@ -72,15 +74,23 @@ public class IndustryController {
|
|
|
|
|
|
@GetMapping("/page")
|
|
|
@Operation(summary = "获得行业信息分页")
|
|
|
- @PreAuthorize("@ss.hasPermission('mde:industry:query')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('menduner:system:industry:query')")
|
|
|
public CommonResult<PageResult<IndustryRespVO>> getIndustryPage(@Valid IndustryPageReqVO pageReqVO) {
|
|
|
PageResult<IndustryDO> pageResult = industryService.getIndustryPage(pageReqVO);
|
|
|
return success(BeanUtils.toBean(pageResult, IndustryRespVO.class));
|
|
|
}
|
|
|
|
|
|
+ @GetMapping("/list")
|
|
|
+ @Operation(summary = "获得行业信息列表")
|
|
|
+ @PreAuthorize("@ss.hasPermission('menduner:system:Industry:query')")
|
|
|
+ public CommonResult<List<IndustryRespVO>> getIndustryList(@Valid IndustryListReqVO listReqVO) {
|
|
|
+ List<IndustryDO> list = industryService.getIndustryList(listReqVO);
|
|
|
+ return success(BeanUtils.toBean(list, IndustryRespVO.class));
|
|
|
+ }
|
|
|
+
|
|
|
@GetMapping("/export-excel")
|
|
|
@Operation(summary = "导出行业信息 Excel")
|
|
|
- @PreAuthorize("@ss.hasPermission('mde:industry:export')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('menduner:system:industry:export')")
|
|
|
@ApiAccessLog(operateType = EXPORT)
|
|
|
public void exportIndustryExcel(@Valid IndustryPageReqVO pageReqVO,
|
|
|
HttpServletResponse response) throws IOException {
|