admin
2024-08-04 bc56870059cca013649077af0e53891cba8dbfd1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package com.taoke.autopay;
 
import com.taoke.autopay.dao.WxUserOrderCountMapper;
import com.taoke.autopay.entity.OrderCountTypeEnum;
import com.taoke.autopay.exception.WxOrderCountException;
import com.taoke.autopay.service.UserSettingService;
import com.taoke.autopay.service.WxUserOrderCountService;
import com.taoke.autopay.service.WxUserService;
import com.taoke.autopay.utils.Constant;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
 
import javax.annotation.Resource;
import java.math.BigDecimal;
 
/**
 * @author hxh
 * @title: WxUserTests
 * @description: TODO
 * @date 2024/6/29 13:10
 */
@SpringBootTest
public class WxUserTests {
 
    @Resource
    private WxUserService wxUserService;
 
    @Resource
    private UserSettingService userSettingService;
 
    @Test
    public void addWxUser() {
//        wxUserService.login("1231231231231234");
    }
 
    @Test
    public void getPercount() {
        int[] tc = new int[]{1000, 500, 400, 300, 200, 100};
        for (int t : tc) {
            System.out.println(t + "=>" + userSettingService.getLimitCountByTotalCount(t));
        }
    }
 
    @Resource
    private WxUserOrderCountService wxUserOrderCountService;
 
    @Resource
    private WxUserOrderCountMapper wxUserOrderCountMapper;
 
    @Test
    public void testAdd() throws WxOrderCountException {
        long uid = 2L;
        String day="2024-08-01";
 
        wxUserOrderCountService.addOrderCount(uid, OrderCountTypeEnum.SUBMIT_TOKEN_COUNT, day, 1,100);
    }
 
    @Test
    public void test1() throws WxOrderCountException {
        WxUserOrderCountMapper.DaoQuery daoQuery=new WxUserOrderCountMapper.DaoQuery();
        daoQuery.uid = 45678942L;
      System.out.println(  wxUserOrderCountMapper.sumOrderCount(daoQuery));
    }
 
 
}