From 5f0481576f61e690dd1f4c471fd0b121855c6c08 Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Wed, 28 Aug 2024 15:21:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=B5=81=E5=85=AC=E5=8F=B8=E5=A2=9E?= =?UTF-8?q?=E5=88=A0=E6=94=B9=EF=BC=8C=E5=8F=8A=E5=85=B6=E4=BB=96BUG?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 10 +- hiver-admin/test-output/test-report.html | 16 +- .../hiver/core/common/utils/SecurityUtil.java | 2 +- .../bill/service/impl/BillServiceImpl.java | 16 +- .../hiver/mall/controller/SaleController.java | 5 +- .../mall/dao/mapper/ReturnDetailMapper.java | 3 + .../debt/service/impl/DebtServiceImpl.java | 38 +++- .../cc/hiver/mall/debt/vo/DebtOfShopVo.java | 5 + .../LogisticsEntruckingLogController.java | 103 +++++++++++ .../entity/LogisticsEntruckingLog.java | 53 ++++++ .../mapper/LogisticsEntruckingLogMapper.java | 22 +++ .../LogisticsEntruckingLogService.java | 19 ++ .../LogisticsEntruckingLogServiceImpl.java | 31 ++++ .../vo/LogisticsEntruckingLogQueryVo.java | 32 ++++ .../controller/LogisticsOrderController.java | 103 +++++++++++ .../logisticsorder/entity/LogisticsOrder.java | 111 ++++++++++++ .../mapper/LogisticsOrderMapper.java | 22 +++ .../service/LogisticsOrderService.java | 19 ++ .../impl/LogisticsOrderServiceImpl.java | 32 ++++ .../vo/LogisticsOrderQueryVo.java | 43 +++++ .../controller/LogisticsRouteController.java | 103 +++++++++++ .../logisticsroute/entity/LogisticsRoute.java | 35 ++++ .../mapper/LogisticsRouteMapper.java | 22 +++ .../service/LogisticsRouteService.java | 19 ++ .../impl/LogisticsRouteServiceImpl.java | 31 ++++ .../vo/LogisticsRouteQueryVo.java | 26 +++ .../LogisticsStationController.java | 106 +++++++++++ .../entity/LogisticsStation.java | 39 ++++ .../mapper/LogisticsStationMapper.java | 22 +++ .../service/LogisticsStationService.java | 19 ++ .../impl/LogisticsStationServiceImpl.java | 32 ++++ .../vo/LogisticsStationQueryVo.java | 21 +++ .../LogisticsTransferStationController.java | 103 +++++++++++ .../entity/LogisticsTransferStation.java | 35 ++++ .../LogisticsTransferStationMapper.java | 22 +++ .../LogisticsTransferStationService.java | 19 ++ .../LogisticsTransferStationServiceImpl.java | 32 ++++ .../vo/LogisticsTransferStationQueryVo.java | 28 +++ .../controller/LogisticsUserController.java | 103 +++++++++++ .../logisticsuser/entity/LogisticsUser.java | 36 ++++ .../mapper/LogisticsUserMapper.java | 22 +++ .../service/LogisticsUserService.java | 19 ++ .../impl/LogisticsUserServiceImpl.java | 32 ++++ .../vo/LogisticsUserQueryVo.java | 25 +++ .../java/cc/hiver/mall/pojo/vo/SaleAllVO.java | 3 + .../service/mybatis/ReturnDetailService.java | 3 + .../mybatis/ReturnDetailServiceImpl.java | 11 ++ .../resources/mapper/DealingsRecordMapper.xml | 1 + .../mapper/LogisticsEntruckingLogMapper.xml | 99 +++++++++++ .../resources/mapper/LogisticsOrderMapper.xml | 111 ++++++++++++ .../resources/mapper/LogisticsRouteMapper.xml | 159 +++++++++++++++++ .../mapper/LogisticsStationMapper.xml | 167 ++++++++++++++++++ .../mapper/LogisticsTransferStationMapper.xml | 159 +++++++++++++++++ .../resources/mapper/LogisticsUserMapper.xml | 155 ++++++++++++++++ .../resources/mapper/ReturnDetailMapper.xml | 12 ++ .../resources/mapper/ReturnSaleMapper.xml | 2 +- .../resources/mapper/SaleDetailMapper.xml | 3 +- 57 files changed, 2491 insertions(+), 30 deletions(-) create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/controller/LogisticsEntruckingLogController.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/entity/LogisticsEntruckingLog.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/mapper/LogisticsEntruckingLogMapper.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/service/LogisticsEntruckingLogService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/service/impl/LogisticsEntruckingLogServiceImpl.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/vo/LogisticsEntruckingLogQueryVo.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/controller/LogisticsOrderController.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/entity/LogisticsOrder.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/mapper/LogisticsOrderMapper.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/service/LogisticsOrderService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/service/impl/LogisticsOrderServiceImpl.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/vo/LogisticsOrderQueryVo.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/controller/LogisticsRouteController.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/entity/LogisticsRoute.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/mapper/LogisticsRouteMapper.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/service/LogisticsRouteService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/service/impl/LogisticsRouteServiceImpl.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/vo/LogisticsRouteQueryVo.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/controller/LogisticsStationController.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/entity/LogisticsStation.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/mapper/LogisticsStationMapper.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/service/LogisticsStationService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/service/impl/LogisticsStationServiceImpl.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/vo/LogisticsStationQueryVo.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/controller/LogisticsTransferStationController.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/entity/LogisticsTransferStation.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/mapper/LogisticsTransferStationMapper.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/service/LogisticsTransferStationService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/service/impl/LogisticsTransferStationServiceImpl.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/vo/LogisticsTransferStationQueryVo.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/controller/LogisticsUserController.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/entity/LogisticsUser.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/mapper/LogisticsUserMapper.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/service/LogisticsUserService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/service/impl/LogisticsUserServiceImpl.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/vo/LogisticsUserQueryVo.java create mode 100644 hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsEntruckingLogMapper.xml create mode 100644 hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsOrderMapper.xml create mode 100644 hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsRouteMapper.xml create mode 100644 hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsStationMapper.xml create mode 100644 hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsTransferStationMapper.xml create mode 100644 hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsUserMapper.xml diff --git a/hiver-admin/src/main/resources/application.yml b/hiver-admin/src/main/resources/application.yml index d3d832b1..6a77078a 100644 --- a/hiver-admin/src/main/resources/application.yml +++ b/hiver-admin/src/main/resources/application.yml @@ -25,8 +25,8 @@ spring: timeout-per-shutdown-phase: 10S # 数据源 datasource: -# url: jdbc:mysql://154.8.162.157:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true - url: jdbc:mysql://8.140.198.243:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true + url: jdbc:mysql://154.8.162.157:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true +# url: jdbc:mysql://8.140.198.243:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true username: reddoor # Jasypt加密 可到common-utils中找到JasyptUtil加解密工具类生成加密结果 格式为ENC(加密结果) 以下解密结果为123456 password: ENC(Zla4U4+yRLPhicvuX2TmiEgxEpzP4dk8BHzFDEtiEhwLQIIaftZrrEUJZce6efoe) @@ -67,8 +67,8 @@ spring: ddl-auto: update # Redis 若设有密码自行添加配置password redis: -# host: 154.8.162.157 - host: 8.140.198.243 + host: 154.8.162.157 +# host: 8.140.198.243 password: reddoor168 # 数据库索引 默认0 database: 1 @@ -173,7 +173,7 @@ hiver: # token过期时间 redis模式下有请求自动刷新过期时间(分钟) tokenExpireTime: 60 # 用户选择 保存登录状态/记住我 对应token过期时间 不会自动刷新过期时间(天) - saveLoginTime: 7 + saveLoginTime: 365 # 限制用户登陆错误次数(次) loginTimeLimit: 10 # 错误超过次数后多少分钟后才能继续登录(分钟) diff --git a/hiver-admin/test-output/test-report.html b/hiver-admin/test-output/test-report.html index 1c37bf37..acde873a 100644 --- a/hiver-admin/test-output/test-report.html +++ b/hiver-admin/test-output/test-report.html @@ -35,7 +35,7 @@ Hiver
  • - 24, 2024 11:36:29 + 28, 2024 10:01:13
  • @@ -84,7 +84,7 @@

    passTest

    -

    11:36:29 / 0.019 secs

    +

    10:01:14 / 0.016 secs

    @@ -92,9 +92,9 @@
    #test-id=1
    passTest
    -08.24.2024 11:36:29 -08.24.2024 11:36:29 -0.019 secs +08.28.2024 10:01:14 +08.28.2024 10:01:14 +0.016 secs
    @@ -104,7 +104,7 @@ Pass - 11:36:29 + 10:01:14 Test passed @@ -128,13 +128,13 @@

    Started

    -

    24, 2024 11:36:29

    +

    28, 2024 10:01:13

    Ended

    -

    24, 2024 11:36:29

    +

    28, 2024 10:01:14

    diff --git a/hiver-core/src/main/java/cc/hiver/core/common/utils/SecurityUtil.java b/hiver-core/src/main/java/cc/hiver/core/common/utils/SecurityUtil.java index f29d8c79..bc91b199 100644 --- a/hiver-core/src/main/java/cc/hiver/core/common/utils/SecurityUtil.java +++ b/hiver-core/src/main/java/cc/hiver/core/common/utils/SecurityUtil.java @@ -98,7 +98,7 @@ public class SecurityUtil { final User user = userToDTO(userDao.findByUsername(username)); // 缓存 final Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd hh:mm:ss").create(); - redisTemplate.set(key, gson.toJson(user), 15L, TimeUnit.DAYS); + redisTemplate.set(key, gson.toJson(user), tokenProperties.getSaveLoginTime(), TimeUnit.DAYS); return user; } diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/bill/service/impl/BillServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/bill/service/impl/BillServiceImpl.java index eb01bee5..c0945660 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/bill/service/impl/BillServiceImpl.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/bill/service/impl/BillServiceImpl.java @@ -1,8 +1,10 @@ package cc.hiver.mall.bill.service.impl; +import cc.hiver.core.common.constant.DealingsRecordConstant; import cc.hiver.core.common.utils.StringUtils; import cc.hiver.mall.bill.service.BillService; import cc.hiver.mall.bill.vo.*; +import cc.hiver.mall.common.constant.StockLogConstant; import cc.hiver.mall.debt.entity.Debt; import cc.hiver.mall.debt.service.DebtService; import cc.hiver.mall.entity.*; @@ -410,7 +412,8 @@ public class BillServiceImpl implements BillService { // 开始封装数据 for (SupplierBillPurchaseVo supplierBillPurchaseVo : records) { final String purchaseId = supplierBillPurchaseVo.getPurchaseId(); - if(purchaseDetailMap.containsKey(purchaseId)){ + if(purchaseDetailMap.containsKey(purchaseId) && + (DealingsRecordConstant.DEALINGS_TYPE[6].equals(supplierBillPurchaseVo.getDealingsType()) || DealingsRecordConstant.DEALINGS_TYPE[7].equals(supplierBillPurchaseVo.getDealingsType()))){ // 封装入库单信息 final List purchaseDetailList = purchaseDetailMap.get(purchaseId); // 根据商品id分类 @@ -438,6 +441,10 @@ public class BillServiceImpl implements BillService { final List stockLogList1 = stockLogMap.get(value.get(0).getId()); if (stockLogList1 != null && !stockLogList1.isEmpty()) { for (StockLog stockLog : stockLogList1) { + // 这里只取入库的记录,因为20240826出现了入库id和入库退货的id相同的情况 + if(StockLogConstant.CHANGE_TYPE[1].equals(stockLog.getChangeType())){ + continue; + } final BillAttributeListVo billAttributeListVo = new BillAttributeListVo(); billAttributeListVo.setAttributeList(stockLog.getAttributeList()); billAttributeListVo.setProductCount(stockLog.getProductCount()); @@ -454,7 +461,8 @@ public class BillServiceImpl implements BillService { supplierBillPurchaseVo.setBillSaleDetailVos(billSaleDetailVos); } } - if(purchaseReturnDetailMap.containsKey(purchaseId)){ + if(purchaseReturnDetailMap.containsKey(purchaseId) && + (DealingsRecordConstant.DEALINGS_TYPE[9].equals(supplierBillPurchaseVo.getDealingsType()) || DealingsRecordConstant.DEALINGS_TYPE[10].equals(supplierBillPurchaseVo.getDealingsType()))){ // 封装入库单信息 final List purchaseReturnDetailList = purchaseReturnDetailMap.get(purchaseId); // 根据商品id分类 @@ -482,6 +490,10 @@ public class BillServiceImpl implements BillService { final List stockLogList1 = stockLogMap.get(value.get(0).getId()); if (stockLogList1 != null && !stockLogList1.isEmpty()) { for (StockLog stockLog : stockLogList1) { + // 这里只取出库的记录,因为20240826出现了入库id和入库退货的id相同的情况 + if(StockLogConstant.CHANGE_TYPE[0].equals(stockLog.getChangeType())){ + continue; + } final BillAttributeListVo billAttributeListVo = new BillAttributeListVo(); billAttributeListVo.setAttributeList(stockLog.getAttributeList()); billAttributeListVo.setProductCount(stockLog.getProductCount()); diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SaleController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SaleController.java index 89d95c95..686de90a 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SaleController.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SaleController.java @@ -649,8 +649,9 @@ public class SaleController { // 进货成本 final BigDecimal purchasingCost = purchaseService.getPurchasingCost(shopId, startTime, endTime); saleAllVO.setPurchasingCost(purchasingCost); - - + // 退货总成本 + final BigDecimal saleReturnCost = returnDetailService.getsaleReturnCost(shopId, startTime, endTime); + saleAllVO.setSaleReturnCost(saleReturnCost); } catch (Exception e) { log.error(e.getMessage(), e); return ResultUtil.error(500, e.getMessage()); diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ReturnDetailMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ReturnDetailMapper.java index b6d3f4a9..fb07a93a 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ReturnDetailMapper.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ReturnDetailMapper.java @@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; +import java.math.BigDecimal; import java.util.List; @Repository @@ -51,4 +52,6 @@ public interface ReturnDetailMapper extends BaseMapper { void putInUpdatePurchasePrice(@Param("purchaseDetails") List purchaseDetails); void deleteBySaleId(@Param("saleId")String saleId); + + BigDecimal getsaleReturnCost(@Param("shopId") String shopId,@Param("startTime") String startTime,@Param("endTime") String endTime); } \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/service/impl/DebtServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/service/impl/DebtServiceImpl.java index 00af41de..aa8ab64b 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/service/impl/DebtServiceImpl.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/service/impl/DebtServiceImpl.java @@ -4,6 +4,7 @@ import cc.hiver.core.common.constant.DealingsRecordConstant; import cc.hiver.core.common.exception.HiverException; import cc.hiver.core.common.utils.SecurityUtil; import cc.hiver.core.entity.User; +import cc.hiver.mall.bill.vo.SupplierBillQueryVo; import cc.hiver.mall.debt.constant.DebtConstant; import cc.hiver.mall.debt.entity.Debt; import cc.hiver.mall.debt.mapper.DebtMapper; @@ -20,6 +21,8 @@ import cc.hiver.mall.purchasereturn.entity.PurchaseReturn; import cc.hiver.mall.service.SupplierService; import cc.hiver.mall.service.mybatis.CustomerService; import cc.hiver.mall.service.mybatis.DealingsRecordService; +import cc.hiver.mall.service.mybatis.PurchaseDetailService; +import cc.hiver.mall.utils.DateUtil; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.jetbrains.annotations.Nullable; @@ -48,6 +51,9 @@ public class DebtServiceImpl extends ServiceImpl implements De @Autowired private DealingsRecordService dealingsRecordService; + @Autowired + private PurchaseDetailService purchaseDetailService; + /** * 根据店铺id查询欠款列表 * @@ -79,7 +85,7 @@ public class DebtServiceImpl extends ServiceImpl implements De debt.setShopId(shopId); final String userId = debt.getUserId(); final User user = securityUtil.getCurrUser(); - String userType = debt.getUserType(); + final String userType = debt.getUserType(); String dealingsUserId = ""; String dealingsUserName = ""; if (DebtConstant.USER_TYPE[0].equals(userType)) { @@ -170,7 +176,7 @@ public class DebtServiceImpl extends ServiceImpl implements De debt.setUserPhone(customer.getPhone()); debt.setUserAdress(customer.getAddress()); // 本单欠款 - BigDecimal noEarn = saleQueryDTO.getSale().getNoEarn() == null ? BigDecimal.ZERO : saleQueryDTO.getSale().getNoEarn(); + final BigDecimal noEarn = saleQueryDTO.getSale().getNoEarn() == null ? BigDecimal.ZERO : saleQueryDTO.getSale().getNoEarn(); debt.setAmountOwed(noEarn); debt.setUserType(DebtConstant.USER_TYPE[0]); final String shopId = securityUtil.getShopId(); @@ -178,7 +184,7 @@ public class DebtServiceImpl extends ServiceImpl implements De final String userId = saleQueryDTO.getSale().getUserId(); final Debt oldDebt = debtMapper.selectByUserId(shopId, userId); BigDecimal lastDebtAmount = BigDecimal.ZERO; - BigDecimal newDebtAmount; + final BigDecimal newDebtAmount; // 欠款抵扣,需要单独从欠款中减掉 final BigDecimal debtDeductionAmount = saleQueryDTO.getSale().getDebtDeductionAmount() == null ? BigDecimal.ZERO : saleQueryDTO.getSale().getDebtDeductionAmount(); @@ -240,12 +246,12 @@ public class DebtServiceImpl extends ServiceImpl implements De final String shopId = securityUtil.getShopId(); final Debt oldDebt = debtMapper.selectByUserId(shopId, purchase.getSupplierId()); if (oldDebt == null) { - throw new HiverException("供应商不存在!"); + throw new HiverException("供应商欠款信息不存在!"); } BigDecimal lastDebtAmount = BigDecimal.ZERO; - BigDecimal newDebtAmount; + final BigDecimal newDebtAmount; // 本单欠款 - BigDecimal noPay = purchase.getNoPay() == null ? BigDecimal.ZERO : purchase.getNoPay(); + final BigDecimal noPay = purchase.getNoPay() == null ? BigDecimal.ZERO : purchase.getNoPay(); // 余额抵扣,需要从欠款中减掉 final BigDecimal balanceDeductionAmount = purchase.getBalanceDeductionAmount() == null ? BigDecimal.ZERO : purchase.getBalanceDeductionAmount(); lastDebtAmount = oldDebt.getAmountOwed() == null ? BigDecimal.ZERO : oldDebt.getAmountOwed(); @@ -282,6 +288,7 @@ public class DebtServiceImpl extends ServiceImpl implements De return debtMapper.getDebtByUserIds(userIds); } + @Override public Debt selectByUserId(String shopId, String userId) { return debtMapper.selectByUserId(shopId, userId); } @@ -338,7 +345,20 @@ public class DebtServiceImpl extends ServiceImpl implements De @Override public DebtOfShopVo getAllDebtByShopId(QueryDebtVo queryDebtVo) { - return debtMapper.getAllDebtByShopId(queryDebtVo); + final DebtOfShopVo allDebtByShopId = debtMapper.getAllDebtByShopId(queryDebtVo); + // 供货商获取今日进货总件数 + if(DebtConstant.USER_TYPE[1].equals(queryDebtVo.getUserType())){ + final SupplierBillQueryVo supplierBillQueryVo = new SupplierBillQueryVo(); + supplierBillQueryVo.setShopId(queryDebtVo.getShopId()); + final String todayStr = DateUtil.COMMON.getDateText(new Date()); + final String tomorrowStr = DateUtil.addDay(todayStr, 1); + supplierBillQueryVo.setStartDate(todayStr); + supplierBillQueryVo.setEndDate(tomorrowStr); + final Integer purchasingCount = purchaseDetailService.queryPurchasingCount(supplierBillQueryVo); + allDebtByShopId.setPurchasingCount(purchasingCount); + } + + return allDebtByShopId; } @Override @@ -349,9 +369,9 @@ public class DebtServiceImpl extends ServiceImpl implements De throw new HiverException("供应商不存在!"); } BigDecimal lastDebtAmount = BigDecimal.ZERO; - BigDecimal newDebtAmount; + final BigDecimal newDebtAmount; // 本单欠款 - BigDecimal alreadyPay = putOutPurchase.getAlreadyPay() == null ? BigDecimal.ZERO : putOutPurchase.getAlreadyPay(); + final BigDecimal alreadyPay = putOutPurchase.getAlreadyPay() == null ? BigDecimal.ZERO : putOutPurchase.getAlreadyPay(); // 上次欠款 lastDebtAmount = oldDebt.getAmountOwed() == null ? BigDecimal.ZERO : oldDebt.getAmountOwed(); // 计算欠款 diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/vo/DebtOfShopVo.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/vo/DebtOfShopVo.java index c8c400cf..d5f9970c 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/vo/DebtOfShopVo.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/vo/DebtOfShopVo.java @@ -16,4 +16,9 @@ public class DebtOfShopVo { * 欠款金额 * */ private BigDecimal amountOwed; + + /** + * 今日进货总件数 + */ + private Integer purchasingCount; } diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/controller/LogisticsEntruckingLogController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/controller/LogisticsEntruckingLogController.java new file mode 100644 index 00000000..c4c63f95 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/controller/LogisticsEntruckingLogController.java @@ -0,0 +1,103 @@ +package cc.hiver.mall.logisticsentruckinglog.controller; + +import cc.hiver.core.common.utils.ResultUtil; +import cc.hiver.core.common.vo.Result; +import cc.hiver.mall.logisticsentruckinglog.entity.LogisticsEntruckingLog; +import cc.hiver.mall.logisticsentruckinglog.service.LogisticsEntruckingLogService; +import cc.hiver.mall.logisticsentruckinglog.vo.LogisticsEntruckingLogQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; + +/** + * 物流装车记录控制器 + * + * @author 王富康 + * @date 2024/8/24 + */ +@Slf4j +@RestController +@Api(tags = "物流装车记录接口") +@RequestMapping("/hiver/app/logisticsEntruckingLog/") +@Transactional +public class LogisticsEntruckingLogController { + + @Autowired + private LogisticsEntruckingLogService logisticsEntruckingLogService; + + @PostMapping(value = "/addLogisticsEntruckingLog") + @ApiOperation("新增物流装车记录") + public Result addLogisticsEntruckingLog(@RequestBody LogisticsEntruckingLog logisticsEntruckingLog) { + + final boolean b = logisticsEntruckingLogService.saveOrUpdate(logisticsEntruckingLog); + if (b) { + return ResultUtil.success("保存成功!"); + } else { + return ResultUtil.error("保存失败!"); + } + } + + /** + * 更新物流装车记录 + * + * @param logisticsEntruckingLog + * @return Result + * @author 王富康 + * @date 2024/8/24 + */ + @PostMapping(value = "/updateLogisticsEntruckingLog") + @ApiOperation("更新物流装车记录") + public Result updateLogisticsEntruckingLog(@RequestBody LogisticsEntruckingLog logisticsEntruckingLog) { + if (StringUtils.isEmpty(logisticsEntruckingLog.getId())) { + return ResultUtil.error("装车记录id不能为空!"); + } + final boolean b = logisticsEntruckingLogService.saveOrUpdate(logisticsEntruckingLog); + if (b) { + return ResultUtil.success("保存成功!"); + } else { + return ResultUtil.error("保存失败!"); + } + } + + /** + * 删除物流装车记录 + * + * @param id + * @return Result + * @author 王富康 + * @date 2024/8/24 + */ + @PostMapping(value = "/deleteLogisticsEntruckingLog") + @ApiOperation("删除物流装车记录") + public Result deleteLogisticsEntruckingLog(String id) { + if (StringUtils.isEmpty(id)) { + return ResultUtil.error("装车记录id不能为空!"); + } + final boolean b = logisticsEntruckingLogService.removeById(id); + if (b) { + return ResultUtil.success("删除成功!"); + } else { + return ResultUtil.error("删除失败!"); + } + } + + /** + * 分页查询物流装车记录 + * + * @param logisticsEntruckingLogQueryVo + * @return Result> + * @author 王富康 + * @date 2024/8/24 + */ + @RequestMapping(value = "/getLogisticsEntruckingLogPageList", method = RequestMethod.POST) + @ApiOperation(value = "分页查询物流装车记录") + public Result> getLogisticsEntruckingLogPageList(@RequestBody(required = false) LogisticsEntruckingLogQueryVo logisticsEntruckingLogQueryVo) { + final IPage result = logisticsEntruckingLogService.getLogisticsEntruckingLogPageList(logisticsEntruckingLogQueryVo); + return new ResultUtil>().setData(result); + } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/entity/LogisticsEntruckingLog.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/entity/LogisticsEntruckingLog.java new file mode 100644 index 00000000..34d26de5 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/entity/LogisticsEntruckingLog.java @@ -0,0 +1,53 @@ +package cc.hiver.mall.logisticsentruckinglog.entity; + +import cc.hiver.core.base.HiverBaseEntity; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 物流装车记录实体 + * + * @author 王富康 + * @date 2024/8/24 + */ +@EqualsAndHashCode(callSuper = true) +@Data +@ApiModel(value = "物流装车记录表") +@TableName(value = "t_logistics_entrucking_log", autoResultMap = true) +public class LogisticsEntruckingLog extends HiverBaseEntity { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "物流公司id") + private String companyId; + + @ApiModelProperty(value = "物流公司名称") + private String companyName; + + @ApiModelProperty(value = "线路id") + private String circuitId; + + @ApiModelProperty(value = "线路名称") + private String circuitName; + + @ApiModelProperty(value = "车牌号") + private String carNumber; + + @ApiModelProperty(value = "司机姓名") + private String carUserName; + + @ApiModelProperty(value = "司机电话") + private String carPhone; + + @ApiModelProperty(value = "装车费") + private BigDecimal carFee; + + @ApiModelProperty(value = "运费") + private BigDecimal carFreight; + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/mapper/LogisticsEntruckingLogMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/mapper/LogisticsEntruckingLogMapper.java new file mode 100644 index 00000000..10e912b3 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/mapper/LogisticsEntruckingLogMapper.java @@ -0,0 +1,22 @@ +package cc.hiver.mall.logisticsentruckinglog.mapper; + +import cc.hiver.mall.logisticsentruckinglog.entity.LogisticsEntruckingLog; +import cc.hiver.mall.logisticsentruckinglog.vo.LogisticsEntruckingLogQueryVo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; + +public interface LogisticsEntruckingLogMapper extends BaseMapper { + + /** + * 分页查询物流装车记录 + * + * @param page + * @param logisticsEntruckingLogQueryVo + * @return IPage + * @author 王富康 + * @date 2024/8/24 + */ + IPage getLogisticsEntruckingLogPageList(Page page, @Param("queryParams") LogisticsEntruckingLogQueryVo logisticsEntruckingLogQueryVo); +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/service/LogisticsEntruckingLogService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/service/LogisticsEntruckingLogService.java new file mode 100644 index 00000000..16d1bef1 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/service/LogisticsEntruckingLogService.java @@ -0,0 +1,19 @@ +package cc.hiver.mall.logisticsentruckinglog.service; + +import cc.hiver.mall.logisticsentruckinglog.entity.LogisticsEntruckingLog; +import cc.hiver.mall.logisticsentruckinglog.vo.LogisticsEntruckingLogQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface LogisticsEntruckingLogService extends IService { + + /** + * 分页查询物流装车记录 + * + * @param logisticsEntruckingLogQueryVo + * @return IPage + * @author 王富康 + * @date 2024/8/24 + */ + IPage getLogisticsEntruckingLogPageList(LogisticsEntruckingLogQueryVo logisticsEntruckingLogQueryVo); +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/service/impl/LogisticsEntruckingLogServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/service/impl/LogisticsEntruckingLogServiceImpl.java new file mode 100644 index 00000000..62eed4a0 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/service/impl/LogisticsEntruckingLogServiceImpl.java @@ -0,0 +1,31 @@ +package cc.hiver.mall.logisticsentruckinglog.service.impl; + +import cc.hiver.mall.logisticsentruckinglog.entity.LogisticsEntruckingLog; +import cc.hiver.mall.logisticsentruckinglog.mapper.LogisticsEntruckingLogMapper; +import cc.hiver.mall.logisticsentruckinglog.service.LogisticsEntruckingLogService; +import cc.hiver.mall.logisticsentruckinglog.vo.LogisticsEntruckingLogQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class LogisticsEntruckingLogServiceImpl extends ServiceImpl implements LogisticsEntruckingLogService { + + @Autowired + private LogisticsEntruckingLogMapper logisticsEntruckingLogMapper; + + /** + * 分页查询物流装车记录 + * @author 王富康 + * @date 2024/8/24 + * @param logisticsEntruckingLogQueryVo + * @return IPage + */ + @Override + public IPage getLogisticsEntruckingLogPageList(LogisticsEntruckingLogQueryVo logisticsEntruckingLogQueryVo) { + final Page page = new Page<>(logisticsEntruckingLogQueryVo.getPageNum(), logisticsEntruckingLogQueryVo.getPageSize()); + return logisticsEntruckingLogMapper.getLogisticsEntruckingLogPageList(page, logisticsEntruckingLogQueryVo); + } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/vo/LogisticsEntruckingLogQueryVo.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/vo/LogisticsEntruckingLogQueryVo.java new file mode 100644 index 00000000..77bf1e17 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/vo/LogisticsEntruckingLogQueryVo.java @@ -0,0 +1,32 @@ +package cc.hiver.mall.logisticsentruckinglog.vo; + +import cc.hiver.core.base.HiverBasePageQuery; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 物流装车记录查询条件 + * + * @author 王富康 + * @date 2024/8/24 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class LogisticsEntruckingLogQueryVo extends HiverBasePageQuery { + + @ApiModelProperty(value = "物流公司id") + private String companyId; + + @ApiModelProperty(value = "物流公司名称") + private String companyName; + + @ApiModelProperty(value = "线路id") + private String circuitId; + + @ApiModelProperty(value = "线路名称") + private String circuitName; + + @ApiModelProperty(value = "车牌号") + private String carNumber; +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/controller/LogisticsOrderController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/controller/LogisticsOrderController.java new file mode 100644 index 00000000..a143885b --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/controller/LogisticsOrderController.java @@ -0,0 +1,103 @@ +package cc.hiver.mall.logisticsorder.controller; + +import cc.hiver.core.common.utils.ResultUtil; +import cc.hiver.core.common.vo.Result; +import cc.hiver.mall.logisticsorder.entity.LogisticsOrder; +import cc.hiver.mall.logisticsorder.service.LogisticsOrderService; +import cc.hiver.mall.logisticsorder.vo.LogisticsOrderQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; + +/** + * 物流订单控制器 + * + * @author 王富康 + * @date 2024/8/24 + */ +@Slf4j +@RestController +@Api(tags = "物流订单接口") +@RequestMapping("/hiver/app/logisticsOrder/") +@Transactional +public class LogisticsOrderController { + + @Autowired + private LogisticsOrderService logisticsOrderService; + + @PostMapping(value = "/addLogisticsOrder") + @ApiOperation("新增物流订单") + public Result addLogisticsOrder(@RequestBody LogisticsOrder logisticsOrder) { + + final boolean b = logisticsOrderService.saveOrUpdate(logisticsOrder); + if (b) { + return ResultUtil.success("保存成功!"); + } else { + return ResultUtil.error("保存失败!"); + } + } + + /** + * 更新物流订单 + * + * @param logisticsOrder + * @return Result + * @author 王富康 + * @date 2024/8/24 + */ + @PostMapping(value = "/updateLogisticsOrder") + @ApiOperation("更新物流订单") + public Result updateLogisticsOrder(@RequestBody LogisticsOrder logisticsOrder) { + if (StringUtils.isEmpty(logisticsOrder.getId())) { + return ResultUtil.error("订单id不能为空!"); + } + final boolean b = logisticsOrderService.saveOrUpdate(logisticsOrder); + if (b) { + return ResultUtil.success("保存成功!"); + } else { + return ResultUtil.error("保存失败!"); + } + } + + /** + * 删除物流订单 + * + * @param id + * @return Result + * @author 王富康 + * @date 2024/8/24 + */ + @PostMapping(value = "/deleteLogisticsOrder") + @ApiOperation("删除物流订单") + public Result deleteLogisticsOrder(String id) { + if (StringUtils.isEmpty(id)) { + return ResultUtil.error("订单id不能为空!"); + } + final boolean b = logisticsOrderService.removeById(id); + if (b) { + return ResultUtil.success("删除成功!"); + } else { + return ResultUtil.error("删除失败!"); + } + } + + /** + * 分页查询物流订单 + * + * @param logisticsOrderQueryVo + * @return Result> + * @author 王富康 + * @date 2024/8/24 + */ + @RequestMapping(value = "/getLogisticsOrderPageList", method = RequestMethod.POST) + @ApiOperation(value = "分页查询物流订单") + public Result> getLogisticsOrderPageList(@RequestBody(required = false) LogisticsOrderQueryVo logisticsOrderQueryVo) { + final IPage result = logisticsOrderService.getLogisticsOrderPageList(logisticsOrderQueryVo); + return new ResultUtil>().setData(result); + } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/entity/LogisticsOrder.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/entity/LogisticsOrder.java new file mode 100644 index 00000000..83dd8dbe --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/entity/LogisticsOrder.java @@ -0,0 +1,111 @@ +package cc.hiver.mall.logisticsorder.entity; + +import cc.hiver.core.base.HiverBaseEntity; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 物流中转实体 + * + * @author 王富康 + * @date 2024/8/24 + */ +@EqualsAndHashCode(callSuper = true) +@Data +@ApiModel(value = "物流订单表") +@TableName(value = "t_logistics_order", autoResultMap = true) +public class LogisticsOrder extends HiverBaseEntity { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "物流公司id") + private String companyId; + + @ApiModelProperty(value = "物流公司名称") + private String companyName; + + @ApiModelProperty(value = "线路id") + private String circuitId; + + @ApiModelProperty(value = "线路名称") + private String circuitName; + + @ApiModelProperty(value = "发货人名称") + private String shipperName; + + @ApiModelProperty(value = "发货人联系方式") + private String shipperMobile; + + @ApiModelProperty(value = "发货地址") + private String shipperAddress; + + @ApiModelProperty(value = "收货人名称") + private String receiverName; + + @ApiModelProperty(value = "收货人联系方式") + private String receiverMobile; + + @ApiModelProperty(value = "收货地址") + private String receiverAddress; + + @ApiModelProperty(value = "出发站id") + private String goStationId; + + @ApiModelProperty(value = "出发站名称") + private String goStationName; + + @ApiModelProperty(value = "到达站id") + private String arrivalStationId; + + @ApiModelProperty(value = "到达站名称") + private String arrivalStationName; + + @ApiModelProperty(value = "重量") + private BigDecimal weight; + + @ApiModelProperty(value = "件数") + private Integer count; + + @ApiModelProperty(value = "运费") + private BigDecimal freight; + + @ApiModelProperty(value = "保费") + private BigDecimal premium; + + @ApiModelProperty(value = "中转费") + private BigDecimal transitFee; + + @ApiModelProperty(value = "小费") + private BigDecimal tips; + + @ApiModelProperty(value = "结算方式(0:现金、1:月付、2:提付)") + private String methodOfSettlement; + + @ApiModelProperty(value = "工本费") + private BigDecimal cost; + + @ApiModelProperty(value = "总费用") + private BigDecimal allCost; + + @ApiModelProperty(value = "票号") + private String orderNumber; + + @ApiModelProperty(value = "物体名称") + private String objectName; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "收货站人id") + private String receivingUserId; + + @ApiModelProperty(value = "收货站人姓名") + private String receivingUserName; + + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/mapper/LogisticsOrderMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/mapper/LogisticsOrderMapper.java new file mode 100644 index 00000000..f529476d --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/mapper/LogisticsOrderMapper.java @@ -0,0 +1,22 @@ +package cc.hiver.mall.logisticsorder.mapper; + +import cc.hiver.mall.logisticsorder.entity.LogisticsOrder; +import cc.hiver.mall.logisticsorder.vo.LogisticsOrderQueryVo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; + +public interface LogisticsOrderMapper extends BaseMapper { + + /** + * 分页查询物流订单 + * + * @param page + * @param logisticsOrderQueryVo + * @return IPage + * @author 王富康 + * @date 2024/8/24 + */ + IPage getLogisticsOrderPageList(Page page, @Param("queryParams") LogisticsOrderQueryVo logisticsOrderQueryVo); +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/service/LogisticsOrderService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/service/LogisticsOrderService.java new file mode 100644 index 00000000..bec47039 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/service/LogisticsOrderService.java @@ -0,0 +1,19 @@ +package cc.hiver.mall.logisticsorder.service; + +import cc.hiver.mall.logisticsorder.entity.LogisticsOrder; +import cc.hiver.mall.logisticsorder.vo.LogisticsOrderQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface LogisticsOrderService extends IService { + + /** + * 分页查询物流订单 + * + * @param logisticsOrderQueryVo + * @return IPage + * @author 王富康 + * @date 2024/8/24 + */ + IPage getLogisticsOrderPageList(LogisticsOrderQueryVo logisticsOrderQueryVo); +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/service/impl/LogisticsOrderServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/service/impl/LogisticsOrderServiceImpl.java new file mode 100644 index 00000000..557472a8 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/service/impl/LogisticsOrderServiceImpl.java @@ -0,0 +1,32 @@ +package cc.hiver.mall.logisticsorder.service.impl; + +import cc.hiver.mall.logisticsorder.entity.LogisticsOrder; +import cc.hiver.mall.logisticsorder.mapper.LogisticsOrderMapper; +import cc.hiver.mall.logisticsorder.service.LogisticsOrderService; +import cc.hiver.mall.logisticsorder.vo.LogisticsOrderQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class LogisticsOrderServiceImpl extends ServiceImpl implements LogisticsOrderService { + + @Autowired + private LogisticsOrderMapper logisticsOrderMapper; + + /** + * 分页查询物流订单 + * + * @param logisticsOrderQueryVo + * @return IPage + * @author 王富康 + * @date 2024/8/24 + */ + @Override + public IPage getLogisticsOrderPageList(LogisticsOrderQueryVo logisticsOrderQueryVo) { + final Page page = new Page<>(logisticsOrderQueryVo.getPageNum(), logisticsOrderQueryVo.getPageSize()); + return logisticsOrderMapper.getLogisticsOrderPageList(page, logisticsOrderQueryVo); + } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/vo/LogisticsOrderQueryVo.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/vo/LogisticsOrderQueryVo.java new file mode 100644 index 00000000..f090fba7 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/vo/LogisticsOrderQueryVo.java @@ -0,0 +1,43 @@ +package cc.hiver.mall.logisticsorder.vo; + +import cc.hiver.core.base.HiverBasePageQuery; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 物流线路查询条件 + * + * @author 王富康 + * @date 2024/8/24 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class LogisticsOrderQueryVo extends HiverBasePageQuery { + + @ApiModelProperty(value = "物流公司名称") + private String companyName; + + @ApiModelProperty(value = "线路名称") + private String circuitName; + + @ApiModelProperty(value = "发货人名称") + private String shipperName; + + @ApiModelProperty(value = "发货人联系方式") + private String shipperMobile; + + @ApiModelProperty(value = "发货地址") + private String shipperAddress; + + @ApiModelProperty(value = "收货人名称") + private String receiverName; + + @ApiModelProperty(value = "开始时间") + private String startDate; + + @ApiModelProperty(value = "结束时间") + private String endDate; + + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/controller/LogisticsRouteController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/controller/LogisticsRouteController.java new file mode 100644 index 00000000..84d563c7 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/controller/LogisticsRouteController.java @@ -0,0 +1,103 @@ +package cc.hiver.mall.logisticsroute.controller; + +import cc.hiver.core.common.utils.ResultUtil; +import cc.hiver.core.common.vo.Result; +import cc.hiver.mall.logisticsroute.entity.LogisticsRoute; +import cc.hiver.mall.logisticsroute.service.LogisticsRouteService; +import cc.hiver.mall.logisticsroute.vo.LogisticsRouteQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; + +/** + * 物流线路控制器 + * + * @author 王富康 + * @date 2024/8/24 + */ +@Slf4j +@RestController +@Api(tags = "物流线路接口") +@RequestMapping("/hiver/app/logisticsRoute/") +@Transactional +public class LogisticsRouteController { + + @Autowired + private LogisticsRouteService logisticsRouteService; + + @PostMapping(value = "/addLogisticsRoute") + @ApiOperation("新增物流线路") + public Result addLogisticsRoute(@RequestBody LogisticsRoute logisticsRoute) { + + final boolean b = logisticsRouteService.saveOrUpdate(logisticsRoute); + if (b) { + return ResultUtil.success("保存成功!"); + } else { + return ResultUtil.error("保存失败!"); + } + } + + /** + * 更新物流线路 + * + * @param logisticsRoute + * @return Result + * @author 王富康 + * @date 2024/8/24 + */ + @PostMapping(value = "/updateLogisticsRoute") + @ApiOperation("更新物流线路") + public Result updateLogisticsRoute(@RequestBody LogisticsRoute logisticsRoute) { + if (StringUtils.isEmpty(logisticsRoute.getId())) { + return ResultUtil.error("线路id不能为空!"); + } + final boolean b = logisticsRouteService.saveOrUpdate(logisticsRoute); + if (b) { + return ResultUtil.success("保存成功!"); + } else { + return ResultUtil.error("保存失败!"); + } + } + + /** + * 删除物流线路 + * + * @param id + * @return Result + * @author 王富康 + * @date 2024/8/24 + */ + @PostMapping(value = "/deleteLogisticsRoute") + @ApiOperation("删除物流线路") + public Result deleteLogisticsRoute(String id) { + if (StringUtils.isEmpty(id)) { + return ResultUtil.error("线路id不能为空!"); + } + final boolean b = logisticsRouteService.removeById(id); + if (b) { + return ResultUtil.success("删除成功!"); + } else { + return ResultUtil.error("删除失败!"); + } + } + + /** + * 分页查询物流线路 + * + * @param logisticsRouteQueryVo + * @return Result> + * @author 王富康 + * @date 2024/8/24 + */ + @RequestMapping(value = "/getLogisticsRoutePageList", method = RequestMethod.POST) + @ApiOperation(value = "分页查询物流线路") + public Result> getLogisticsRoutePageList(@RequestBody(required = false) LogisticsRouteQueryVo logisticsRouteQueryVo) { + final IPage result = logisticsRouteService.getLogisticsRoutePageList(logisticsRouteQueryVo); + return new ResultUtil>().setData(result); + } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/entity/LogisticsRoute.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/entity/LogisticsRoute.java new file mode 100644 index 00000000..5eeae6e5 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/entity/LogisticsRoute.java @@ -0,0 +1,35 @@ +package cc.hiver.mall.logisticsroute.entity; + +import cc.hiver.core.base.HiverBaseEntity; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 物流线路实体 + * + * @author 王富康 + * @date 2024/8/24 + */ +@EqualsAndHashCode(callSuper = true) +@Data +@ApiModel(value = "物流线路表") +@TableName(value = "t_logistics_route", autoResultMap = true) +public class LogisticsRoute extends HiverBaseEntity { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "出发站") + private String goStation; + + @ApiModelProperty(value = "到达站") + private String arrivalStation; + + @ApiModelProperty(value = "线路名") + private String circuitName; + + @ApiModelProperty(value = "保费规则(每公斤/元)") + private String premiumRules; +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/mapper/LogisticsRouteMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/mapper/LogisticsRouteMapper.java new file mode 100644 index 00000000..aaf13bcd --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/mapper/LogisticsRouteMapper.java @@ -0,0 +1,22 @@ +package cc.hiver.mall.logisticsroute.mapper; + +import cc.hiver.mall.logisticsroute.entity.LogisticsRoute; +import cc.hiver.mall.logisticsroute.vo.LogisticsRouteQueryVo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; + +public interface LogisticsRouteMapper extends BaseMapper { + + /** + * 分页查询物流线路 + * + * @param page + * @param logisticsRouteQueryVo + * @return IPage + * @author 王富康 + * @date 2024/8/24 + */ + IPage getLogisticsRoutePageList(Page page, @Param("queryParams") LogisticsRouteQueryVo logisticsRouteQueryVo); +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/service/LogisticsRouteService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/service/LogisticsRouteService.java new file mode 100644 index 00000000..be298064 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/service/LogisticsRouteService.java @@ -0,0 +1,19 @@ +package cc.hiver.mall.logisticsroute.service; + +import cc.hiver.mall.logisticsroute.entity.LogisticsRoute; +import cc.hiver.mall.logisticsroute.vo.LogisticsRouteQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface LogisticsRouteService extends IService { + + /** + * 分页查询物流线路 + * + * @param logisticsRouteQueryVo + * @return IPage + * @author 王富康 + * @date 2024/8/24 + */ + IPage getLogisticsRoutePageList(LogisticsRouteQueryVo logisticsRouteQueryVo); +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/service/impl/LogisticsRouteServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/service/impl/LogisticsRouteServiceImpl.java new file mode 100644 index 00000000..0cc595bb --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/service/impl/LogisticsRouteServiceImpl.java @@ -0,0 +1,31 @@ +package cc.hiver.mall.logisticsroute.service.impl; + +import cc.hiver.mall.logisticsroute.entity.LogisticsRoute; +import cc.hiver.mall.logisticsroute.mapper.LogisticsRouteMapper; +import cc.hiver.mall.logisticsroute.service.LogisticsRouteService; +import cc.hiver.mall.logisticsroute.vo.LogisticsRouteQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class LogisticsRouteServiceImpl extends ServiceImpl implements LogisticsRouteService { + + @Autowired + private LogisticsRouteMapper logisticsRouteMapper; + + /** + * 分页查询物流线路 + * @author 王富康 + * @date 2024/8/24 + * @param logisticsRouteQueryVo + * @return IPage + */ + @Override + public IPage getLogisticsRoutePageList(LogisticsRouteQueryVo logisticsRouteQueryVo) { + final Page page = new Page<>(logisticsRouteQueryVo.getPageNum(), logisticsRouteQueryVo.getPageSize()); + return logisticsRouteMapper.getLogisticsRoutePageList(page, logisticsRouteQueryVo); + } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/vo/LogisticsRouteQueryVo.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/vo/LogisticsRouteQueryVo.java new file mode 100644 index 00000000..94973876 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/vo/LogisticsRouteQueryVo.java @@ -0,0 +1,26 @@ +package cc.hiver.mall.logisticsroute.vo; + +import cc.hiver.core.base.HiverBasePageQuery; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 物流线路查询条件 + * + * @author 王富康 + * @date 2024/8/24 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class LogisticsRouteQueryVo extends HiverBasePageQuery { + + @ApiModelProperty(value = "出发站") + private String goStation; + + @ApiModelProperty(value = "到达站") + private String arrivalStation; + + @ApiModelProperty(value = "线路名") + private String circuitName; +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/controller/LogisticsStationController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/controller/LogisticsStationController.java new file mode 100644 index 00000000..617d1d96 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/controller/LogisticsStationController.java @@ -0,0 +1,106 @@ +package cc.hiver.mall.logisticsstation.controller; + +import cc.hiver.core.common.utils.ResultUtil; +import cc.hiver.core.common.vo.Result; +import cc.hiver.mall.logisticsstation.entity.LogisticsStation; +import cc.hiver.mall.logisticsstation.service.LogisticsStationService; +import cc.hiver.mall.logisticsstation.vo.LogisticsStationQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; + +/** + * 物流站点控制器 + * + * @author 王富康 + * @date 2024/8/24 + */ +@Slf4j +@RestController +@Api(tags = "物流站点接口") +@RequestMapping("/hiver/app/logisticsStation/") +@Transactional +public class LogisticsStationController { + + @Autowired + private LogisticsStationService logisticsStationService; + + /** + * 新增物流站点 + * + * @param logisticsStation + * @return Result + * @author 王富康 + * @date 2024/8/24 + */ + @PostMapping(value = "/addLogisticsStation") + @ApiOperation("新增物流站点") + public Result addLogisticsStation(@RequestBody LogisticsStation logisticsStation) { + + final boolean b = logisticsStationService.saveOrUpdate(logisticsStation); + if (b) { + return ResultUtil.success("保存成功!"); + } else { + return ResultUtil.error("保存失败!"); + } + } + + /** + * 更新物流站点 + * + * @param logisticsStation + * @return Result + * @author 王富康 + * @date 2024/8/24 + */ + @PostMapping(value = "/updateLogisticsStation") + @ApiOperation("更新物流站点") + public Result updateLogisticsStation(@RequestBody LogisticsStation logisticsStation) { + + final boolean b = logisticsStationService.saveOrUpdate(logisticsStation); + if (b) { + return ResultUtil.success("保存成功!"); + } else { + return ResultUtil.error("保存失败!"); + } + } + + /** + * 删除物流站点 + * + * @param id + * @return Result + * @author 王富康 + * @date 2024/8/24 + */ + @PostMapping(value = "/deleteLogisticsStation") + @ApiOperation("删除物流站点") + public Result deleteLogisticsStation(String id) { + + final boolean b = logisticsStationService.removeById(id); + if (b) { + return ResultUtil.success("删除成功!"); + } else { + return ResultUtil.error("删除失败!"); + } + } + + /** + * 分页查询物流站点 + * + * @param logisticsRouteQueryVo + * @return Result> + * @author 王富康 + * @date 2024/8/24 + */ + @RequestMapping(value = "/getLogisticsStationPageList", method = RequestMethod.POST) + @ApiOperation(value = "分页查询物流站点") + public Result> getLogisticsStationPageList(@RequestBody(required = false) LogisticsStationQueryVo logisticsRouteQueryVo) { + final IPage result = logisticsStationService.getLogisticsStationPageList(logisticsRouteQueryVo); + return new ResultUtil>().setData(result); + } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/entity/LogisticsStation.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/entity/LogisticsStation.java new file mode 100644 index 00000000..0cc0741e --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/entity/LogisticsStation.java @@ -0,0 +1,39 @@ +package cc.hiver.mall.logisticsstation.entity; + +import cc.hiver.core.base.HiverBaseEntity; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 物流站点实体 + * + * @author 王富康 + * @date 2024/8/24 + */ +@EqualsAndHashCode(callSuper = true) +@Data +@ApiModel(value = "物流站点表") +@TableName(value = "t_logistics_station", autoResultMap = true) +public class LogisticsStation extends HiverBaseEntity { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "线路id") + private String circuitId; + + @ApiModelProperty(value = "站点名称") + private String stationName; + + @ApiModelProperty(value = "运费规则") + private String freightRules; + + @ApiModelProperty(value = "落地费规则(每公斤/元)") + private String landingFeeRules; + + @ApiModelProperty(value = "送货费规则") + private String deliveryFeeRules; + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/mapper/LogisticsStationMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/mapper/LogisticsStationMapper.java new file mode 100644 index 00000000..33480602 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/mapper/LogisticsStationMapper.java @@ -0,0 +1,22 @@ +package cc.hiver.mall.logisticsstation.mapper; + +import cc.hiver.mall.logisticsstation.entity.LogisticsStation; +import cc.hiver.mall.logisticsstation.vo.LogisticsStationQueryVo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; + +public interface LogisticsStationMapper extends BaseMapper { + + /** + * 分页查询物流站点 + * + * @param page + * @param logisticsRouteQueryVo + * @return IPage + * @author 王富康 + * @date 2024/8/24 + */ + IPage getLogisticsStationPageList(Page page, @Param("queryParams") LogisticsStationQueryVo logisticsRouteQueryVo); +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/service/LogisticsStationService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/service/LogisticsStationService.java new file mode 100644 index 00000000..5dc6b253 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/service/LogisticsStationService.java @@ -0,0 +1,19 @@ +package cc.hiver.mall.logisticsstation.service; + +import cc.hiver.mall.logisticsstation.entity.LogisticsStation; +import cc.hiver.mall.logisticsstation.vo.LogisticsStationQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface LogisticsStationService extends IService { + + /** + * 分页查询物流站点 + * + * @param logisticsRouteQueryVo + * @return IPage + * @author 王富康 + * @date 2024/8/24 + */ + IPage getLogisticsStationPageList(LogisticsStationQueryVo logisticsRouteQueryVo); +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/service/impl/LogisticsStationServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/service/impl/LogisticsStationServiceImpl.java new file mode 100644 index 00000000..0689f1cc --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/service/impl/LogisticsStationServiceImpl.java @@ -0,0 +1,32 @@ +package cc.hiver.mall.logisticsstation.service.impl; + +import cc.hiver.mall.logisticsstation.entity.LogisticsStation; +import cc.hiver.mall.logisticsstation.mapper.LogisticsStationMapper; +import cc.hiver.mall.logisticsstation.service.LogisticsStationService; +import cc.hiver.mall.logisticsstation.vo.LogisticsStationQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class LogisticsStationServiceImpl extends ServiceImpl implements LogisticsStationService { + + @Autowired + private LogisticsStationMapper logisticsStationMapper; + + /** + * 分页查询物流站点 + * + * @param logisticsRouteQueryVo + * @return IPage + * @author 王富康 + * @date 2024/8/24 + */ + @Override + public IPage getLogisticsStationPageList(LogisticsStationQueryVo logisticsRouteQueryVo) { + final Page page = new Page<>(logisticsRouteQueryVo.getPageNum(), logisticsRouteQueryVo.getPageSize()); + return logisticsStationMapper.getLogisticsStationPageList(page, logisticsRouteQueryVo); + } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/vo/LogisticsStationQueryVo.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/vo/LogisticsStationQueryVo.java new file mode 100644 index 00000000..849c0e3c --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/vo/LogisticsStationQueryVo.java @@ -0,0 +1,21 @@ +package cc.hiver.mall.logisticsstation.vo; + +import cc.hiver.core.base.HiverBasePageQuery; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 物流站点查询参数 + * @author 王富康 + * @date 2024/8/24 + */ +@Data +public class LogisticsStationQueryVo extends HiverBasePageQuery { + + @ApiModelProperty(value = "线路id") + private String circuitId; + + @ApiModelProperty(value = "站点名称") + private String stationName; + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/controller/LogisticsTransferStationController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/controller/LogisticsTransferStationController.java new file mode 100644 index 00000000..5acb3048 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/controller/LogisticsTransferStationController.java @@ -0,0 +1,103 @@ +package cc.hiver.mall.logisticstransferstation.controller; + +import cc.hiver.core.common.utils.ResultUtil; +import cc.hiver.core.common.vo.Result; +import cc.hiver.mall.logisticstransferstation.entity.LogisticsTransferStation; +import cc.hiver.mall.logisticstransferstation.service.LogisticsTransferStationService; +import cc.hiver.mall.logisticstransferstation.vo.LogisticsTransferStationQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; + +/** + * 物流中转站控制器 + * + * @author 王富康 + * @date 2024/8/24 + */ +@Slf4j +@RestController +@Api(tags = "物流中转站接口") +@RequestMapping("/hiver/app/logisticsTransferStation/") +@Transactional +public class LogisticsTransferStationController { + + @Autowired + private LogisticsTransferStationService logisticsTransferStationService; + + @PostMapping(value = "/addLogisticsTransferStation") + @ApiOperation("新增物流中转站") + public Result addLogisticsTransferStation(@RequestBody LogisticsTransferStation logisticsTransferStation) { + + final boolean b = logisticsTransferStationService.saveOrUpdate(logisticsTransferStation); + if (b) { + return ResultUtil.success("保存成功!"); + } else { + return ResultUtil.error("保存失败!"); + } + } + + /** + * 更新物流中转站 + * + * @param logisticsTransferStation + * @return Result + * @author 王富康 + * @date 2024/8/24 + */ + @PostMapping(value = "/updateLogisticsTransferStation") + @ApiOperation("更新物流中转站") + public Result updateLogisticsTransferStation(@RequestBody LogisticsTransferStation logisticsTransferStation) { + if (StringUtils.isEmpty(logisticsTransferStation.getId())) { + return ResultUtil.error("中转站id不能为空!"); + } + final boolean b = logisticsTransferStationService.saveOrUpdate(logisticsTransferStation); + if (b) { + return ResultUtil.success("保存成功!"); + } else { + return ResultUtil.error("保存失败!"); + } + } + + /** + * 删除物流中转站 + * + * @param id + * @return Result + * @author 王富康 + * @date 2024/8/24 + */ + @PostMapping(value = "/deleteLogisticsTransferStation") + @ApiOperation("删除物流中转站") + public Result deleteLogisticsTransferStation(String id) { + if (StringUtils.isEmpty(id)) { + return ResultUtil.error("中转站id不能为空!"); + } + final boolean b = logisticsTransferStationService.removeById(id); + if (b) { + return ResultUtil.success("删除成功!"); + } else { + return ResultUtil.error("删除失败!"); + } + } + + /** + * 分页查询物流中转站 + * + * @param logisticsTransferStationQueryVo + * @return Result> + * @author 王富康 + * @date 2024/8/24 + */ + @RequestMapping(value = "/getLogisticsTransferStationPageList", method = RequestMethod.POST) + @ApiOperation(value = "分页查询物流中转站") + public Result> getLogisticsTransferStationPageList(@RequestBody(required = false) LogisticsTransferStationQueryVo logisticsTransferStationQueryVo) { + final IPage result = logisticsTransferStationService.getLogisticsTransferStationPageList(logisticsTransferStationQueryVo); + return new ResultUtil>().setData(result); + } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/entity/LogisticsTransferStation.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/entity/LogisticsTransferStation.java new file mode 100644 index 00000000..e19ecbf4 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/entity/LogisticsTransferStation.java @@ -0,0 +1,35 @@ +package cc.hiver.mall.logisticstransferstation.entity; + +import cc.hiver.core.base.HiverBaseEntity; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 物流中转实体 + * + * @author 王富康 + * @date 2024/8/24 + */ +@EqualsAndHashCode(callSuper = true) +@Data +@ApiModel(value = "物流中转表") +@TableName(value = "t_logistics_transfer_station", autoResultMap = true) +public class LogisticsTransferStation extends HiverBaseEntity { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "站点id") + private String stationId; + + @ApiModelProperty(value = "出发站") + private String goStation; + + @ApiModelProperty(value = "到达站") + private String arrivalStation; + + @ApiModelProperty(value = "费用") + private String transitFee; +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/mapper/LogisticsTransferStationMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/mapper/LogisticsTransferStationMapper.java new file mode 100644 index 00000000..2221a56f --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/mapper/LogisticsTransferStationMapper.java @@ -0,0 +1,22 @@ +package cc.hiver.mall.logisticstransferstation.mapper; + +import cc.hiver.mall.logisticstransferstation.entity.LogisticsTransferStation; +import cc.hiver.mall.logisticstransferstation.vo.LogisticsTransferStationQueryVo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; + +public interface LogisticsTransferStationMapper extends BaseMapper { + + /** + * 分页查询物流中转站 + * + * @param page + * @param logisticsTransferStationQueryVo + * @return IPage + * @author 王富康 + * @date 2024/8/24 + */ + IPage getLogisticsTransferStationPageList(Page page, @Param("queryParams") LogisticsTransferStationQueryVo logisticsTransferStationQueryVo); +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/service/LogisticsTransferStationService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/service/LogisticsTransferStationService.java new file mode 100644 index 00000000..2a7c35b8 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/service/LogisticsTransferStationService.java @@ -0,0 +1,19 @@ +package cc.hiver.mall.logisticstransferstation.service; + +import cc.hiver.mall.logisticstransferstation.entity.LogisticsTransferStation; +import cc.hiver.mall.logisticstransferstation.vo.LogisticsTransferStationQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface LogisticsTransferStationService extends IService { + + /** + * 分页查询物流中转站 + * + * @param logisticsTransferStationQueryVo + * @return IPage + * @author 王富康 + * @date 2024/8/24 + */ + IPage getLogisticsTransferStationPageList(LogisticsTransferStationQueryVo logisticsTransferStationQueryVo); +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/service/impl/LogisticsTransferStationServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/service/impl/LogisticsTransferStationServiceImpl.java new file mode 100644 index 00000000..aee20d5f --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/service/impl/LogisticsTransferStationServiceImpl.java @@ -0,0 +1,32 @@ +package cc.hiver.mall.logisticstransferstation.service.impl; + +import cc.hiver.mall.logisticstransferstation.entity.LogisticsTransferStation; +import cc.hiver.mall.logisticstransferstation.mapper.LogisticsTransferStationMapper; +import cc.hiver.mall.logisticstransferstation.service.LogisticsTransferStationService; +import cc.hiver.mall.logisticstransferstation.vo.LogisticsTransferStationQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class LogisticsTransferStationServiceImpl extends ServiceImpl implements LogisticsTransferStationService { + + @Autowired + private LogisticsTransferStationMapper logisticsTransferStationMapper; + + /** + * 分页查询物流中转站 + * + * @param logisticsTransferStationQueryVo + * @return IPage + * @author 王富康 + * @date 2024/8/24 + */ + @Override + public IPage getLogisticsTransferStationPageList(LogisticsTransferStationQueryVo logisticsTransferStationQueryVo) { + final Page page = new Page<>(logisticsTransferStationQueryVo.getPageNum(), logisticsTransferStationQueryVo.getPageSize()); + return logisticsTransferStationMapper.getLogisticsTransferStationPageList(page, logisticsTransferStationQueryVo); + } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/vo/LogisticsTransferStationQueryVo.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/vo/LogisticsTransferStationQueryVo.java new file mode 100644 index 00000000..c5043ef3 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/vo/LogisticsTransferStationQueryVo.java @@ -0,0 +1,28 @@ +package cc.hiver.mall.logisticstransferstation.vo; + +import cc.hiver.core.base.HiverBasePageQuery; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 物流线路查询条件 + * + * @author 王富康 + * @date 2024/8/24 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class LogisticsTransferStationQueryVo extends HiverBasePageQuery { + + @ApiModelProperty(value = "站点id") + private String stationId; + + @ApiModelProperty(value = "出发站") + private String goStation; + + @ApiModelProperty(value = "到达站") + private String arrivalStation; + + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/controller/LogisticsUserController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/controller/LogisticsUserController.java new file mode 100644 index 00000000..a59e9be3 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/controller/LogisticsUserController.java @@ -0,0 +1,103 @@ +package cc.hiver.mall.logisticsuser.controller; + +import cc.hiver.core.common.utils.ResultUtil; +import cc.hiver.core.common.vo.Result; +import cc.hiver.mall.logisticsuser.entity.LogisticsUser; +import cc.hiver.mall.logisticsuser.service.LogisticsUserService; +import cc.hiver.mall.logisticsuser.vo.LogisticsUserQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; + +/** + * 物流公司人员控制器 + * + * @author 王富康 + * @date 2024/8/24 + */ +@Slf4j +@RestController +@Api(tags = "物流公司人员接口") +@RequestMapping("/hiver/app/logisticsUser/") +@Transactional +public class LogisticsUserController { + + @Autowired + private LogisticsUserService logisticsUserService; + + @PostMapping(value = "/addLogisticsUser") + @ApiOperation("新增物流公司人员") + public Result addLogisticsUser(@RequestBody LogisticsUser logisticsUser) { + + final boolean b = logisticsUserService.saveOrUpdate(logisticsUser); + if (b) { + return ResultUtil.success("保存成功!"); + } else { + return ResultUtil.error("保存失败!"); + } + } + + /** + * 更新物流公司人员 + * + * @param logisticsUser + * @return Result + * @author 王富康 + * @date 2024/8/24 + */ + @PostMapping(value = "/updateLogisticsUser") + @ApiOperation("更新物流公司人员") + public Result updateLogisticsUser(@RequestBody LogisticsUser logisticsUser) { + if (StringUtils.isEmpty(logisticsUser.getId())) { + return ResultUtil.error("公司人员id不能为空!"); + } + final boolean b = logisticsUserService.saveOrUpdate(logisticsUser); + if (b) { + return ResultUtil.success("保存成功!"); + } else { + return ResultUtil.error("保存失败!"); + } + } + + /** + * 删除物流公司人员 + * + * @param id + * @return Result + * @author 王富康 + * @date 2024/8/24 + */ + @PostMapping(value = "/deleteLogisticsUser") + @ApiOperation("删除物流公司人员") + public Result deleteLogisticsUser(String id) { + if (StringUtils.isEmpty(id)) { + return ResultUtil.error("公司人员id不能为空!"); + } + final boolean b = logisticsUserService.removeById(id); + if (b) { + return ResultUtil.success("删除成功!"); + } else { + return ResultUtil.error("删除失败!"); + } + } + + /** + * 分页查询物流公司人员 + * + * @param logisticsUserQueryVo + * @return Result> + * @author 王富康 + * @date 2024/8/24 + */ + @RequestMapping(value = "/getLogisticsUserPageList", method = RequestMethod.POST) + @ApiOperation(value = "分页查询物流公司人员") + public Result> getLogisticsUserPageList(@RequestBody(required = false) LogisticsUserQueryVo logisticsUserQueryVo) { + final IPage result = logisticsUserService.getLogisticsUserPageList(logisticsUserQueryVo); + return new ResultUtil>().setData(result); + } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/entity/LogisticsUser.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/entity/LogisticsUser.java new file mode 100644 index 00000000..1ec48626 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/entity/LogisticsUser.java @@ -0,0 +1,36 @@ +package cc.hiver.mall.logisticsuser.entity; + +import cc.hiver.core.base.HiverBaseEntity; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 物流中转实体 + * + * @author 王富康 + * @date 2024/8/24 + */ +@EqualsAndHashCode(callSuper = true) +@Data +@ApiModel(value = "物流公司人员表") +@TableName(value = "t_logistics_user", autoResultMap = true) +public class LogisticsUser extends HiverBaseEntity { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "名称") + private String nickName; + + @ApiModelProperty(value = "电话(登录账号)") + private String mobile; + + @ApiModelProperty(value = "物流公司id") + private String companyId; + + @ApiModelProperty(value = "角色:0:管理员、1:操作员、2:收货员") + private String role; + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/mapper/LogisticsUserMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/mapper/LogisticsUserMapper.java new file mode 100644 index 00000000..bc56f1ad --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/mapper/LogisticsUserMapper.java @@ -0,0 +1,22 @@ +package cc.hiver.mall.logisticsuser.mapper; + +import cc.hiver.mall.logisticsuser.entity.LogisticsUser; +import cc.hiver.mall.logisticsuser.vo.LogisticsUserQueryVo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; + +public interface LogisticsUserMapper extends BaseMapper { + + /** + * 分页查询物流公司人员 + * + * @param page + * @param logisticsUserQueryVo + * @return IPage + * @author 王富康 + * @date 2024/8/24 + */ + IPage getLogisticsUserPageList(Page page, @Param("queryParams") LogisticsUserQueryVo logisticsUserQueryVo); +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/service/LogisticsUserService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/service/LogisticsUserService.java new file mode 100644 index 00000000..1e56b0eb --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/service/LogisticsUserService.java @@ -0,0 +1,19 @@ +package cc.hiver.mall.logisticsuser.service; + +import cc.hiver.mall.logisticsuser.entity.LogisticsUser; +import cc.hiver.mall.logisticsuser.vo.LogisticsUserQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface LogisticsUserService extends IService { + + /** + * 分页查询物流公司人员 + * + * @param logisticsUserQueryVo + * @return IPage + * @author 王富康 + * @date 2024/8/24 + */ + IPage getLogisticsUserPageList(LogisticsUserQueryVo logisticsUserQueryVo); +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/service/impl/LogisticsUserServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/service/impl/LogisticsUserServiceImpl.java new file mode 100644 index 00000000..27312102 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/service/impl/LogisticsUserServiceImpl.java @@ -0,0 +1,32 @@ +package cc.hiver.mall.logisticsuser.service.impl; + +import cc.hiver.mall.logisticsuser.entity.LogisticsUser; +import cc.hiver.mall.logisticsuser.mapper.LogisticsUserMapper; +import cc.hiver.mall.logisticsuser.service.LogisticsUserService; +import cc.hiver.mall.logisticsuser.vo.LogisticsUserQueryVo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class LogisticsUserServiceImpl extends ServiceImpl implements LogisticsUserService { + + @Autowired + private LogisticsUserMapper logisticsUserMapper; + + /** + * 分页查询物流公司人员 + * + * @param logisticsUserQueryVo + * @return IPage + * @author 王富康 + * @date 2024/8/24 + */ + @Override + public IPage getLogisticsUserPageList(LogisticsUserQueryVo logisticsUserQueryVo) { + final Page page = new Page<>(logisticsUserQueryVo.getPageNum(), logisticsUserQueryVo.getPageSize()); + return logisticsUserMapper.getLogisticsUserPageList(page, logisticsUserQueryVo); + } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/vo/LogisticsUserQueryVo.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/vo/LogisticsUserQueryVo.java new file mode 100644 index 00000000..ff8b7222 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/vo/LogisticsUserQueryVo.java @@ -0,0 +1,25 @@ +package cc.hiver.mall.logisticsuser.vo; + +import cc.hiver.core.base.HiverBasePageQuery; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 物流线路查询条件 + * + * @author 王富康 + * @date 2024/8/24 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class LogisticsUserQueryVo extends HiverBasePageQuery { + + @ApiModelProperty(value = "名称") + private String nickName; + + @ApiModelProperty(value = "物流公司id") + private String companyId; + + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SaleAllVO.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SaleAllVO.java index 5aafda77..c034d054 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SaleAllVO.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SaleAllVO.java @@ -62,4 +62,7 @@ public class SaleAllVO implements Serializable { @ApiModelProperty(value = "进货总件数") private int purchasingCount; + + @ApiModelProperty(value = "退货总成本") + private BigDecimal saleReturnCost; } diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ReturnDetailService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ReturnDetailService.java index bb78cfe0..b281df31 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ReturnDetailService.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ReturnDetailService.java @@ -5,6 +5,7 @@ import cc.hiver.mall.pojo.query.ReturnSalePageQuery; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.IService; +import java.math.BigDecimal; import java.util.List; public interface ReturnDetailService extends IService { @@ -26,4 +27,6 @@ public interface ReturnDetailService extends IService { List getReturnDetailsByProductId(ReturnSalePageQuery returnSalePageQuery); void deleteBySaleId(String saleId); + + BigDecimal getsaleReturnCost(String shopId, String startTime, String endTime); } diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ReturnDetailServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ReturnDetailServiceImpl.java index c47a9a99..0cabca54 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ReturnDetailServiceImpl.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ReturnDetailServiceImpl.java @@ -6,9 +6,11 @@ import cc.hiver.mall.pojo.query.ReturnSalePageQuery; import cc.hiver.mall.service.mybatis.ReturnDetailService; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.math.BigDecimal; import java.util.List; @Service @@ -51,4 +53,13 @@ public class ReturnDetailServiceImpl extends ServiceImpl tdr.del_flag != 2 + and tdr.dealings_type in ( '2','3','4','6','7' ) and tdr.dealings_user_id = #{supplierBillQueryVo.supplierId} and tdr.shop_id = #{supplierBillQueryVo.shopId} and (tdr.sale_id is null or ts.in_storage_status = '1') diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsEntruckingLogMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsEntruckingLogMapper.xml new file mode 100644 index 00000000..9d229ace --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsEntruckingLogMapper.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + id, create_by, create_time, del_flag, update_by, update_time, company_id, company_name, circuit_id, circuit_name, + car_number, car_phone, car_user_name, car_fee, car_freight + + + + + + delete from t_logistics_entrucking_log + where id = #{id,jdbcType=VARCHAR} + + + + insert into t_logistics_entrucking_log + (id, create_by, create_time, del_flag, update_by, update_time, company_id, company_name, circuit_id, circuit_name, + car_number, car_phone, car_user_name, car_fee, car_freight) + values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{companyId,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, #{circuitId,jdbcType=VARCHAR}, #{circuitName,jdbcType=VARCHAR}, + #{carNumber,jdbcType=VARCHAR}, #{carPhone,jdbcType=VARCHAR}, #{carUserName,jdbcType=VARCHAR}, #{carFee,jdbcType=DECIMAL}, #{carFreight,jdbcType=DECIMAL}) + + + + update t_logistics_entrucking_log + set create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + del_flag = #{delFlag,jdbcType=INTEGER}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + company_id = #{companyId,jdbcType=VARCHAR}, + company_name = #{companyName,jdbcType=VARCHAR}, + circuit_id = #{circuitId,jdbcType=VARCHAR}, + circuit_name = #{circuitName,jdbcType=VARCHAR}, + car_number = #{carNumber,jdbcType=VARCHAR}, + car_phone = #{carPhone,jdbcType=VARCHAR}, + car_user_name = #{carUserName,jdbcType=VARCHAR}, + car_fee = #{carFee,jdbcType=DECIMAL}, + car_freight = #{carFreight,jdbcType=DECIMAL} + where id = #{id,jdbcType=VARCHAR} + + + + + \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsOrderMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsOrderMapper.xml new file mode 100644 index 00000000..d145be13 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsOrderMapper.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, create_by, create_time, del_flag, update_by, update_time,company_id, company_name, circuit_id, circuit_name, + shipper_name, shipper_mobile, shipper_address, receiver_name, receiver_mobile, receiver_address, + go_station_id, go_station_name, arrival_station_id, arrival_station_name, weight, count, freight, premium, + transit_fee, tips, method_of_settlement, cost, all_cost, order_number, object_name, remark, receiving_user_id, receiving_user_name + + + + + + delete from t_logistics_order + where id = #{id,jdbcType=VARCHAR} + + + + insert into t_logistics_order + (id, create_by, create_time, del_flag, update_by, update_time,company_id, company_name, circuit_id, circuit_name, + shipper_name, shipper_mobile, shipper_address, receiver_name, receiver_mobile, receiver_address, + go_station_id, go_station_name, arrival_station_id, arrival_station_name, weight, count, freight, premium, + transit_fee, tips, method_of_settlement, cost, all_cost, order_number, object_name, remark, receiving_user_id, receiving_user_name) + values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{companyId,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, #{circuitId,jdbcType=VARCHAR}, #{circuitName,jdbcType=VARCHAR}, + #{shipperName,jdbcType=VARCHAR}, #{shipperMobile,jdbcType=VARCHAR}, #{shipperAddress,jdbcType=VARCHAR}, + #{receiverName,jdbcType=VARCHAR}, #{receiverMobile,jdbcType=VARCHAR}, #{receiverAddress,jdbcType=VARCHAR}, + #{goStationId,jdbcType=VARCHAR}, #{goStationName,jdbcType=VARCHAR}, #{arrivalStationId,jdbcType=VARCHAR}, #{arrivalStationName,jdbcType=VARCHAR}, + #{weight,jdbcType=DECIMAL}, #{count,jdbcType=INTEGER}, #{freight,jdbcType=DECIMAL}, #{premium,jdbcType=DECIMAL}, + #{transitFee,jdbcType=DECIMAL}, #{tips,jdbcType=DECIMAL}, #{methodOfSettlement,jdbcType=VARCHAR}, #{cost,jdbcType=DECIMAL}, + #{allCost,jdbcType=DECIMAL}, #{orderNumber,jdbcType=VARCHAR}, #{objectName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, + #{receivingUserId,jdbcType=VARCHAR}, #{receivingUserName,jdbcType=VARCHAR}) + + + + + \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsRouteMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsRouteMapper.xml new file mode 100644 index 00000000..26d03a50 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsRouteMapper.xml @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + id, create_by, create_time, del_flag, update_by, update_time, go_station, arrival_station, circuit_name, premium_rules + + + + + + delete from t_logistics_route + where id = #{id,jdbcType=VARCHAR} + + + + insert into t_logistics_route + (id, create_by, create_time, del_flag, update_by, update_time,go_station, arrival_station, circuit_name, premium_rules) + values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{goStation,jdbcType=VARCHAR}, #{arrivalStation,jdbcType=VARCHAR}, #{circuitName,jdbcType=VARCHAR}, #{premiumRules,jdbcType=VARCHAR}) + + + + update t_logistics_route + + + id = #{record.id,jdbcType=VARCHAR}, + + + create_by = #{record.createBy,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{record.delFlag,jdbcType=INTEGER}, + + + update_by = #{record.updateBy,jdbcType=VARCHAR}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + go_station = #{record.goStation,jdbcType=VARCHAR}, + + + arrival_station = #{record.arrivalStation,jdbcType=VARCHAR}, + + + circuit_name = #{record.circuitName,jdbcType=VARCHAR}, + + + premium_rules = #{record.premiumRules,jdbcType=VARCHAR}, + + + + + + update t_logistics_route + set id = #{record.id,jdbcType=VARCHAR}, + create_by = #{record.createBy,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + del_flag = #{record.delFlag,jdbcType=INTEGER}, + update_by = #{record.updateBy,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + go_station = #{record.goStation,jdbcType=VARCHAR}, + arrival_station = #{record.arrivalStation,jdbcType=VARCHAR}, + circuit_name = #{record.circuitName,jdbcType=VARCHAR}, + premium_rules = #{record.premiumRules,jdbcType=VARCHAR} + + + + update t_logistics_route + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{delFlag,jdbcType=INTEGER}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + go_station = #{goStation,jdbcType=VARCHAR}, + + + arrival_station = #{arrivalStation,jdbcType=VARCHAR}, + + + circuit_name = #{circuitName,jdbcType=VARCHAR}, + + + premium_rules = #{premiumRules,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + + update t_logistics_route + set create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + del_flag = #{delFlag,jdbcType=INTEGER}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + go_station = #{goStation,jdbcType=VARCHAR}, + arrival_station = #{arrivalStation,jdbcType=VARCHAR}, + circuit_name = #{circuitName,jdbcType=VARCHAR}, + premium_rules = #{premiumRules,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + + + \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsStationMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsStationMapper.xml new file mode 100644 index 00000000..ca915568 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsStationMapper.xml @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + id, create_by, create_time, del_flag, update_by, update_time,circuit_id, station_name, freight_rules, landing_fee_rules, delivery_fee_rules + + + + + + delete from t_logistics_station + where id = #{id,jdbcType=VARCHAR} + + + + insert into t_logistics_station + (id, create_by, create_time, del_flag, update_by, update_time, circuit_id, station_name, freight_rules, landing_fee_rules, delivery_fee_rules) + values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{circuitId,jdbcType=VARCHAR}, #{stationName,jdbcType=VARCHAR}, #{freightRules,jdbcType=VARCHAR}, #{landingFeeRules,jdbcType=VARCHAR}, #{deliveryFeeRules,jdbcType=VARCHAR}) + + + + update t_logistics_station + + + id = #{record.id,jdbcType=VARCHAR}, + + + create_by = #{record.createBy,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{record.delFlag,jdbcType=INTEGER}, + + + update_by = #{record.updateBy,jdbcType=VARCHAR}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + circuit_id = #{record.circuitId,jdbcType=VARCHAR}, + + + station_name = #{record.stationName,jdbcType=VARCHAR}, + + + freight_rules = #{record.freightRules,jdbcType=VARCHAR}, + + + landing_fee_rules = #{record.landingFeeRules,jdbcType=VARCHAR}, + + + delivery_fee_rules = #{record.deliveryFeeRules,jdbcType=VARCHAR}, + + + + + + update t_logistics_station + set id = #{record.id,jdbcType=VARCHAR}, + create_by = #{record.createBy,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + del_flag = #{record.delFlag,jdbcType=INTEGER}, + update_by = #{record.updateBy,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + circuit_id = #{record.circuitId,jdbcType=VARCHAR}, + station_name = #{record.stationName,jdbcType=VARCHAR}, + freight_rules = #{record.freightRules,jdbcType=VARCHAR}, + landing_fee_rules = #{record.landingFeeRules,jdbcType=VARCHAR}, + delivery_fee_rules = #{record.deliveryFeeRules,jdbcType=VARCHAR} + + + + update t_logistics_station + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{delFlag,jdbcType=INTEGER}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + circuit_id = #{circuitId,jdbcType=VARCHAR}, + + + station_name = #{stationName,jdbcType=VARCHAR}, + + + freight_rules = #{freightRules,jdbcType=VARCHAR}, + + + landing_fee_rules = #{landingFeeRules,jdbcType=VARCHAR}, + + + delivery_fee_rules = #{deliveryFeeRules,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + + update t_logistics_station + set create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + del_flag = #{delFlag,jdbcType=INTEGER}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + circuit_id = #{circuitId,jdbcType=VARCHAR}, + station_name = #{stationName,jdbcType=VARCHAR}, + freight_rules = #{freightRules,jdbcType=VARCHAR}, + landing_fee_rules = #{landingFeeRules,jdbcType=VARCHAR}, + delivery_fee_rules = #{deliveryFeeRules,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + + + \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsTransferStationMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsTransferStationMapper.xml new file mode 100644 index 00000000..6547dfe5 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsTransferStationMapper.xml @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + id, create_by, create_time, del_flag, update_by, update_time, station_id, go_station, arrival_station, transit_fee + + + + + + delete from t_logistics_transfer_station + where id = #{id,jdbcType=VARCHAR} + + + + insert into t_logistics_transfer_station + (id, create_by, create_time, del_flag, update_by, update_time,station_id, go_station, arrival_station, transit_fee) + values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{stationId,jdbcType=VARCHAR}, #{goStation,jdbcType=VARCHAR}, #{arrivalStation,jdbcType=VARCHAR}, #{transitFee,jdbcType=VARCHAR}) + + + + update t_logistics_transfer_station + + + id = #{record.id,jdbcType=VARCHAR}, + + + create_by = #{record.createBy,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{record.delFlag,jdbcType=INTEGER}, + + + update_by = #{record.updateBy,jdbcType=VARCHAR}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + station_id = #{record.stationId,jdbcType=VARCHAR}, + + + go_station = #{record.goStation,jdbcType=VARCHAR}, + + + arrival_station = #{record.arrivalStation,jdbcType=VARCHAR}, + + + transit_fee = #{record.transitFee,jdbcType=VARCHAR}, + + + + + + update t_logistics_transfer_station + set id = #{record.id,jdbcType=VARCHAR}, + create_by = #{record.createBy,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + del_flag = #{record.delFlag,jdbcType=INTEGER}, + update_by = #{record.updateBy,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + station_id = #{record.stationId,jdbcType=VARCHAR}, + go_station = #{record.goStation,jdbcType=VARCHAR}, + arrival_station = #{record.arrivalStation,jdbcType=VARCHAR}, + transit_fee = #{record.transitFee,jdbcType=VARCHAR} + + + + update t_logistics_transfer_station + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{delFlag,jdbcType=INTEGER}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + station_id = #{stationId,jdbcType=VARCHAR}, + + + go_station = #{goStation,jdbcType=VARCHAR}, + + + arrival_station = #{arrivalStation,jdbcType=VARCHAR}, + + + transit_fee = #{transitFee,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + + update t_logistics_transfer_station + set create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + del_flag = #{delFlag,jdbcType=INTEGER}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + station_id = #{stationId,jdbcType=VARCHAR}, + go_station = #{goStation,jdbcType=VARCHAR}, + arrival_station = #{arrivalStation,jdbcType=VARCHAR}, + transit_fee = #{transitFee,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + + + \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsUserMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsUserMapper.xml new file mode 100644 index 00000000..9bbb8e16 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsUserMapper.xml @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + id, create_by, create_time, del_flag, update_by, update_time,nick_name, mobile, company_id, user_role + + + + + + delete from t_logistics_user + where id = #{id,jdbcType=VARCHAR} + + + + insert into t_logistics_user + (id, create_by, create_time, del_flag, update_by, update_time, nick_name, mobile, company_id, user_role) + values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{nickName,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{companyId,jdbcType=VARCHAR}, #{userRole,jdbcType=VARCHAR}) + + + + update t_logistics_user + + + id = #{record.id,jdbcType=VARCHAR}, + + + create_by = #{record.createBy,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{record.delFlag,jdbcType=INTEGER}, + + + update_by = #{record.updateBy,jdbcType=VARCHAR}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + nick_name = #{record.nickName,jdbcType=VARCHAR}, + + + mobile = #{record.mobile,jdbcType=VARCHAR}, + + + company_id = #{record.companyId,jdbcType=VARCHAR}, + + + user_role = #{record.userRole,jdbcType=VARCHAR}, + + + + + + update t_logistics_user + set id = #{record.id,jdbcType=VARCHAR}, + create_by = #{record.createBy,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + del_flag = #{record.delFlag,jdbcType=INTEGER}, + update_by = #{record.updateBy,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + nick_name = #{record.nickName,jdbcType=VARCHAR}, + mobile = #{record.mobile,jdbcType=VARCHAR}, + company_id = #{record.companyId,jdbcType=VARCHAR}, + user_role = #{record.userRole,jdbcType=VARCHAR} + + + + update t_logistics_user + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{delFlag,jdbcType=INTEGER}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + nick_name = #{nickName,jdbcType=VARCHAR}, + + + mobile = #{mobile,jdbcType=VARCHAR}, + + + company_id = #{companyId,jdbcType=VARCHAR}, + + + user_role = #{userRole,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + + update t_logistics_user + set create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + del_flag = #{delFlag,jdbcType=INTEGER}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + nick_name = #{nickName,jdbcType=VARCHAR}, + mobile = #{mobile,jdbcType=VARCHAR}, + company_id = #{companyId,jdbcType=VARCHAR}, + user_role = #{userRole,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + + + \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/ReturnDetailMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/ReturnDetailMapper.xml index d5ae9f4e..937d4542 100644 --- a/hiver-modules/hiver-mall/src/main/resources/mapper/ReturnDetailMapper.xml +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/ReturnDetailMapper.xml @@ -550,4 +550,16 @@ delete from t_return_detail where sale_id = #{saleId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/ReturnSaleMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/ReturnSaleMapper.xml index 32dd6d3e..0a1b82e6 100644 --- a/hiver-modules/hiver-mall/src/main/resources/mapper/ReturnSaleMapper.xml +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/ReturnSaleMapper.xml @@ -644,7 +644,7 @@ from t_return_sale trs left join - (select trd.return_sale_id,trd.sale_id, IFNULL(sum(trd.purchase_price * trd.product_count),0.00) as total_cost from t_return_detail trd where trd.shop_id = #{returnSalePageQuery.shopId} group by trd.sale_id,trd.return_sale_id) cb + (select trd.return_sale_id,trd.sale_id, IFNULL(sum(pd.purchase_price * trd.product_count),0.00) as total_cost from t_return_detail trd JOIN t_product pd ON trd.product_id = pd.id where trd.shop_id = #{returnSalePageQuery.shopId} group by trd.sale_id,trd.return_sale_id) cb on trs.id = cb.return_sale_id WHERE trs.del_flag ='0' diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/SaleDetailMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/SaleDetailMapper.xml index 34d9ba83..d6b59950 100644 --- a/hiver-modules/hiver-mall/src/main/resources/mapper/SaleDetailMapper.xml +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/SaleDetailMapper.xml @@ -556,8 +556,7 @@