springboot上传图片并压缩
//压缩图片400KB以下 int kb = 400 * 1024; long fileSize = file.getSize(); if (fileSize > 100 * 1024) { int smallSize = (int) (fileSize % kb == 0 ? fileSize / kb…
//压缩图片400KB以下 int kb = 400 * 1024; long fileSize = file.getSize(); if (fileSize > 100 * 1024) { int smallSize = (int) (fileSize % kb == 0 ? fileSize / kb…
package org.jeecg.modules.staff.utils; /** * @className: PicUtils * @description: TODO 类描述 * @author: HeLei * @date: 2023/07/10 15:38 * @Company: Copyright© [2023] by [HeLei] **/ import lom…
测试的机器为4核4线程,16G内存 public static void main(String[] args) { long time = System.currentTimeMillis(); List<String> list = new ArrayList(); for (int i = 0; i &l…
1.修改系统用户查询接口,SysUserController-108行添加 LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); String account =sysUser.getUsername(); //登录用户不是超管,不显示超管…
public static void main(String[] args) { int start=10000; int end=99999; int number = new Random().nextInt(end - start + 1) + start; System.out.println(number); }
package org.jeecg.modules.cdz.utils; import java.math.BigDecimal; import java.math.RoundingMode; import java.text.DecimalFormat; import java.util.Random; /** * 金额工具类,主要是金额的格式化,金额的…
/** * 解密wx.getuserinfo返回的数据 * @param encryptedData * @param sessionKey * @param iv * @return */ public static JSONObject getUserInfo(String encryptedData, Str…