| 
					
				 | 
			
			
				@@ -70,7 +70,11 @@ public class ConsumptionTopUpLogServiceImpl implements ConsumptionTopUpLogServic 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         createReqVO.setConsumptionPoints(createReqVO.getConsumptionPoints() * DistriConstants.MILLION); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 充值倍率 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        createReqVO.setPracticalConsumptionPoints((long) (createReqVO.getConsumptionPoints() * Double.parseDouble(orderPercentageDO.getConsumptionMagnification()))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (createReqVO.getConsumptionPoints() >= Long.parseLong(orderPercentageDO.getTriggerMagnificationPoints()) * DistriConstants.MILLION) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            createReqVO.setPracticalConsumptionPoints((long) (createReqVO.getConsumptionPoints() * Double.parseDouble(orderPercentageDO.getConsumptionMagnification()))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            createReqVO.setPracticalConsumptionPoints(createReqVO.getConsumptionPoints()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 插入 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -104,16 +108,21 @@ public class ConsumptionTopUpLogServiceImpl implements ConsumptionTopUpLogServic 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param orderPercentageDO 设定额度 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private void quotaVerify(Long userId, Long consumptionPoints, OrderPercentageDO orderPercentageDO) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 充值额度校验 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        Long quota = Long.parseLong(orderPercentageDO.getFollowUpConsumption());      // 后续充值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (consumptionTopUpLogMapper.selectList(ConsumptionTopUpLogDO::getUserId, userId).isEmpty()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 首次充值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            quota = Long.parseLong(orderPercentageDO.getFirstTopUpConsumption()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (consumptionPoints < quota) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ErrorCode ERROR = new ErrorCode(1_002_030_035, "充值的额度不能小于规定额度"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            throw exception(ERROR); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 金额不小于1就行 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (consumptionPoints < 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw exception(new ErrorCode(1_002_030_035, "充值额度不能小于1")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        // 充值额度校验 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        Long quota = Long.parseLong(orderPercentageDO.getFollowUpConsumption());      // 后续充值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        if (consumptionTopUpLogMapper.selectList(ConsumptionTopUpLogDO::getUserId, userId).isEmpty()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//            // 首次充值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//            quota = Long.parseLong(orderPercentageDO.getFirstTopUpConsumption()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        if (consumptionPoints < quota) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//            ErrorCode ERROR = new ErrorCode(1_002_030_035, "充值的额度不能小于规定额度"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//            throw exception(ERROR); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -163,6 +172,7 @@ public class ConsumptionTopUpLogServiceImpl implements ConsumptionTopUpLogServic 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             build.setMinimumConsumptionPoints(Long.valueOf(orderPercentageDO.getFollowUpConsumption())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         build.setConsumptionMagnification(orderPercentageDO.getConsumptionMagnification()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        build.setTriggerMagnificationPoints(orderPercentageDO.getTriggerMagnificationPoints()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return build; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |