Sfoglia il codice sorgente

包冲突修改名称

lishiqiang 2 giorni fa
parent
commit
88ea71f4b3

+ 10 - 10
ship-module-resource/ship-module-resource-biz/src/main/java/com/yc/ship/module/resource/controller/admin/supplier/ProductSupplierController.java

@@ -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));
     }

+ 2 - 2
ship-module-resource/ship-module-resource-biz/src/main/java/com/yc/ship/module/resource/service/resource/ResourceServiceImpl.java

@@ -54,7 +54,7 @@ public class ResourceServiceImpl implements ResourceService {
     private ResourceMapper resourceMapper;
 
     @Resource
-    private ProductSupplierMapper supplierMapper;
+    private ProductSupplierMapper productSupplierMapper;
 
     String PLAT_SERVICE = "platSupplierTradeService";
     String STANDARD_SERVICE = "standardSupplierTradeService";
@@ -134,7 +134,7 @@ public class ResourceServiceImpl implements ResourceService {
     @Cacheable(cacheNames = RedisKeyConstants.ACCESS_PRODUCT_LIST+"#60", key = "#supplierId")
     public List<ResourceAccessRespVO> getProductListByAccessList(String supplierId) {
         List<ResourceAccessRespVO> list = new ArrayList<>();
-        ProductSupplierDO supplierDO = supplierMapper.selectById(supplierId);
+        ProductSupplierDO supplierDO = productSupplierMapper.selectById(supplierId);
         if(supplierDO!=null && supplierDO.getIsSystemDirect()==1){
             if(ZSHL_SERVICE.equals(supplierDO.getDirectServer())){
                 //九凤谷票务

+ 19 - 20
ship-module-resource/ship-module-resource-biz/src/main/java/com/yc/ship/module/resource/service/ship/ResourceShipServiceImpl.java

@@ -1,21 +1,20 @@
 package com.yc.ship.module.resource.service.ship;
 
-import org.springframework.stereotype.Service;
-import javax.annotation.Resource;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.*;
-import com.yc.ship.module.resource.controller.admin.ship.vo.*;
-import com.yc.ship.module.resource.dal.dataobject.ship.ResourceShipDO;
 import com.yc.ship.framework.common.pojo.PageResult;
-import com.yc.ship.framework.common.pojo.PageParam;
 import com.yc.ship.framework.common.util.object.BeanUtils;
-
+import com.yc.ship.module.resource.controller.admin.ship.vo.ResourceShipPageReqVO;
+import com.yc.ship.module.resource.controller.admin.ship.vo.ResourceShipSaveReqVO;
+import com.yc.ship.module.resource.dal.dataobject.ship.ResourceShipDO;
 import com.yc.ship.module.resource.dal.mysql.ship.ResourceShipMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.validation.annotation.Validated;
+
+import javax.annotation.Resource;
+import java.util.Collections;
+import java.util.List;
 
 import static com.yc.ship.framework.common.exception.util.ServiceExceptionUtil.exception;
-import static com.yc.ship.module.resource.enums.ErrorCodeConstants.*;
+import static com.yc.ship.module.resource.enums.ErrorCodeConstants.SHIP_NOT_EXISTS;
 
 /**
  * 资源管理-游轮管理 Service 实现类
@@ -27,13 +26,13 @@ import static com.yc.ship.module.resource.enums.ErrorCodeConstants.*;
 public class ResourceShipServiceImpl implements ResourceShipService {
 
     @Resource
-    private ResourceShipMapper shipMapper;
+    private ResourceShipMapper resourceShipMapper;
 
     @Override
     public Long createShip(ResourceShipSaveReqVO createReqVO) {
         // 插入
         ResourceShipDO ship = BeanUtils.toBean(createReqVO, ResourceShipDO.class);
-        shipMapper.insert(ship);
+        resourceShipMapper.insert(ship);
         // 返回
         return ship.getId();
     }
@@ -44,7 +43,7 @@ public class ResourceShipServiceImpl implements ResourceShipService {
         validateShipExists(updateReqVO.getId());
         // 更新
         ResourceShipDO updateObj = BeanUtils.toBean(updateReqVO, ResourceShipDO.class);
-        shipMapper.updateById(updateObj);
+        resourceShipMapper.updateById(updateObj);
     }
 
     @Override
@@ -52,28 +51,28 @@ public class ResourceShipServiceImpl implements ResourceShipService {
         // 校验存在
         validateShipExists(id);
         // 删除
-        shipMapper.deleteById(id);
+        resourceShipMapper.deleteById(id);
     }
 
     private void validateShipExists(Long id) {
-        if (shipMapper.selectById(id) == null) {
+        if (resourceShipMapper.selectById(id) == null) {
             throw exception(SHIP_NOT_EXISTS);
         }
     }
 
     @Override
     public ResourceShipDO getShip(Long id) {
-        return shipMapper.selectById(id);
+        return resourceShipMapper.selectById(id);
     }
 
     @Override
     public PageResult<ResourceShipDO> getShipPage(ResourceShipPageReqVO pageReqVO) {
-        return shipMapper.selectPage(pageReqVO);
+        return resourceShipMapper.selectPage(pageReqVO);
     }
 
     @Override
     public List<ResourceShipDO> getListSimple() {
-        return shipMapper.selectList();
+        return resourceShipMapper.selectList();
     }
 
     @Override
@@ -81,7 +80,7 @@ public class ResourceShipServiceImpl implements ResourceShipService {
         if(ids.isEmpty()) {
             return Collections.emptyList();
         }
-        return shipMapper.selectByIds(ids);
+        return resourceShipMapper.selectByIds(ids);
     }
 
 }

+ 11 - 11
ship-module-resource/ship-module-resource-biz/src/main/java/com/yc/ship/module/resource/service/supplier/ProductSupplierServiceImpl.java

@@ -37,7 +37,7 @@ import static com.yc.ship.module.system.enums.ErrorCodeConstants.USER_IMPORT_LIS
 public class ProductSupplierServiceImpl implements ProductSupplierService {
 
     @Resource
-    private ProductSupplierMapper supplierMapper;
+    private ProductSupplierMapper productSupplierMapper;
     @Autowired
     private SupplierCategoryService supplierCategoryService;
 
@@ -49,7 +49,7 @@ public class ProductSupplierServiceImpl implements ProductSupplierService {
         Long id = IdWorker.getId(supplier);
         supplier.setId(id);
         supplier.setDeleted(false);
-        supplierMapper.insert(supplier);
+        productSupplierMapper.insert(supplier);
         List<Long> resourceList = createReqVO.getResourceType();
         if (CollUtil.isNotEmpty(resourceList)) {
             supplierCategoryService.saveBatch(resourceList, id);
@@ -65,7 +65,7 @@ public class ProductSupplierServiceImpl implements ProductSupplierService {
         validateSupplierExists(updateReqVO.getId());
         // 更新
         ProductSupplierDO updateObj = BeanUtils.toBean(updateReqVO, ProductSupplierDO.class);
-        supplierMapper.updateById(updateObj);
+        productSupplierMapper.updateById(updateObj);
         supplierCategoryService.deleteSupplierCategory(updateObj.getId());
         List<Long> resourceList = updateReqVO.getResourceType();
         if (CollUtil.isNotEmpty(resourceList)) {
@@ -79,24 +79,24 @@ public class ProductSupplierServiceImpl implements ProductSupplierService {
         // 校验存在
         validateSupplierExists(id);
         // 删除
-        supplierMapper.deleteById(id);
+        productSupplierMapper.deleteById(id);
         supplierCategoryService.deleteSupplierCategory(id);
     }
 
     private void validateSupplierExists(Long id) {
-        if (supplierMapper.selectById(id) == null) {
+        if (productSupplierMapper.selectById(id) == null) {
             throw exception(ErrorCodeConstants.SUPPLIER_NOT_EXISTS);
         }
     }
 
     @Override
     public ProductSupplierDO getSupplier(Long id) {
-        return  supplierMapper.selectById(id);
+        return  productSupplierMapper.selectById(id);
     }
 
     @Override
     public SupplierRespVO getSupplierById(Long id) {
-        ProductSupplierDO supplierDO = supplierMapper.selectById(id);
+        ProductSupplierDO supplierDO = productSupplierMapper.selectById(id);
         List<SupplierCategoryDO> list = supplierCategoryService.getSupplierCategoryList(id);
         List<Long> categoryList = list.stream().map(SupplierCategoryDO::getCategoryId).collect(Collectors.toList());
         SupplierRespVO respVO = BeanUtils.toBean(supplierDO, SupplierRespVO.class);
@@ -107,7 +107,7 @@ public class ProductSupplierServiceImpl implements ProductSupplierService {
     @Override
     public PageResult<SupplierRespVO> getSupplierPage(SupplierPageReqVO pageReqVO) {
         IPage<SupplierRespVO> iPage = MyBatisUtils.buildPage(pageReqVO);
-        IPage<SupplierRespVO> page = supplierMapper.queryPage(iPage,pageReqVO);
+        IPage<SupplierRespVO> page = productSupplierMapper.queryPage(iPage,pageReqVO);
         return new PageResult<>(page.getRecords(),page.getTotal());
     }
 
@@ -119,7 +119,7 @@ public class ProductSupplierServiceImpl implements ProductSupplierService {
         ProductSupplierDO supplier = new ProductSupplierDO();
         supplier.setId(id);
         supplier.setUseStatus(status);
-        supplierMapper.updateById(supplier);
+        productSupplierMapper.updateById(supplier);
     }
 
     @Override
@@ -140,12 +140,12 @@ public class ProductSupplierServiceImpl implements ProductSupplierService {
     @Override
     public List<ProductSupplierDO> getSimpleListByCategory(SupplierListReqVO reqVO) {
 
-        return supplierMapper.getSimpleListByCategory(reqVO);
+        return productSupplierMapper.getSimpleListByCategory(reqVO);
     }
 
     @Override
     public SupplierRespVO getSupplierByDirectAccount(String directAccount) {
-        List<ProductSupplierDO> lidst = supplierMapper.selectList(ProductSupplierDO::getDirectAccount, directAccount);
+        List<ProductSupplierDO> lidst = productSupplierMapper.selectList(ProductSupplierDO::getDirectAccount, directAccount);
         if(lidst!=null && lidst.size()>0){
             ProductSupplierDO supplierDO = lidst.get(0);
             SupplierRespVO respVO = BeanUtils.toBean(supplierDO, SupplierRespVO.class);

+ 10 - 0
ship-server-web/pom.xml

@@ -33,6 +33,16 @@
             <artifactId>module-infra-biz</artifactId>
             <version>${revision}</version>
         </dependency>
+        <dependency>
+            <groupId>com.yc.ship</groupId>
+            <artifactId>module-buss-biz</artifactId>
+            <version>${revision}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.yc.ship</groupId>
+            <artifactId>module-member-biz</artifactId>
+            <version>${revision}</version>
+        </dependency>
         <dependency>
             <groupId>com.yc.ship</groupId>
             <artifactId>ship-module-ota-biz</artifactId>