Compare commits
	
		
			2 Commits
		
	
	
		
			bfff613752
			...
			d2cdceec1c
		
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | d2cdceec1c | |
|  | 2543767de6 | 
|  | @ -38,6 +38,7 @@ import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Component; | ||||
| 
 | ||||
| import java.math.BigDecimal; | ||||
| import java.math.RoundingMode; | ||||
| import java.time.temporal.ChronoUnit; | ||||
| import java.util.*; | ||||
| import java.util.stream.Collectors; | ||||
|  | @ -1287,6 +1288,9 @@ public class BonusSettleRangeHandle extends BonusSettleHandle { | |||
|         BigDecimal waresPrice = saOrderItems.getWaresPrice(); | ||||
|         // 商品数量 | ||||
|         BigDecimal waresQuantityBig = new BigDecimal(saOrderItems.getWaresQuantity()); | ||||
|         // 单个商品价格 | ||||
|         BigDecimal waresOnePrice = waresPrice.divide(waresQuantityBig, 6, RoundingMode.FLOOR); | ||||
| 
 | ||||
|         // 前一个会员等级 | ||||
|         int beforeGradeValue = 0; | ||||
|         // 前一个会员等级的平级收益人数 | ||||
|  | @ -1356,7 +1360,7 @@ public class BonusSettleRangeHandle extends BonusSettleHandle { | |||
|                     continue; | ||||
|                 } | ||||
|                 // 平级收益(商品价格 * 千分之五) -- 6位小数,四舍五入 | ||||
|                 sameBonusIncome = waresPrice.multiply(RetailConstants.SAME_RATIO).setScale(6, BigDecimal.ROUND_HALF_UP); | ||||
|                 sameBonusIncome = waresOnePrice.multiply(RetailConstants.SAME_RATIO).setScale(6, BigDecimal.ROUND_HALF_UP).multiply(waresQuantityBig); | ||||
|                 // 平级收益累计 | ||||
|                 beforeSameBonus = beforeSameBonus.add(sameBonusIncome); | ||||
|                 // 平级等级代数等级 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue