lyhzzz 1 rok pred
rodič
commit
d5041f63ba

+ 1 - 0
src/main/java/com/fdkankan/manage/inner/controller/InnerController.java

@@ -109,6 +109,7 @@ public class InnerController extends BaseController {
         BeanUtils.copyProperties(rtkInfo,rtkUseLog);
         BeanUtils.copyProperties(rtkInfo,rtkUseLog);
         String clientIP = ServletUtil.getClientIP(request);
         String clientIP = ServletUtil.getClientIP(request);
         rtkUseLog.setVisitIp(clientIP);
         rtkUseLog.setVisitIp(clientIP);
+        rtkUseLog.setId(null);
         rtkUseLogService.save(rtkUseLog);
         rtkUseLogService.save(rtkUseLog);
         return ResultData.ok(rtkInfo);
         return ResultData.ok(rtkInfo);
     }
     }

+ 3 - 4
src/main/java/com/fdkankan/manage/service/impl/RtkAccountServiceImpl.java

@@ -56,11 +56,10 @@ public class RtkAccountServiceImpl extends ServiceImpl<IRtkAccountMapper, RtkAcc
             sendDingDingMsg(0);
             sendDingDingMsg(0);
             throw new BusinessException(ResultCode.RTK_SN_CODE_NOT_EXIT);
             throw new BusinessException(ResultCode.RTK_SN_CODE_NOT_EXIT);
         }
         }
-        long count = this.count();
-        modelThreshold(count,list.size() -1);
         RtkAccount rtkAccount = list.get(0);
         RtkAccount rtkAccount = list.get(0);
         updateAccountStatus(rtkAccount.getId(),2);
         updateAccountStatus(rtkAccount.getId(),2);
         redisUtil.set(redisKey,JSONObject.toJSONString(rtkAccount));
         redisUtil.set(redisKey,JSONObject.toJSONString(rtkAccount));
+        modelThreshold(list.size() -1);
         return rtkAccount;
         return rtkAccount;
     }
     }
 
 
@@ -72,8 +71,8 @@ public class RtkAccountServiceImpl extends ServiceImpl<IRtkAccountMapper, RtkAcc
         this.update(wrapper1);
         this.update(wrapper1);
     }
     }
 
 
-    private void modelThreshold(long count, int size) {
-        BigDecimal totalCount = new BigDecimal(count);
+    private void modelThreshold( int size) {
+        BigDecimal totalCount = new BigDecimal(this.count());
         BigDecimal dbCount = new BigDecimal(size);
         BigDecimal dbCount = new BigDecimal(size);
 
 
         BigDecimal divideCount = totalCount.divide(dbCount).setScale(2, RoundingMode.HALF_DOWN);
         BigDecimal divideCount = totalCount.divide(dbCount).setScale(2, RoundingMode.HALF_DOWN);