From 3a1441d8f6422e81a67e01830c1793ab25d943b0 Mon Sep 17 00:00:00 2001
From: wzy <wzy19931122ai@163.com>
Date: Sat, 20 Nov 2021 21:07:38 +0800
Subject: [PATCH] fix
---
zq-erp/src/test/java/com/matrix/JyyTests.java | 121 ++++++++++++++++++++++++++++-----------
1 files changed, 86 insertions(+), 35 deletions(-)
diff --git a/zq-erp/src/test/java/com/matrix/JyyTests.java b/zq-erp/src/test/java/com/matrix/JyyTests.java
index f199835..3f4c132 100644
--- a/zq-erp/src/test/java/com/matrix/JyyTests.java
+++ b/zq-erp/src/test/java/com/matrix/JyyTests.java
@@ -1,63 +1,114 @@
package com.matrix;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.matrix.system.hive.bean.MoneyCardUse;
+import com.matrix.system.hive.dao.MoneyCardUseDao;
+import com.matrix.system.hive.service.imp.SysVipInfoServiceImpl;
import com.matrix.system.score.dao.ScoreVipDetailDao;
import com.matrix.system.score.service.ScoreVipDetailService;
import com.matrix.system.shopXcx.dao.ShopOrderV2Dao;
+import com.matrix.system.shopXcx.mqTask.OrderDingDingNoticeTask;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.junit4.SpringRunner;
+
+import java.io.IOException;
+import java.util.List;
/**
* 测试类示例
- *
+ *
* @author jiangyouyao
* @email 512061637@qq.com
* @date 2019年2月25日
*/
@RunWith(SpringRunner.class)
-@SpringBootTest(classes = {ZqErpApplication.class},webEnvironment =SpringBootTest.WebEnvironment.RANDOM_PORT)
+@SpringBootTest(classes = {ZqErpApplication.class}, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class JyyTests {
- @Autowired
- private ShopOrderV2Dao shopOrderV2Dao;
+ @Autowired
+ private ShopOrderV2Dao shopOrderV2Dao;
- @Autowired
- ScoreVipDetailDao scoreVipDetailDao;
+ @Autowired
+ ScoreVipDetailDao scoreVipDetailDao;
- @Autowired
- ScoreVipDetailService scoreVipDetailService;
-
- @Test
- public void scoreVipDetailService() throws InterruptedException {
- scoreVipDetailService.addScore("oJkRK4yelehsY4S7I6Ee1ydWtQMI",null,null,15,1L,1);
- }
-
- /**
- *
- */
- @Test
- public void scoreVipDetailDao() throws InterruptedException {
- System.out.println( scoreVipDetailDao.selectUserTotalScore("oJkRK4yelehsY4S7I6Ee1ydWtQMI",null));
- }
-
- @Test
- public void testSelectReceivedOrderCount() throws InterruptedException {
- System.out.println( shopOrderV2Dao.selectReceivedOrderCount("oJkRK4yelehsY4S7I6Ee1ydWtQMI"));
- }
-
- @Test
- public void testCountOrderAmount() throws InterruptedException {
- System.out.println( shopOrderV2Dao.countOrderAmount("oJkRK4yelehsY4S7I6Ee1ydWtQMI"));
- }
+ @Autowired
+ ScoreVipDetailService scoreVipDetailService;
- @Test
- public void countBuyZdcp() throws InterruptedException {
- System.out.println( shopOrderV2Dao.countBuyZdcp("oJkRK4yelehsY4S7I6Ee1ydWtQMI","1167,1263,1262"));
- }
+ @Autowired
+ SysVipInfoServiceImpl sysVipInfoService;
+
+ @Autowired
+ OrderDingDingNoticeTask orderDingDingNoticeTask;
+
+ @Autowired
+ MoneyCardUseDao moneyCardUseDao;
+
+
+ @Test
+ public void finxMoneyCardUserId() throws IOException {
+ long id=2531;
+ final List<MoneyCardUse> moneyCardUses = moneyCardUseDao.selectList(new LambdaQueryWrapper<MoneyCardUse>().gt(MoneyCardUse::getId, 2531));
+
+ for (MoneyCardUse moneyCardUs : moneyCardUses) {
+ moneyCardUseDao.updateId(moneyCardUs.getId(),++id);
+ }
+
+ System.out.println(moneyCardUses.size());
+ }
+
+
+ @Test
+ @Rollback
+ public void testNoticeTask() throws IOException {
+ // orderDingDingNoticeTask.handle("",new Delivery(null,null,"1295".getBytes()));
+
+
+
+
+ }
+
+
+ @Test
+ public void testRedis() {
+
+ /*List<SysFunction> fnList = new ArrayList<>();
+ fnList.add(new SysFunction());
+
+ Map map = new HashMap();
+ map.put("a", fnList);
+ redisClient.saveMapValue("map", map);
+*/
+
+ }
+
+
+ @Test
+ public void testRedis2() {
+/*
+
+ String map = redisClient.getCachedValue("map");
+ JSONObject json = JSONUtil.parseObj(map);
+ String a = json.get("a").toString();
+
+
+ JSONArray jsonArray = JSONUtil.parseArray(a);
+ for (int i=0;i<jsonArray.size();i++){
+ SysFunction sysFunction = jsonArray.get(i, SysFunction.class);
+ System.out.println(sysFunction.getHasThisFn());
+ }
+*/
+
+
+
+
+ }
+
}
--
Gitblit v1.9.1