admin
4 天以前 cc5cf127da76d03ce7086da4d70f34b20e9803e0
src/test/java/com/taoke/autopay/WxUserTests.java
@@ -39,10 +39,10 @@
    public void getPercount() {
        int[] tc = new int[]{1000, 500, 400, 300, 200, 100};
        for (int t : tc) {
            System.out.println(t + "=>" + userSettingService.getLimitCountByTotalCount(t, OrderChannelEnum.bps));
            System.out.println("============================");
            System.out.println(t + "=>" + userSettingService.getLimitCountByTotalCount(Constant.ORDER_TYPE_KS, t, OrderChannelEnum.bps));
        }
    }
    @Resource
    private WxUserOrderCountService wxUserOrderCountService;
@@ -51,13 +51,12 @@
    @Test
    public void testAdd() throws WxOrderCountException {
        long uid = 2L;
        String day="20240926";
        OrderChannelEnum orderChannel= OrderChannelEnum.bps;
        long todayCount = wxUserOrderCountService.sum(uid, null,orderChannel, TimeUtil.getGernalTime(System.currentTimeMillis(), Constant.DB_DAY_FORMAT));
        long totalCount =  wxUserOrderCountService.sum(uid, null,orderChannel,null);
        int maxPayCount =  userSettingService.getLimitCountByTotalCount(totalCount, orderChannel);
        int maxPayCount =  userSettingService.getLimitCountByTotalCount(2, totalCount, orderChannel);
        if(todayCount>=maxPayCount){
            ;
        }
@@ -71,7 +70,7 @@
    public void test1() throws WxOrderCountException {
        WxUserOrderCountMapper.DaoQuery daoQuery=new WxUserOrderCountMapper.DaoQuery();
        daoQuery.uid = 45678942L;
      System.out.println(  wxUserOrderCountMapper.sumOrderCount(daoQuery));
        System.out.println(wxUserOrderCountMapper.sumOrderCount(daoQuery));
    }