123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import cn.hutool.json.JSONUtil;
- import com.qtzl.alterSales.UserApplication;
-
- import com.qtzl.alterSales.dao.excelVO.head.serviceFee50.ExcelHead50ServiceFeeVO;
- import com.qtzl.alterSales.dao.repo.jpa.second.AflServerFeeRefundRepo;
- import com.qtzl.alterSales.dao.repo.jpa.third.EtcApplyOrderRepo;
- import com.qtzl.alterSales.manager.vo.WechatPayApplyLogGroupByTimeCountVO;
- import org.junit.Assert;
- import org.junit.Test;
- import org.junit.runner.RunWith;
- import org.springframework.boot.test.context.SpringBootTest;
- import org.springframework.test.context.junit4.SpringRunner;
-
- import javax.annotation.Resource;
- import java.util.List;
-
- @RunWith(SpringRunner.class)
- @SpringBootTest(classes = UserApplication.class)
- public class ReportTest {
-
- @Resource
- private EtcApplyOrderRepo etcApplyOrderRepo;
- @Resource
- private AflServerFeeRefundRepo aflServerFeeRefundRepo;
-
- @Test
- public void findByOrderNoInTest() {
- List<String> list = List.of("20240612124808520101889303545925");
- List<ExcelHead50ServiceFeeVO> excelHead50ServiceFeeVOS = etcApplyOrderRepo.findByOrderNoIn(list);
- Assert.assertNotNull(excelHead50ServiceFeeVOS);
- }
-
- @Test
- public void countByRefundDateLikeTest() {
- Integer i = aflServerFeeRefundRepo.countByRefundDateLike("2024-10");
- Assert.assertNotNull(i);
- }
-
- /**
- * 根据时间统计退款次数测试
- * 数据库存储的是 2024-10-23 格式,根据时间模糊查询
- */
- @Test
- public void aflServerFeeRefundRepo() {
- WechatPayApplyLogGroupByTimeCountVO wechatPayApplyLogGroupByTimeCountVO = aflServerFeeRefundRepo.countByYearMonth("2024-10");
- System.out.println("wechatPayApplyLogGroupByTimeCountVO:" + JSONUtil.toJsonStr(wechatPayApplyLogGroupByTimeCountVO));
- Assert.assertNotNull(wechatPayApplyLogGroupByTimeCountVO);
- }
-
-
- }
|