|
@@ -37,20 +37,20 @@ import static com.yc.ship.framework.operatelog.core.enums.OperateTypeEnum.EXPORT
|
|
|
public class ProductSupplierController {
|
|
|
|
|
|
@Resource
|
|
|
- private ProductSupplierService supplierService;
|
|
|
+ private ProductSupplierService productSupplierService;
|
|
|
|
|
|
@PostMapping("/create")
|
|
|
@Operation(summary = "创建资源供应商")
|
|
|
@PreAuthorize("@ss.hasPermission('resource:supplier:create')")
|
|
|
public CommonResult<Long> createSupplier(@Valid @RequestBody SupplierSaveReqVO createReqVO) {
|
|
|
- return success(supplierService.createSupplier(createReqVO));
|
|
|
+ return success(productSupplierService.createSupplier(createReqVO));
|
|
|
}
|
|
|
|
|
|
@PutMapping("/update")
|
|
|
@Operation(summary = "更新资源供应商")
|
|
|
@PreAuthorize("@ss.hasPermission('resource:supplier:update')")
|
|
|
public CommonResult<Boolean> updateSupplier(@Valid @RequestBody SupplierSaveReqVO updateReqVO) {
|
|
|
- supplierService.updateSupplier(updateReqVO);
|
|
|
+ productSupplierService.updateSupplier(updateReqVO);
|
|
|
return success(true);
|
|
|
}
|
|
|
|
|
@@ -59,7 +59,7 @@ public class ProductSupplierController {
|
|
|
@Parameter(name = "id", description = "编号", required = true)
|
|
|
@PreAuthorize("@ss.hasPermission('resource:supplier:delete')")
|
|
|
public CommonResult<Boolean> deleteSupplier(@RequestParam("id") Long id) {
|
|
|
- supplierService.deleteSupplier(id);
|
|
|
+ productSupplierService.deleteSupplier(id);
|
|
|
return success(true);
|
|
|
}
|
|
|
|
|
@@ -68,7 +68,7 @@ public class ProductSupplierController {
|
|
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
|
@PreAuthorize("@ss.hasPermission('resource:supplier:query')")
|
|
|
public CommonResult<SupplierRespVO> getSupplier(@RequestParam("id") Long id) {
|
|
|
- SupplierRespVO supplier = supplierService.getSupplierById(id);
|
|
|
+ SupplierRespVO supplier = productSupplierService.getSupplierById(id);
|
|
|
return success(supplier);
|
|
|
}
|
|
|
|
|
@@ -76,7 +76,7 @@ public class ProductSupplierController {
|
|
|
@Operation(summary = "获得资源供应商分页")
|
|
|
@PreAuthorize("@ss.hasPermission('resource:supplier:query')")
|
|
|
public CommonResult<PageResult<SupplierRespVO>> getSupplierPage(@Valid SupplierPageReqVO pageReqVO) {
|
|
|
- PageResult<SupplierRespVO> pageResult = supplierService.getSupplierPage(pageReqVO);
|
|
|
+ PageResult<SupplierRespVO> pageResult = productSupplierService.getSupplierPage(pageReqVO);
|
|
|
return success(BeanUtils.toBean(pageResult, SupplierRespVO.class));
|
|
|
}
|
|
|
|
|
@@ -87,7 +87,7 @@ public class ProductSupplierController {
|
|
|
public void exportSupplierExcel(@Valid SupplierPageReqVO pageReqVO,
|
|
|
HttpServletResponse response) throws IOException {
|
|
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
|
- List<SupplierRespVO> list = supplierService.getSupplierPage(pageReqVO).getList();
|
|
|
+ List<SupplierRespVO> list = productSupplierService.getSupplierPage(pageReqVO).getList();
|
|
|
// 导出 Excel
|
|
|
ExcelUtils.write(response, "资源供应商.xls", "数据", SupplierRespVO.class,
|
|
|
BeanUtils.toBean(list, SupplierRespVO.class));
|
|
@@ -97,7 +97,7 @@ public class ProductSupplierController {
|
|
|
@Operation(summary = "修改用户状态")
|
|
|
@PreAuthorize("@ss.hasPermission('resource:supplier:update')")
|
|
|
public CommonResult<Boolean> updateUserStatus(@Valid @RequestBody SupplierUpdateStatusReqVO reqVO) {
|
|
|
- supplierService.updateUserStatus(reqVO.getId(), reqVO.getStatus());
|
|
|
+ productSupplierService.updateUserStatus(reqVO.getId(), reqVO.getStatus());
|
|
|
return success(true);
|
|
|
}
|
|
|
|
|
@@ -126,7 +126,7 @@ public class ProductSupplierController {
|
|
|
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);
|
|
|
- return success(supplierService.importSupplierList(list, updateSupport));
|
|
|
+ return success(productSupplierService.importSupplierList(list, updateSupport));
|
|
|
}
|
|
|
|
|
|
@GetMapping({"/list-all-simple", "/simple-list"})
|
|
@@ -134,7 +134,7 @@ public class ProductSupplierController {
|
|
|
public CommonResult<List<SupplierSimpleRespVO>> getSimpleList(SupplierListReqVO reqVO) {
|
|
|
|
|
|
reqVO.setUseStatus(UseStatusEnum.ENABLE.getStatus());
|
|
|
- List<ProductSupplierDO> list= supplierService.getSimpleListByCategory(reqVO);
|
|
|
+ List<ProductSupplierDO> list= productSupplierService.getSimpleListByCategory(reqVO);
|
|
|
|
|
|
return success(BeanUtils.toBean(list, SupplierSimpleRespVO.class));
|
|
|
}
|