From 5a8f3e426736bff2f8678a47d05a3da24af6f470 Mon Sep 17 00:00:00 2001
From: zjh <1084500556@qq.com>
Date: 星期二, 21 五月 2024 18:17:43 +0800
Subject: [PATCH] zjh 2024/05/21-1

---
 ltkj-admin/src/test/java/zjhTest.java |  102 ++++++++++++++++++++++++--------------------------
 1 files changed, 49 insertions(+), 53 deletions(-)

diff --git a/ltkj-admin/src/test/java/zjhTest.java b/ltkj-admin/src/test/java/zjhTest.java
index 63d2d2d..7662430 100644
--- a/ltkj-admin/src/test/java/zjhTest.java
+++ b/ltkj-admin/src/test/java/zjhTest.java
@@ -1,19 +1,35 @@
 
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateUnit;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.io.FileUtil;
+import cn.hutool.extra.qrcode.QrCodeUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ltkj.LtkjApplication;
 import com.ltkj.common.core.redis.RedisCache;
+import com.ltkj.common.utils.SecurityUtils;
+import com.ltkj.hosp.domain.DictHosp;
+import com.ltkj.hosp.domain.TjProject;
 import com.ltkj.hosp.service.*;
 import lombok.extern.slf4j.Slf4j;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.data.redis.core.Cursor;
 import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.core.ScanOptions;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.web.bind.annotation.PostMapping;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
 
 
 /**
@@ -25,67 +41,47 @@
 @Slf4j
 @EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})
 public class zjhTest {
-
-    @Autowired
-    private ITjGroupingProService groupingProService;
+//
+//    @Autowired
+//    private ITjGroupingProService groupingProService;
     @Autowired
     private ITjProjectService projectService;
-
-    @Resource
-    private ITjOrderService tjOrderService;
-    @Resource
-    private ITjOrderDetailService tjOrderDetailService;
-    @Resource
-    private ITjOrderRemarkService remarkService;
-
+//
+//    @Resource
+//    private ITjOrderService tjOrderService;
+//    @Resource
+//    private ITjOrderDetailService tjOrderDetailService;
+//    @Resource
+//    private ITjOrderRemarkService remarkService;
+//
     @Resource
     private RedisCache redisCache;
-
+//
     @Autowired
-    public RedisTemplate<String,String> redisTemplate;
-    @Resource
-    private StringRedisTemplate stringRedisTemplate;
-
+    public RedisTemplate<Object,Object> redisTemplate;
+//    @Resource
+//    private StringRedisTemplate stringRedisTemplate;
+@Resource
+private IDictHospService dictHospService;
+    @Value("${token.secret_key}")
+    private String secret;
     @Test
     public void test() {
-//        util.setDataBase(1);
-//        stringRedisTemplate.opsForValue().set("1","1");
-//        ExecutorService pool = Executors.newFixedThreadPool(5);
+
+// 鐢熸垚鎸囧畾url瀵瑰簲鐨勪簩缁寸爜鍒版枃浠讹紝瀹藉拰楂橀兘鏄�300鍍忕礌
+         QrCodeUtil.generate("https://ltpeis.xaltjdkj.cn:5516/1000110001240327094056%E7%8E%89%E5%BF%A0_%E4%BD%93%E6%A3%80%E6%8A%A5%E5%91%8A.pdf", 300, 300, FileUtil.file("D:\\Users\\w\\Desktop\\qrcode.jpg"));
+
+
+    }
+
+
+//    public static void main(String[] args) {
 //
-//        for (int i = 1; i < 6; i++) {
-//            int finalI = i;
-//            pool.execute(new Runnable() {
-//                @Override
-//                public void run() {
-//                    try {
-//                        redisCache.setDataBase(finalI);
-//                        redisCache.setCacheObject("娴嬭瘯",finalI+"111111111111111111");
-//                    } catch (Exception e) {
-//                        e.printStackTrace();
-//                    }
-//                    pool.shutdown();
-//                }
-//            });
-//        }
-        log.info("鍢垮樋!!!");
-    }
-
-
-    public static void main(String[] args) {
-        // lat 39.97646
-        //log 116.3039
-//        String add = getAdd("116.3039", "39.97646");
-//        JSONObject jsonObject = JSONObject.parseObject(add);
-//        JSONArray jsonArray = JSONArray.parseArray(jsonObject.getString("addrList"));
-//        JSONObject j_2 = JSONObject.parseObject(String.valueOf(jsonArray.get(0)));
-//        String allAdd = j_2.getString("admName");
-//        String arr[] = allAdd.split(",");
-//        System.out.println("鐪侊細"+arr[0]+"\n甯傦細"+arr[1]+"\n鍖猴細"+arr[2]);
-
-//        String a ="浣犲ソ鍝堝搱鍝堝搱鍝堝搱";
-//        String s = a.toUpperCase(Locale.ROOT);
-//        System.out.println(s);
-    }
+//        String a ="1,2,3";
+//        boolean contains = a.contains("1");
+//        System.out.println(contains);
+//
+//    }
 //
 //    public static String getAdd(String log, String lat ){
 //        //lat 灏�  log  澶�

--
Gitblit v1.8.0