|
@@ -32,7 +32,7 @@ import static com.yc.ship.framework.operatelog.core.enums.OperateTypeEnum.EXPORT
|
|
|
|
|
|
@Tag(name = "管理后台 - 资源供应商")
|
|
|
@RestController
|
|
|
-@RequestMapping("/supplier")
|
|
|
+@RequestMapping("/resource/supplier")
|
|
|
@Validated
|
|
|
public class SupplierController {
|
|
|
|
|
@@ -41,14 +41,14 @@ public class SupplierController {
|
|
|
|
|
|
@PostMapping("/create")
|
|
|
@Operation(summary = "创建资源供应商")
|
|
|
- @PreAuthorize("@ss.hasPermission('product:supplier:create')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('resource:supplier:create')")
|
|
|
public CommonResult<Long> createSupplier(@Valid @RequestBody SupplierSaveReqVO createReqVO) {
|
|
|
return success(supplierService.createSupplier(createReqVO));
|
|
|
}
|
|
|
|
|
|
@PutMapping("/update")
|
|
|
@Operation(summary = "更新资源供应商")
|
|
|
- @PreAuthorize("@ss.hasPermission('product:supplier:update')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('resource:supplier:update')")
|
|
|
public CommonResult<Boolean> updateSupplier(@Valid @RequestBody SupplierSaveReqVO updateReqVO) {
|
|
|
supplierService.updateSupplier(updateReqVO);
|
|
|
return success(true);
|
|
@@ -57,7 +57,7 @@ public class SupplierController {
|
|
|
@DeleteMapping("/delete")
|
|
|
@Operation(summary = "删除资源供应商")
|
|
|
@Parameter(name = "id", description = "编号", required = true)
|
|
|
- @PreAuthorize("@ss.hasPermission('product:supplier:delete')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('resource:supplier:delete')")
|
|
|
public CommonResult<Boolean> deleteSupplier(@RequestParam("id") Long id) {
|
|
|
supplierService.deleteSupplier(id);
|
|
|
return success(true);
|
|
@@ -66,7 +66,7 @@ public class SupplierController {
|
|
|
@GetMapping("/get")
|
|
|
@Operation(summary = "获得资源供应商")
|
|
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
|
- @PreAuthorize("@ss.hasPermission('product:supplier:query')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('resource:supplier:query')")
|
|
|
public CommonResult<SupplierRespVO> getSupplier(@RequestParam("id") Long id) {
|
|
|
SupplierRespVO supplier = supplierService.getSupplierById(id);
|
|
|
return success(supplier);
|
|
@@ -74,7 +74,7 @@ public class SupplierController {
|
|
|
|
|
|
@GetMapping("/page")
|
|
|
@Operation(summary = "获得资源供应商分页")
|
|
|
- @PreAuthorize("@ss.hasPermission('product:supplier:query')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('resource:supplier:query')")
|
|
|
public CommonResult<PageResult<SupplierRespVO>> getSupplierPage(@Valid SupplierPageReqVO pageReqVO) {
|
|
|
PageResult<SupplierRespVO> pageResult = supplierService.getSupplierPage(pageReqVO);
|
|
|
return success(BeanUtils.toBean(pageResult, SupplierRespVO.class));
|
|
@@ -82,7 +82,7 @@ public class SupplierController {
|
|
|
|
|
|
@GetMapping("/export-excel")
|
|
|
@Operation(summary = "导出资源供应商 Excel")
|
|
|
- @PreAuthorize("@ss.hasPermission('product:supplier:export')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('resource:supplier:export')")
|
|
|
@OperateLog(type = EXPORT,enable = false)
|
|
|
public void exportSupplierExcel(@Valid SupplierPageReqVO pageReqVO,
|
|
|
HttpServletResponse response) throws IOException {
|
|
@@ -95,7 +95,7 @@ public class SupplierController {
|
|
|
|
|
|
@PutMapping("/update-status")
|
|
|
@Operation(summary = "修改用户状态")
|
|
|
- @PreAuthorize("@ss.hasPermission('product:supplier:update')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('resource:supplier:update')")
|
|
|
public CommonResult<Boolean> updateUserStatus(@Valid @RequestBody SupplierUpdateStatusReqVO reqVO) {
|
|
|
supplierService.updateUserStatus(reqVO.getId(), reqVO.getStatus());
|
|
|
return success(true);
|
|
@@ -122,7 +122,7 @@ public class SupplierController {
|
|
|
@Parameter(name = "file", description = "Excel 文件", required = true),
|
|
|
@Parameter(name = "updateSupport", description = "是否支持更新,默认为 false", example = "true")
|
|
|
})
|
|
|
- @PreAuthorize("@ss.hasPermission('product:supplier:import')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('resource:supplier:import')")
|
|
|
public CommonResult<SupplierImportRespVO> importExcel(@RequestParam("file") MultipartFile file,
|
|
|
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport) throws Exception {
|
|
|
List<SupplierImportExcelVO> list = ExcelUtils.read(file, SupplierImportExcelVO.class);
|