Browse Source

no message

FengChaoYu 7 months ago
parent
commit
e293d1350b

+ 2 - 2
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/material/parts/WorkerPartsStockLogic.java

@@ -117,8 +117,8 @@ public class WorkerPartsStockLogic {
             return initWorkStockCensusBean;
         }
         WorkerStockCensusBean workerStockStatistics = materialMapper.workerStockStatistics(wechat.getCompanyWechatId(), identity, websitId);
-        workerStockStatistics.setWorkerName(wechat.getUser().getNickName());
-        if(!Objects.isNull(workerStockStatistics)) {
+        if(Objects.nonNull(workerStockStatistics)) {
+            workerStockStatistics.setWorkerName(wechat.getUser().getNickName());
             WorkerStockCensusBean workerNewStockStatistics =  materialMapper.workerNewStockStatistics(wechat.getCompanyWechatId(), identity, websitId);
             workerStockStatistics.setNewRefundQty(Objects.isNull(workerNewStockStatistics) ? new BigDecimal(0) : workerNewStockStatistics.getNewRefundQty());
             workerStockStatistics.setNewRefundAmount(Objects.isNull(workerNewStockStatistics) ? new BigDecimal(0) : workerNewStockStatistics.getNewRefundAmount());