‘linchangsheng’ 5 months ago
parent
commit
04e67558f0

+ 5 - 3
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/user/UserLogic.java

@@ -1613,7 +1613,7 @@ public class UserLogic {
     public WorkerWarrantyDetal warranty() {
     public WorkerWarrantyDetal warranty() {
         CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat();
         CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat();
 
 
-        WorkerWarranty workerWarranty = workerWarrantyService.lambdaQuery().eq(WorkerWarranty::getWorkerId, currentCompanyWechat.getUser())
+        WorkerWarranty workerWarranty = workerWarrantyService.lambdaQuery().eq(WorkerWarranty::getWorkerId, currentCompanyWechat.getUser().getUserId())
                 .last("limit 1").one();
                 .last("limit 1").one();
 
 
         if (workerWarranty == null)
         if (workerWarranty == null)
@@ -1621,8 +1621,10 @@ public class UserLogic {
 
 
         WorkerWarrantyDetal workerWarrantyDetal = BeanUtil.toBean(workerWarranty, WorkerWarrantyDetal.class);
         WorkerWarrantyDetal workerWarrantyDetal = BeanUtil.toBean(workerWarranty, WorkerWarrantyDetal.class);
 
 
-        List<WorkerWarrantyRefund> workerWarrantyRefunds = workerWarrantyRefundService.lambdaQuery().eq(WorkerWarrantyRefund::getWarrantyId, workerWarranty.getWarrantyId()).list();
-        List<WorkerWarrantyPay> workerWarrantyPays = workerWarrantyPayService.lambdaQuery().eq(WorkerWarrantyPay::getWarrantyId, workerWarranty.getWarrantyId()).list();
+        List<WorkerWarrantyRefund> workerWarrantyRefunds = workerWarrantyRefundService.lambdaQuery()
+                .eq(WorkerWarrantyRefund::getWarrantyId, workerWarranty.getWarrantyId()).list();
+        List<WorkerWarrantyPay> workerWarrantyPays = workerWarrantyPayService.lambdaQuery()
+                .eq(WorkerWarrantyPay::getWarrantyId, workerWarranty.getWarrantyId()).list();
 
 
         List<WorkerWarrantyPrice> workerWarrantyPrices = new ArrayList<>();
         List<WorkerWarrantyPrice> workerWarrantyPrices = new ArrayList<>();
 
 

+ 3 - 0
mall-server-api/src/main/java/com/gree/mall/manager/logic/worker/WorkerWarrantyLogic.java

@@ -267,6 +267,9 @@ public class WorkerWarrantyLogic {
                 continue;
                 continue;
             }
             }
 
 
+            if (StringUtil.isEmpty(payAmountTime))
+                throw new RemoteServiceException("第"+index+"行"+"缴纳时间未填");
+
             WorkerWarrantyPay workerWarrantyPay = new WorkerWarrantyPay();
             WorkerWarrantyPay workerWarrantyPay = new WorkerWarrantyPay();
             workerWarrantyPay.setWarrantyId(id);
             workerWarrantyPay.setWarrantyId(id);
             workerWarrantyPay.setPayAmount(Convert.toBigDecimal(payAmount));
             workerWarrantyPay.setPayAmount(Convert.toBigDecimal(payAmount));