Browse Source

物流公司增删改,及其他BUG修改。

dev
wangfukang 2 years ago
parent
commit
5f0481576f
  1. 10
      hiver-admin/src/main/resources/application.yml
  2. 16
      hiver-admin/test-output/test-report.html
  3. 2
      hiver-core/src/main/java/cc/hiver/core/common/utils/SecurityUtil.java
  4. 16
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/bill/service/impl/BillServiceImpl.java
  5. 5
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SaleController.java
  6. 3
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ReturnDetailMapper.java
  7. 38
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/service/impl/DebtServiceImpl.java
  8. 5
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/debt/vo/DebtOfShopVo.java
  9. 103
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/controller/LogisticsEntruckingLogController.java
  10. 53
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/entity/LogisticsEntruckingLog.java
  11. 22
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/mapper/LogisticsEntruckingLogMapper.java
  12. 19
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/service/LogisticsEntruckingLogService.java
  13. 31
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/service/impl/LogisticsEntruckingLogServiceImpl.java
  14. 32
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsentruckinglog/vo/LogisticsEntruckingLogQueryVo.java
  15. 103
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/controller/LogisticsOrderController.java
  16. 111
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/entity/LogisticsOrder.java
  17. 22
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/mapper/LogisticsOrderMapper.java
  18. 19
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/service/LogisticsOrderService.java
  19. 32
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/service/impl/LogisticsOrderServiceImpl.java
  20. 43
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsorder/vo/LogisticsOrderQueryVo.java
  21. 103
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/controller/LogisticsRouteController.java
  22. 35
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/entity/LogisticsRoute.java
  23. 22
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/mapper/LogisticsRouteMapper.java
  24. 19
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/service/LogisticsRouteService.java
  25. 31
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/service/impl/LogisticsRouteServiceImpl.java
  26. 26
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsroute/vo/LogisticsRouteQueryVo.java
  27. 106
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/controller/LogisticsStationController.java
  28. 39
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/entity/LogisticsStation.java
  29. 22
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/mapper/LogisticsStationMapper.java
  30. 19
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/service/LogisticsStationService.java
  31. 32
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/service/impl/LogisticsStationServiceImpl.java
  32. 21
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsstation/vo/LogisticsStationQueryVo.java
  33. 103
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/controller/LogisticsTransferStationController.java
  34. 35
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/entity/LogisticsTransferStation.java
  35. 22
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/mapper/LogisticsTransferStationMapper.java
  36. 19
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/service/LogisticsTransferStationService.java
  37. 32
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/service/impl/LogisticsTransferStationServiceImpl.java
  38. 28
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticstransferstation/vo/LogisticsTransferStationQueryVo.java
  39. 103
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/controller/LogisticsUserController.java
  40. 36
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/entity/LogisticsUser.java
  41. 22
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/mapper/LogisticsUserMapper.java
  42. 19
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/service/LogisticsUserService.java
  43. 32
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/service/impl/LogisticsUserServiceImpl.java
  44. 25
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/logisticsuser/vo/LogisticsUserQueryVo.java
  45. 3
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SaleAllVO.java
  46. 3
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ReturnDetailService.java
  47. 11
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ReturnDetailServiceImpl.java
  48. 1
      hiver-modules/hiver-mall/src/main/resources/mapper/DealingsRecordMapper.xml
  49. 99
      hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsEntruckingLogMapper.xml
  50. 111
      hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsOrderMapper.xml
  51. 159
      hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsRouteMapper.xml
  52. 167
      hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsStationMapper.xml
  53. 159
      hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsTransferStationMapper.xml
  54. 155
      hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsUserMapper.xml
  55. 12
      hiver-modules/hiver-mall/src/main/resources/mapper/ReturnDetailMapper.xml
  56. 2
      hiver-modules/hiver-mall/src/main/resources/mapper/ReturnSaleMapper.xml
  57. 3
      hiver-modules/hiver-mall/src/main/resources/mapper/SaleDetailMapper.xml

10
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
# 错误超过次数后多少分钟后才能继续登录(分钟)

16
hiver-admin/test-output/test-report.html

@ -35,7 +35,7 @@
<a href="#"><span class="badge badge-primary">Hiver</span></a>
</li>
<li class="m-r-10">
<a href="#"><span class="badge badge-primary">八月 24, 2024 11:36:29</span></a>
<a href="#"><span class="badge badge-primary">八月 28, 2024 10:01:13</span></a>
</li>
</ul>
</div>
@ -84,7 +84,7 @@
<div class="test-detail">
<span class="meta text-white badge badge-sm"></span>
<p class="name">passTest</p>
<p class="text-sm"><span>11:36:29 上午</span> / <span>0.019 secs</span></p>
<p class="text-sm"><span>10:01:14 上午</span> / <span>0.016 secs</span></p>
</div>
<div class="test-contents d-none">
<div class="detail-head">
@ -92,9 +92,9 @@
<div class="info">
<div class='float-right'><span class='badge badge-default'>#test-id=1</span></div>
<h5 class="test-status text-pass">passTest</h5>
<span class='badge badge-success'>08.24.2024 11:36:29</span>
<span class='badge badge-danger'>08.24.2024 11:36:29</span>
<span class='badge badge-default'>0.019 secs</span>
<span class='badge badge-success'>08.28.2024 10:01:14</span>
<span class='badge badge-danger'>08.28.2024 10:01:14</span>
<span class='badge badge-default'>0.016 secs</span>
</div>
<div class="m-t-10 m-l-5"></div>
</div>
@ -104,7 +104,7 @@
<tbody>
<tr class="event-row">
<td><span class="badge log pass-bg">Pass</span></td>
<td>11:36:29</td>
<td>10:01:14</td>
<td>
Test passed
</td>
@ -128,13 +128,13 @@
<div class="col-md-3">
<div class="card"><div class="card-body">
<p class="m-b-0">Started</p>
<h3>八月 24, 2024 11:36:29</h3>
<h3>八月 28, 2024 10:01:13</h3>
</div></div>
</div>
<div class="col-md-3">
<div class="card"><div class="card-body">
<p class="m-b-0">Ended</p>
<h3>八月 24, 2024 11:36:29</h3>
<h3>八月 28, 2024 10:01:14</h3>
</div></div>
</div>
<div class="col-md-3">

2
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;
}

16
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<PurchaseDetail> purchaseDetailList = purchaseDetailMap.get(purchaseId);
// 根据商品id分类
@ -438,6 +441,10 @@ public class BillServiceImpl implements BillService {
final List<StockLog> 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<PurchaseReturnDetail> purchaseReturnDetailList = purchaseReturnDetailMap.get(purchaseId);
// 根据商品id分类
@ -482,6 +490,10 @@ public class BillServiceImpl implements BillService {
final List<StockLog> 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());

5
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());

3
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<ReturnDetail> {
void putInUpdatePurchasePrice(@Param("purchaseDetails") List<PurchaseDetail> purchaseDetails);
void deleteBySaleId(@Param("saleId")String saleId);
BigDecimal getsaleReturnCost(@Param("shopId") String shopId,@Param("startTime") String startTime,@Param("endTime") String endTime);
}

38
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<DebtMapper, Debt> implements De
@Autowired
private DealingsRecordService dealingsRecordService;
@Autowired
private PurchaseDetailService purchaseDetailService;
/**
* 根据店铺id查询欠款列表
*
@ -79,7 +85,7 @@ public class DebtServiceImpl extends ServiceImpl<DebtMapper, Debt> 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<DebtMapper, Debt> 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<DebtMapper, Debt> 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<DebtMapper, Debt> 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<DebtMapper, Debt> 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<DebtMapper, Debt> 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<DebtMapper, Debt> 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();
// 计算欠款

5
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;
}

103
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<IPage < LogisticsEntruckingLog>>
* @author 王富康
* @date 2024/8/24
*/
@RequestMapping(value = "/getLogisticsEntruckingLogPageList", method = RequestMethod.POST)
@ApiOperation(value = "分页查询物流装车记录")
public Result<IPage<LogisticsEntruckingLog>> getLogisticsEntruckingLogPageList(@RequestBody(required = false) LogisticsEntruckingLogQueryVo logisticsEntruckingLogQueryVo) {
final IPage<LogisticsEntruckingLog> result = logisticsEntruckingLogService.getLogisticsEntruckingLogPageList(logisticsEntruckingLogQueryVo);
return new ResultUtil<IPage<LogisticsEntruckingLog>>().setData(result);
}
}

53
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;
}

22
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<LogisticsEntruckingLog> {
/**
* 分页查询物流装车记录
*
* @param page
* @param logisticsEntruckingLogQueryVo
* @return IPage<LogisticsEntruckingLog>
* @author 王富康
* @date 2024/8/24
*/
IPage<LogisticsEntruckingLog> getLogisticsEntruckingLogPageList(Page<LogisticsEntruckingLog> page, @Param("queryParams") LogisticsEntruckingLogQueryVo logisticsEntruckingLogQueryVo);
}

19
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<LogisticsEntruckingLog> {
/**
* 分页查询物流装车记录
*
* @param logisticsEntruckingLogQueryVo
* @return IPage<LogisticsEntruckingLog>
* @author 王富康
* @date 2024/8/24
*/
IPage<LogisticsEntruckingLog> getLogisticsEntruckingLogPageList(LogisticsEntruckingLogQueryVo logisticsEntruckingLogQueryVo);
}

31
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<LogisticsEntruckingLogMapper, LogisticsEntruckingLog> implements LogisticsEntruckingLogService {
@Autowired
private LogisticsEntruckingLogMapper logisticsEntruckingLogMapper;
/**
* 分页查询物流装车记录
* @author 王富康
* @date 2024/8/24
* @param logisticsEntruckingLogQueryVo
* @return IPage<LogisticsEntruckingLog>
*/
@Override
public IPage<LogisticsEntruckingLog> getLogisticsEntruckingLogPageList(LogisticsEntruckingLogQueryVo logisticsEntruckingLogQueryVo) {
final Page<LogisticsEntruckingLog> page = new Page<>(logisticsEntruckingLogQueryVo.getPageNum(), logisticsEntruckingLogQueryVo.getPageSize());
return logisticsEntruckingLogMapper.getLogisticsEntruckingLogPageList(page, logisticsEntruckingLogQueryVo);
}
}

32
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;
}

103
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<IPage < LogisticsOrder>>
* @author 王富康
* @date 2024/8/24
*/
@RequestMapping(value = "/getLogisticsOrderPageList", method = RequestMethod.POST)
@ApiOperation(value = "分页查询物流订单")
public Result<IPage<LogisticsOrder>> getLogisticsOrderPageList(@RequestBody(required = false) LogisticsOrderQueryVo logisticsOrderQueryVo) {
final IPage<LogisticsOrder> result = logisticsOrderService.getLogisticsOrderPageList(logisticsOrderQueryVo);
return new ResultUtil<IPage<LogisticsOrder>>().setData(result);
}
}

111
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;
}

22
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<LogisticsOrder> {
/**
* 分页查询物流订单
*
* @param page
* @param logisticsOrderQueryVo
* @return IPage<LogisticsOrder>
* @author 王富康
* @date 2024/8/24
*/
IPage<LogisticsOrder> getLogisticsOrderPageList(Page<LogisticsOrder> page, @Param("queryParams") LogisticsOrderQueryVo logisticsOrderQueryVo);
}

19
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<LogisticsOrder> {
/**
* 分页查询物流订单
*
* @param logisticsOrderQueryVo
* @return IPage<LogisticsOrder>
* @author 王富康
* @date 2024/8/24
*/
IPage<LogisticsOrder> getLogisticsOrderPageList(LogisticsOrderQueryVo logisticsOrderQueryVo);
}

32
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<LogisticsOrderMapper, LogisticsOrder> implements LogisticsOrderService {
@Autowired
private LogisticsOrderMapper logisticsOrderMapper;
/**
* 分页查询物流订单
*
* @param logisticsOrderQueryVo
* @return IPage<LogisticsOrder>
* @author 王富康
* @date 2024/8/24
*/
@Override
public IPage<LogisticsOrder> getLogisticsOrderPageList(LogisticsOrderQueryVo logisticsOrderQueryVo) {
final Page<LogisticsOrder> page = new Page<>(logisticsOrderQueryVo.getPageNum(), logisticsOrderQueryVo.getPageSize());
return logisticsOrderMapper.getLogisticsOrderPageList(page, logisticsOrderQueryVo);
}
}

43
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;
}

103
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<IPage < LogisticsRoute>>
* @author 王富康
* @date 2024/8/24
*/
@RequestMapping(value = "/getLogisticsRoutePageList", method = RequestMethod.POST)
@ApiOperation(value = "分页查询物流线路")
public Result<IPage<LogisticsRoute>> getLogisticsRoutePageList(@RequestBody(required = false) LogisticsRouteQueryVo logisticsRouteQueryVo) {
final IPage<LogisticsRoute> result = logisticsRouteService.getLogisticsRoutePageList(logisticsRouteQueryVo);
return new ResultUtil<IPage<LogisticsRoute>>().setData(result);
}
}

35
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;
}

22
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<LogisticsRoute> {
/**
* 分页查询物流线路
*
* @param page
* @param logisticsRouteQueryVo
* @return IPage<LogisticsRoute>
* @author 王富康
* @date 2024/8/24
*/
IPage<LogisticsRoute> getLogisticsRoutePageList(Page<LogisticsRoute> page, @Param("queryParams") LogisticsRouteQueryVo logisticsRouteQueryVo);
}

19
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<LogisticsRoute> {
/**
* 分页查询物流线路
*
* @param logisticsRouteQueryVo
* @return IPage<LogisticsRoute>
* @author 王富康
* @date 2024/8/24
*/
IPage<LogisticsRoute> getLogisticsRoutePageList(LogisticsRouteQueryVo logisticsRouteQueryVo);
}

31
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<LogisticsRouteMapper, LogisticsRoute> implements LogisticsRouteService {
@Autowired
private LogisticsRouteMapper logisticsRouteMapper;
/**
* 分页查询物流线路
* @author 王富康
* @date 2024/8/24
* @param logisticsRouteQueryVo
* @return IPage<LogisticsRoute>
*/
@Override
public IPage<LogisticsRoute> getLogisticsRoutePageList(LogisticsRouteQueryVo logisticsRouteQueryVo) {
final Page<LogisticsRoute> page = new Page<>(logisticsRouteQueryVo.getPageNum(), logisticsRouteQueryVo.getPageSize());
return logisticsRouteMapper.getLogisticsRoutePageList(page, logisticsRouteQueryVo);
}
}

26
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;
}

106
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<IPage < LogisticsStation>>
* @author 王富康
* @date 2024/8/24
*/
@RequestMapping(value = "/getLogisticsStationPageList", method = RequestMethod.POST)
@ApiOperation(value = "分页查询物流站点")
public Result<IPage<LogisticsStation>> getLogisticsStationPageList(@RequestBody(required = false) LogisticsStationQueryVo logisticsRouteQueryVo) {
final IPage<LogisticsStation> result = logisticsStationService.getLogisticsStationPageList(logisticsRouteQueryVo);
return new ResultUtil<IPage<LogisticsStation>>().setData(result);
}
}

39
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;
}

22
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<LogisticsStation> {
/**
* 分页查询物流站点
*
* @param page
* @param logisticsRouteQueryVo
* @return IPage<LogisticsStation>
* @author 王富康
* @date 2024/8/24
*/
IPage<LogisticsStation> getLogisticsStationPageList(Page<LogisticsStation> page, @Param("queryParams") LogisticsStationQueryVo logisticsRouteQueryVo);
}

19
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<LogisticsStation> {
/**
* 分页查询物流站点
*
* @param logisticsRouteQueryVo
* @return IPage<LogisticsStation>
* @author 王富康
* @date 2024/8/24
*/
IPage<LogisticsStation> getLogisticsStationPageList(LogisticsStationQueryVo logisticsRouteQueryVo);
}

32
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<LogisticsStationMapper, LogisticsStation> implements LogisticsStationService {
@Autowired
private LogisticsStationMapper logisticsStationMapper;
/**
* 分页查询物流站点
*
* @param logisticsRouteQueryVo
* @return IPage<LogisticsStation>
* @author 王富康
* @date 2024/8/24
*/
@Override
public IPage<LogisticsStation> getLogisticsStationPageList(LogisticsStationQueryVo logisticsRouteQueryVo) {
final Page<LogisticsStation> page = new Page<>(logisticsRouteQueryVo.getPageNum(), logisticsRouteQueryVo.getPageSize());
return logisticsStationMapper.getLogisticsStationPageList(page, logisticsRouteQueryVo);
}
}

21
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;
}

103
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<IPage < LogisticsTransferStation>>
* @author 王富康
* @date 2024/8/24
*/
@RequestMapping(value = "/getLogisticsTransferStationPageList", method = RequestMethod.POST)
@ApiOperation(value = "分页查询物流中转站")
public Result<IPage<LogisticsTransferStation>> getLogisticsTransferStationPageList(@RequestBody(required = false) LogisticsTransferStationQueryVo logisticsTransferStationQueryVo) {
final IPage<LogisticsTransferStation> result = logisticsTransferStationService.getLogisticsTransferStationPageList(logisticsTransferStationQueryVo);
return new ResultUtil<IPage<LogisticsTransferStation>>().setData(result);
}
}

35
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;
}

22
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<LogisticsTransferStation> {
/**
* 分页查询物流中转站
*
* @param page
* @param logisticsTransferStationQueryVo
* @return IPage<LogisticsTransferStation>
* @author 王富康
* @date 2024/8/24
*/
IPage<LogisticsTransferStation> getLogisticsTransferStationPageList(Page<LogisticsTransferStation> page, @Param("queryParams") LogisticsTransferStationQueryVo logisticsTransferStationQueryVo);
}

19
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<LogisticsTransferStation> {
/**
* 分页查询物流中转站
*
* @param logisticsTransferStationQueryVo
* @return IPage<LogisticsTransferStation>
* @author 王富康
* @date 2024/8/24
*/
IPage<LogisticsTransferStation> getLogisticsTransferStationPageList(LogisticsTransferStationQueryVo logisticsTransferStationQueryVo);
}

32
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<LogisticsTransferStationMapper, LogisticsTransferStation> implements LogisticsTransferStationService {
@Autowired
private LogisticsTransferStationMapper logisticsTransferStationMapper;
/**
* 分页查询物流中转站
*
* @param logisticsTransferStationQueryVo
* @return IPage<LogisticsTransferStation>
* @author 王富康
* @date 2024/8/24
*/
@Override
public IPage<LogisticsTransferStation> getLogisticsTransferStationPageList(LogisticsTransferStationQueryVo logisticsTransferStationQueryVo) {
final Page<LogisticsTransferStation> page = new Page<>(logisticsTransferStationQueryVo.getPageNum(), logisticsTransferStationQueryVo.getPageSize());
return logisticsTransferStationMapper.getLogisticsTransferStationPageList(page, logisticsTransferStationQueryVo);
}
}

28
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;
}

103
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<IPage < LogisticsUser>>
* @author 王富康
* @date 2024/8/24
*/
@RequestMapping(value = "/getLogisticsUserPageList", method = RequestMethod.POST)
@ApiOperation(value = "分页查询物流公司人员")
public Result<IPage<LogisticsUser>> getLogisticsUserPageList(@RequestBody(required = false) LogisticsUserQueryVo logisticsUserQueryVo) {
final IPage<LogisticsUser> result = logisticsUserService.getLogisticsUserPageList(logisticsUserQueryVo);
return new ResultUtil<IPage<LogisticsUser>>().setData(result);
}
}

36
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;
}

22
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<LogisticsUser> {
/**
* 分页查询物流公司人员
*
* @param page
* @param logisticsUserQueryVo
* @return IPage<LogisticsUser>
* @author 王富康
* @date 2024/8/24
*/
IPage<LogisticsUser> getLogisticsUserPageList(Page<LogisticsUser> page, @Param("queryParams") LogisticsUserQueryVo logisticsUserQueryVo);
}

19
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<LogisticsUser> {
/**
* 分页查询物流公司人员
*
* @param logisticsUserQueryVo
* @return IPage<LogisticsUser>
* @author 王富康
* @date 2024/8/24
*/
IPage<LogisticsUser> getLogisticsUserPageList(LogisticsUserQueryVo logisticsUserQueryVo);
}

32
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<LogisticsUserMapper, LogisticsUser> implements LogisticsUserService {
@Autowired
private LogisticsUserMapper logisticsUserMapper;
/**
* 分页查询物流公司人员
*
* @param logisticsUserQueryVo
* @return IPage<LogisticsUser>
* @author 王富康
* @date 2024/8/24
*/
@Override
public IPage<LogisticsUser> getLogisticsUserPageList(LogisticsUserQueryVo logisticsUserQueryVo) {
final Page<LogisticsUser> page = new Page<>(logisticsUserQueryVo.getPageNum(), logisticsUserQueryVo.getPageSize());
return logisticsUserMapper.getLogisticsUserPageList(page, logisticsUserQueryVo);
}
}

25
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;
}

3
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;
}

3
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<ReturnDetail> {
@ -26,4 +27,6 @@ public interface ReturnDetailService extends IService<ReturnDetail> {
List<ReturnDetail> getReturnDetailsByProductId(ReturnSalePageQuery returnSalePageQuery);
void deleteBySaleId(String saleId);
BigDecimal getsaleReturnCost(String shopId, String startTime, String endTime);
}

11
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<ReturnDetailMapper, Ret
public void deleteBySaleId(String saleId) {
returnDetailMapper.deleteBySaleId(saleId);
}
@Override
public BigDecimal getsaleReturnCost(String shopId, String startTime, String endTime) {
if(StringUtils.isEmpty(shopId) || StringUtils.isEmpty(startTime) || StringUtils.isEmpty(endTime)){
log.error("获取销售退货成本失败,参数为空!");
return BigDecimal.ZERO;
}
return returnDetailMapper.getsaleReturnCost(shopId, startTime, endTime);
}
}

1
hiver-modules/hiver-mall/src/main/resources/mapper/DealingsRecordMapper.xml

@ -196,6 +196,7 @@
WHERE
<!--20240802 排除掉删除的交易记录-->
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')

99
hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsEntruckingLogMapper.xml

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cc.hiver.mall.logisticsentruckinglog.mapper.LogisticsEntruckingLogMapper">
<resultMap id="BaseResultMap" type="cc.hiver.mall.logisticsentruckinglog.entity.LogisticsEntruckingLog">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="del_flag" jdbcType="INTEGER" property="delFlag" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="company_id" jdbcType="VARCHAR" property="companyId" />
<result column="company_name" jdbcType="VARCHAR" property="companyName" />
<result column="circuit_id" jdbcType="VARCHAR" property="circuitId" />
<result column="circuit_name" jdbcType="VARCHAR" property="circuitName" />
<result column="car_number" jdbcType="VARCHAR" property="carNumber" />
<result column="car_phone" jdbcType="VARCHAR" property="carPhone" />
<result column="car_user_name" jdbcType="VARCHAR" property="carUserName" />
<result column="car_fee" jdbcType="DECIMAL" property="carFee" />
<result column="car_freight" jdbcType="DECIMAL" property="carFreight" />
</resultMap>
<sql id="Base_Column_List">
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
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_logistics_entrucking_log
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from t_logistics_entrucking_log
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="cc.hiver.mall.logisticsentruckinglog.entity.LogisticsEntruckingLog">
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})
</insert>
<update id="updateByPrimaryKey" parameterType="cc.hiver.mall.logisticsentruckinglog.entity.LogisticsEntruckingLog">
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}
</update>
<!--管理商品分页列表-->
<select id="getLogisticsEntruckingLogPageList" resultMap="BaseResultMap" parameterType="cc.hiver.mall.logisticsentruckinglog.vo.LogisticsEntruckingLogQueryVo">
select
<include refid="Base_Column_List" />
from t_logistics_entrucking_log
<where>
<!--物流公司id-->
<if test='queryParams.companyId!=null and queryParams.companyId.trim() neq ""'>
AND company_id = #{queryParams.companyId}
</if>
<!--物流公司名称-->
<if test='queryParams.companyName!=null and queryParams.companyName.trim() neq ""'>
AND company_name like concat('%',#{queryParams.companyName},'%')
</if>
<!--线路id-->
<if test='queryParams.circuitId!=null and queryParams.circuitId.trim() neq ""'>
AND circuit_id = #{queryParams.circuitId}
</if>
<!--线路名称-->
<if test='queryParams.circuitName!=null and queryParams.circuitName.trim() neq ""'>
AND circuit_name like concat('%',#{queryParams.circuitName},'%')
</if>
<!--车牌号-->
<if test='queryParams.carNumber!=null and queryParams.carNumber.trim() neq ""'>
AND car_number like concat('%',#{queryParams.carNumber},'%')
</if>
</where>
ORDER BY
create_time desc
</select>
</mapper>

111
hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsOrderMapper.xml

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cc.hiver.mall.logisticsorder.mapper.LogisticsOrderMapper">
<resultMap id="BaseResultMap" type="cc.hiver.mall.logisticsorder.entity.LogisticsOrder">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="del_flag" jdbcType="INTEGER" property="delFlag" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="company_id" jdbcType="VARCHAR" property="companyId" />
<result column="company_name" jdbcType="VARCHAR" property="companyName" />
<result column="circuit_id" jdbcType="VARCHAR" property="circuitId" />
<result column="circuit_name" jdbcType="VARCHAR" property="circuitName" />
<result column="shipper_name" jdbcType="VARCHAR" property="shipperName" />
<result column="shipper_mobile" jdbcType="VARCHAR" property="shipperMobile" />
<result column="shipper_address" jdbcType="VARCHAR" property="shipperAddress" />
<result column="receiver_name" jdbcType="VARCHAR" property="receiverName" />
<result column="receiver_mobile" jdbcType="VARCHAR" property="receiverMobile" />
<result column="receiver_address" jdbcType="VARCHAR" property="receiverAddress" />
<result column="go_station_id" jdbcType="VARCHAR" property="goStationId" />
<result column="go_station_name" jdbcType="VARCHAR" property="goStationName" />
<result column="arrival_station_id" jdbcType="VARCHAR" property="arrivalStationId" />
<result column="arrival_station_name" jdbcType="VARCHAR" property="arrivalStationName" />
<result column="weight" jdbcType="DECIMAL" property="weight" />
<result column="count" jdbcType="INTEGER" property="count" />
<result column="freight" jdbcType="DECIMAL" property="freight" />
<result column="premium" jdbcType="DECIMAL" property="premium" />
<result column="transit_fee" jdbcType="DECIMAL" property="transitFee" />
<result column="tips" jdbcType="DECIMAL" property="tips" />
<result column="method_of_settlement" jdbcType="VARCHAR" property="methodOfSettlement" />
<result column="cost" jdbcType="DECIMAL" property="cost" />
<result column="all_cost" jdbcType="DECIMAL" property="allCost" />
<result column="order_number" jdbcType="VARCHAR" property="orderNumber" />
<result column="object_name" jdbcType="VARCHAR" property="objectName" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="receiving_user_id" jdbcType="VARCHAR" property="receivingUserId" />
<result column="receiving_user_name" jdbcType="VARCHAR" property="receivingUserName" />
</resultMap>
<sql id="Base_Column_List">
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
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_logistics_order
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from t_logistics_order
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="cc.hiver.mall.logisticsorder.entity.LogisticsOrder">
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})
</insert>
<!--管理商品分页列表-->
<select id="getLogisticsOrderPageList" resultMap="BaseResultMap" parameterType="cc.hiver.mall.logisticsorder.vo.LogisticsOrderQueryVo">
select
<include refid="Base_Column_List" />
from t_logistics_order
<where>
<if test='queryParams.companyName!=null and queryParams.companyName.trim() neq ""'>
AND company_name like concat('%',#{queryParams.companyName},'%')
</if>
<if test='queryParams.circuitName!=null and queryParams.circuitName.trim() neq ""'>
AND circuit_name like concat('%',#{queryParams.circuitName},'%')
</if>
<if test='queryParams.shipperName!=null and queryParams.shipperName.trim() neq ""'>
AND shipper_name like concat('%',#{queryParams.shipperName},'%')
</if>
<if test='queryParams.shipperMobile!=null and queryParams.shipperMobile.trim() neq ""'>
AND shipper_mobile like concat('%',#{queryParams.shipperMobile},'%')
</if>
<if test='queryParams.shipperAddress!=null and queryParams.shipperAddress.trim() neq ""'>
AND shipper_address like concat('%',#{queryParams.shipperAddress},'%')
</if>
<if test='queryParams.receiverName!=null and queryParams.receiverName.trim() neq ""'>
AND receiver_name like concat('%',#{queryParams.receiverName},'%')
</if>
<!--开始时间、结束时间-->
<if test="queryParams.startDate!=null and queryParams.endDate!=null">
AND create_time BETWEEN #{queryParams.startDate} AND #{queryParams.endDate}
</if>
</where>
ORDER BY
create_time desc
</select>
</mapper>

159
hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsRouteMapper.xml

@ -0,0 +1,159 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cc.hiver.mall.logisticsroute.mapper.LogisticsRouteMapper">
<resultMap id="BaseResultMap" type="cc.hiver.mall.logisticsroute.entity.LogisticsRoute">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="del_flag" jdbcType="INTEGER" property="delFlag" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="go_station" jdbcType="VARCHAR" property="goStation" />
<result column="arrival_station" jdbcType="VARCHAR" property="arrivalStation" />
<result column="circuit_name" jdbcType="VARCHAR" property="circuitName" />
<result column="premium_rules" jdbcType="VARCHAR" property="premiumRules" />
</resultMap>
<sql id="Base_Column_List">
id, create_by, create_time, del_flag, update_by, update_time, go_station, arrival_station, circuit_name, premium_rules
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_logistics_route
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from t_logistics_route
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="cc.hiver.mall.logisticsroute.entity.LogisticsRoute">
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})
</insert>
<update id="updateByExampleSelective" parameterType="map">
update t_logistics_route
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.delFlag != null">
del_flag = #{record.delFlag,jdbcType=INTEGER},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.goStation != null">
go_station = #{record.goStation,jdbcType=VARCHAR},
</if>
<if test="record.arrivalStation != null">
arrival_station = #{record.arrivalStation,jdbcType=VARCHAR},
</if>
<if test="record.circuitName != null">
circuit_name = #{record.circuitName,jdbcType=VARCHAR},
</if>
<if test="record.premiumRules != null">
premium_rules = #{record.premiumRules,jdbcType=VARCHAR},
</if>
</set>
</update>
<update id="updateByExample" parameterType="map">
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>
<update id="updateByPrimaryKeySelective" parameterType="cc.hiver.mall.logisticsroute.entity.LogisticsRoute">
update t_logistics_route
<set>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=INTEGER},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="goStation != null">
go_station = #{goStation,jdbcType=VARCHAR},
</if>
<if test="arrivalStation != null">
arrival_station = #{arrivalStation,jdbcType=VARCHAR},
</if>
<if test="circuitName != null">
circuit_name = #{circuitName,jdbcType=VARCHAR},
</if>
<if test="premiumRules != null">
premium_rules = #{premiumRules,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="cc.hiver.mall.logisticsroute.entity.LogisticsRoute">
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}
</update>
<!--管理商品分页列表-->
<select id="getLogisticsRoutePageList" resultMap="BaseResultMap" parameterType="cc.hiver.mall.logisticsroute.vo.LogisticsRouteQueryVo">
select
t.id, t.create_by,t.create_time,t.del_flag,t.update_by,t.update_time,t.go_station,t.arrival_station,t.circuit_name,t.premium_rules
from t_logistics_route t
<where>
<!--反馈内容-->
<if test='queryParams.goStation!=null and queryParams.goStation.trim() neq ""'>
AND t.go_station like concat('%',#{queryParams.goStation},'%')
</if>
<if test='queryParams.arrivalStation!=null and queryParams.arrivalStation.trim() neq ""'>
AND t.arrival_station like concat('%',#{queryParams.arrivalStation},'%')
</if>
<if test='queryParams.circuitName!=null and queryParams.circuitName.trim() neq ""'>
AND t.circuit_name like concat('%',#{queryParams.circuitName},'%')
</if>
</where>
ORDER BY
t.create_time desc
</select>
</mapper>

167
hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsStationMapper.xml

@ -0,0 +1,167 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cc.hiver.mall.logisticsstation.mapper.LogisticsStationMapper">
<resultMap id="BaseResultMap" type="cc.hiver.mall.logisticsstation.entity.LogisticsStation">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="del_flag" jdbcType="INTEGER" property="delFlag" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="circuit_id" jdbcType="VARCHAR" property="circuitId" />
<result column="station_name" jdbcType="VARCHAR" property="stationName" />
<result column="freight_rules" jdbcType="VARCHAR" property="freightRules" />
<result column="landing_fee_rules" jdbcType="VARCHAR" property="landingFeeRules" />
<result column="delivery_fee_rules" jdbcType="VARCHAR" property="deliveryFeeRules" />
</resultMap>
<sql id="Base_Column_List">
id, create_by, create_time, del_flag, update_by, update_time,circuit_id, station_name, freight_rules, landing_fee_rules, delivery_fee_rules
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_logistics_station
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from t_logistics_station
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="cc.hiver.mall.logisticsstation.entity.LogisticsStation">
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})
</insert>
<update id="updateByExampleSelective" parameterType="map">
update t_logistics_station
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.delFlag != null">
del_flag = #{record.delFlag,jdbcType=INTEGER},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.circuitId != null">
circuit_id = #{record.circuitId,jdbcType=VARCHAR},
</if>
<if test="record.stationName != null">
station_name = #{record.stationName,jdbcType=VARCHAR},
</if>
<if test="record.freightRules != null">
freight_rules = #{record.freightRules,jdbcType=VARCHAR},
</if>
<if test="record.landingFeeRules != null">
landing_fee_rules = #{record.landingFeeRules,jdbcType=VARCHAR},
</if>
<if test="record.deliveryFeeRules != null">
delivery_fee_rules = #{record.deliveryFeeRules,jdbcType=VARCHAR},
</if>
</set>
</update>
<update id="updateByExample" parameterType="map">
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>
<update id="updateByPrimaryKeySelective" parameterType="cc.hiver.mall.logisticsstation.entity.LogisticsStation">
update t_logistics_station
<set>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=INTEGER},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="circuitId != null">
circuit_id = #{circuitId,jdbcType=VARCHAR},
</if>
<if test="stationName != null">
station_name = #{stationName,jdbcType=VARCHAR},
</if>
<if test="freightRules != null">
freight_rules = #{freightRules,jdbcType=VARCHAR},
</if>
<if test="landingFeeRules != null">
landing_fee_rules = #{landingFeeRules,jdbcType=VARCHAR},
</if>
<if test="deliveryFeeRules != null">
delivery_fee_rules = #{deliveryFeeRules,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="cc.hiver.mall.logisticsstation.entity.LogisticsStation">
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}
</update>
<!--管理商品分页列表-->
<select id="getLogisticsStationPageList" resultMap="BaseResultMap" parameterType="cc.hiver.mall.logisticsstation.vo.LogisticsStationQueryVo">
select
t.id, t.create_by,t.create_time,t.del_flag,t.update_by,t.update_time,t.circuit_id,t.station_name,t.freight_rules,t.landing_fee_rules,t.delivery_fee_rules
from t_logistics_station t
<where>
<!--反馈内容-->
<if test='queryParams.circuitId!=null and queryParams.circuitId.trim() neq ""'>
AND t.circuit_id = #{queryParams.circuitId}
</if>
<if test='queryParams.stationName!=null and queryParams.stationName.trim() neq ""'>
AND (t.station_name LIKE CONCAT( '%', #{queryParams.stationName}, '%' )
OR to_pinyin ( t.station_name ) LIKE CONCAT( '%', to_pinyin ( #{queryParams.stationName} ), '%' )
OR to_initial_pinyin ( t.station_name ) LIKE CONCAT( '%', #{queryParams.stationName}, '%' ))
</if>
</where>
ORDER BY
t.create_time desc
</select>
</mapper>

159
hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsTransferStationMapper.xml

@ -0,0 +1,159 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cc.hiver.mall.logisticstransferstation.mapper.LogisticsTransferStationMapper">
<resultMap id="BaseResultMap" type="cc.hiver.mall.logisticstransferstation.entity.LogisticsTransferStation">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="del_flag" jdbcType="INTEGER" property="delFlag" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="station_id" jdbcType="VARCHAR" property="stationId" />
<result column="go_station" jdbcType="VARCHAR" property="goStation" />
<result column="arrival_station" jdbcType="VARCHAR" property="arrivalStation" />
<result column="transit_fee" jdbcType="VARCHAR" property="transitFee" />
</resultMap>
<sql id="Base_Column_List">
id, create_by, create_time, del_flag, update_by, update_time, station_id, go_station, arrival_station, transit_fee
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_logistics_transfer_station
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from t_logistics_transfer_station
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="cc.hiver.mall.logisticstransferstation.entity.LogisticsTransferStation">
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})
</insert>
<update id="updateByExampleSelective" parameterType="map">
update t_logistics_transfer_station
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.delFlag != null">
del_flag = #{record.delFlag,jdbcType=INTEGER},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.stationId != null">
station_id = #{record.stationId,jdbcType=VARCHAR},
</if>
<if test="record.goStation != null">
go_station = #{record.goStation,jdbcType=VARCHAR},
</if>
<if test="record.arrivalStation != null">
arrival_station = #{record.arrivalStation,jdbcType=VARCHAR},
</if>
<if test="record.transitFee != null">
transit_fee = #{record.transitFee,jdbcType=VARCHAR},
</if>
</set>
</update>
<update id="updateByExample" parameterType="map">
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>
<update id="updateByPrimaryKeySelective" parameterType="cc.hiver.mall.logisticstransferstation.entity.LogisticsTransferStation">
update t_logistics_transfer_station
<set>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=INTEGER},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="stationId != null">
station_id = #{stationId,jdbcType=VARCHAR},
</if>
<if test="goStation != null">
go_station = #{goStation,jdbcType=VARCHAR},
</if>
<if test="arrivalStation != null">
arrival_station = #{arrivalStation,jdbcType=VARCHAR},
</if>
<if test="transitFee != null">
transit_fee = #{transitFee,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="cc.hiver.mall.logisticstransferstation.entity.LogisticsTransferStation">
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}
</update>
<!--管理商品分页列表-->
<select id="getLogisticsTransferStationPageList" resultMap="BaseResultMap" parameterType="cc.hiver.mall.logisticstransferstation.vo.LogisticsTransferStationQueryVo">
select
t.id, t.create_by,t.create_time,t.del_flag,t.update_by,t.update_time,t.station_id,t.go_station,t.arrival_station,t.transit_fee
from t_logistics_transfer_station t
<where>
<!--反馈内容-->
<if test='queryParams.goStation!=null and queryParams.goStation.trim() neq ""'>
AND t.go_station like concat('%',#{queryParams.goStation},'%')
</if>
<if test='queryParams.arrivalStation!=null and queryParams.arrivalStation.trim() neq ""'>
AND t.arrival_station like concat('%',#{queryParams.arrivalStation},'%')
</if>
<if test='queryParams.stationId!=null and queryParams.stationId.trim() neq ""'>
AND t.station_id = #{queryParams.stationId}
</if>
</where>
ORDER BY
t.create_time desc
</select>
</mapper>

155
hiver-modules/hiver-mall/src/main/resources/mapper/LogisticsUserMapper.xml

@ -0,0 +1,155 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cc.hiver.mall.logisticsuser.mapper.LogisticsUserMapper">
<resultMap id="BaseResultMap" type="cc.hiver.mall.logisticsuser.entity.LogisticsUser">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="del_flag" jdbcType="INTEGER" property="delFlag" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="nick_name" jdbcType="VARCHAR" property="nickName" />
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
<result column="company_id" jdbcType="VARCHAR" property="companyId" />
<result column="user_role" jdbcType="VARCHAR" property="usuerRole" />
</resultMap>
<sql id="Base_Column_List">
id, create_by, create_time, del_flag, update_by, update_time,nick_name, mobile, company_id, user_role
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_logistics_user
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from t_logistics_user
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="cc.hiver.mall.logisticsuser.entity.LogisticsUser">
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})
</insert>
<update id="updateByExampleSelective" parameterType="map">
update t_logistics_user
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.delFlag != null">
del_flag = #{record.delFlag,jdbcType=INTEGER},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.nickName != null">
nick_name = #{record.nickName,jdbcType=VARCHAR},
</if>
<if test="record.mobile != null">
mobile = #{record.mobile,jdbcType=VARCHAR},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=VARCHAR},
</if>
<if test="record.userRole != null">
user_role = #{record.userRole,jdbcType=VARCHAR},
</if>
</set>
</update>
<update id="updateByExample" parameterType="map">
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>
<update id="updateByPrimaryKeySelective" parameterType="cc.hiver.mall.logisticsuser.entity.LogisticsUser">
update t_logistics_user
<set>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=INTEGER},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="nickName != null">
nick_name = #{nickName,jdbcType=VARCHAR},
</if>
<if test="mobile != null">
mobile = #{mobile,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=VARCHAR},
</if>
<if test="userRole != null">
user_role = #{userRole,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="cc.hiver.mall.logisticsuser.entity.LogisticsUser">
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}
</update>
<!--管理商品分页列表-->
<select id="getLogisticsUserPageList" resultMap="BaseResultMap" parameterType="cc.hiver.mall.logisticsuser.vo.LogisticsUserQueryVo">
select
t.id, t.create_by,t.create_time,t.del_flag,t.update_by,t.update_time,t.nick_name,t.mobile,t.company_id,t.user_role
from t_logistics_user t
<where>
<if test='queryParams.nickName!=null and queryParams.nickName.trim() neq ""'>
AND t.nick_name like concat('%',#{queryParams.nickName},'%')
</if>
<if test='queryParams.companyId!=null and queryParams.companyId.trim() neq ""'>
AND t.company_id = #{queryParams.companyId}
</if>
</where>
ORDER BY
t.create_time desc
</select>
</mapper>

12
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}
</delete>
<select id="getsaleReturnCost" resultType="java.math.BigDecimal">
select
IFNULL(sum(pd.purchase_price * trd.product_count),0.00) as saleReturnCost
from t_return_detail trd
JOIN t_product pd ON trd.product_id = pd.id
where
trd.shop_id = #{shopId}
and trd.create_time BETWEEN #{startTime} AND #{endTime}
and trd.return_sale_id in
(select id from t_return_sale where shop_id = #{shopId} and del_flag='0' and status != '02')
</select>
</mapper>

2
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'

3
hiver-modules/hiver-mall/src/main/resources/mapper/SaleDetailMapper.xml

@ -556,8 +556,7 @@
</select>
<select id="getTotalProfit" resultType="java.math.BigDecimal">
SELECT SUM(( sd.discount_amount - COALESCE(pd.purchase_price, 0) ) * sd.product_count
) AS profit
SELECT IFNULL(SUM(( sd.discount_amount - COALESCE(pd.purchase_price, 0) ) * sd.product_count),0.00) AS profit
FROM
t_sale_detail sd
JOIN t_product pd ON sd.product_id = pd.id

Loading…
Cancel
Save