| | |
| | | if (money == null) {
|
| | | // (维权金额/结算金额) * 返利金额
|
| | | BigDecimal wqmoney = weiQuanOrder.getMoney();
|
| | | money = wqmoney.divide(hongBaoV2.getSettlement(), 2, BigDecimal.ROUND_DOWN)
|
| | | .multiply(hongBaoV2.getMoney()).setScale(2, BigDecimal.ROUND_DOWN);
|
| | | money = wqmoney.multiply(hongBaoV2.getMoney())
|
| | | .divide(hongBaoV2.getSettlement(), 2, BigDecimal.ROUND_DOWN);
|
| | |
|
| | | // 大于返利金额 则等于返利金额
|
| | | if (money.compareTo(hongBaoV2.getMoney()) > 0)
|
New file |
| | |
| | | package org.fanli.config;
|
| | |
|
| | | import org.junit.Test;
|
| | |
|
| | | import com.yeshi.fanli.service.inter.order.UserOrderWeiQuanRecordService;
|
| | | import com.yeshi.fanli.util.BeanUtil;
|
| | |
|
| | | public class Test_UserOrderWeiQuanRecordService {
|
| | | |
| | | @Test
|
| | | public void test3() {
|
| | | UserOrderWeiQuanRecordService service = BeanUtil.getBean(UserOrderWeiQuanRecordService.class);
|
| | | service.syncPrevious();
|
| | | }
|
| | | |
| | |
|
| | | }
|