| | |
| | | package com.yuanchu.limslaboratory; |
| | | |
| | | import com.yuanchu.limslaboratory.pojo.vo.PlanVo; |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import cn.hutool.crypto.symmetric.AES; |
| | | import com.yuanchu.limslaboratory.mapper.OrganizationalMapper; |
| | | import com.yuanchu.limslaboratory.service.PlanService; |
| | | import com.yuanchu.limslaboratory.service.UserService; |
| | | import com.yuanchu.limslaboratory.utils.MyUtil; |
| | | import org.apache.poi.hwpf.HWPFDocument; |
| | | import org.apache.poi.hwpf.extractor.WordExtractor; |
| | | import org.apache.poi.xwpf.extractor.XWPFWordExtractor; |
| | | import org.apache.poi.xwpf.usermodel.XWPFDocument; |
| | | import org.apache.poi.xwpf.usermodel.XWPFParagraph; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.FileInputStream; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.IOException; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | class SysApplicationTests { |
| | | |
| | | @Resource |
| | | private PlanService planService; |
| | | private OrganizationalMapper organizationalMapper; |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @Test |
| | | void contextLoads() { |
| | | String newString = String.format("%06d", 77); |
| | | System.out.println("newString === " + newString); |
| | | |
| | | List<Map<String, Object>> test = organizationalMapper.OrganizationalTree(0); |
| | | MyUtil.PrintLog(test.toString()); |
| | | } |
| | | |
| | | @Test |
| | | void TT() { |
| | | Map<String, Object> userInfo = userService.getUserInfo("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYzhiMWFhYWNlYzM2NmMyNGU1ZDE4YzdlZWE5ZTU1MWIiLCJleHAiOjE2OTE3Mzk4MjV9.IZyU5jhTzpxedmmL25dhpkzQS7hth7gt-bzCx9fZyOk"); |
| | | System.out.println(userInfo.get("name")); |
| | | } |
| | | |
| | | @Test |
| | | void TT2(){ |
| | | String adminMD5 = SecureUtil.md5(SecureUtil.md5("admin")); |
| | | System.out.println(adminMD5); |
| | | } |
| | | |
| | | @Test |
| | |
| | | } |
| | | } |
| | | } |
| | | @Test |
| | | void testRedis(){ |
| | | boolean b=true; |
| | | if (b) { |
| | | this.contextLoads(); |
| | | } else { |
| | | this.TT(); |
| | | } |
| | | System.out.println(2024%100); |
| | | new Thread(()->{ |
| | | String timeSixNumberCode = MyUtil.getTimeSixNumberCode("CS", "number"); |
| | | System.out.println(timeSixNumberCode); |
| | | }).start(); |
| | | //new Thread(()->{ |
| | | // String timeSixNumberCode = MyUtil.getTimeSixNumberCode("CS", "number"); |
| | | // System.out.println(timeSixNumberCode); |
| | | //}).start(); |
| | | //new Thread(()->{ |
| | | // String timeSixNumberCode = MyUtil.getTimeSixNumberCode("CS", "number"); |
| | | // System.out.println(timeSixNumberCode); |
| | | //}).start(); |
| | | } |
| | | } |
| | | |
| | | |