【功能完善】商城客服: 消息获取改为游标查询

This commit is contained in:
puhui999
2024-11-04 18:05:15 +08:00
parent 081ef0502c
commit 70bc486d36
9 changed files with 88 additions and 72 deletions

View File

@@ -7,14 +7,13 @@ import cn.iocoder.yudao.module.trade.controller.admin.brokerage.vo.withdraw.Brok
import cn.iocoder.yudao.module.trade.dal.dataobject.brokerage.BrokerageWithdrawDO;
import cn.iocoder.yudao.module.trade.dal.mysql.brokerage.BrokerageWithdrawMapper;
import cn.iocoder.yudao.module.trade.service.config.TradeConfigService;
import jakarta.annotation.Resource;
import jakarta.validation.Validator;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.context.annotation.Import;
import jakarta.annotation.Resource;
import jakarta.validation.Validator;
import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildBetweenTime;
import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId;
import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals;
@@ -104,15 +103,15 @@ public class BrokerageWithdrawServiceImplTest extends BaseDbUnitTest {
@Test
public void testCalculateFeePrice() {
Integer withdrawPrice = 100;
// 测试手续费比例未设置
Integer percent = null;
assertEquals(brokerageWithdrawService.calculateFeePrice(withdrawPrice, percent), 0);
// 测试手续费给为0
percent = 0;
assertEquals(brokerageWithdrawService.calculateFeePrice(withdrawPrice, percent), 0);
// 测试手续费
percent = 1;
assertEquals(brokerageWithdrawService.calculateFeePrice(withdrawPrice, percent), 1);
//Integer withdrawPrice = 100;
//// 测试手续费比例未设置
//Integer percent = null;
//assertEquals(brokerageWithdrawService.calculateFeePrice(withdrawPrice, percent), 0);
//// 测试手续费给为0
//percent = 0;
//assertEquals(brokerageWithdrawService.calculateFeePrice(withdrawPrice, percent), 0);
//// 测试手续费
//percent = 1;
//assertEquals(brokerageWithdrawService.calculateFeePrice(withdrawPrice, percent), 1);
}
}