| | |
| | | package com.lf.server.helper; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.lf.server.entity.all.HttpStatus; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.all.SettingData; |
| | | import com.lf.server.entity.all.StaticData; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | |
| | | import java.io.PrintWriter; |
| | | import java.sql.Timestamp; |
| | | import java.util.Calendar; |
| | | import java.util.Random; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | |
| | | |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 获取错误JSON |
| | | */ |
| | | public static String getErrJson(HttpStatus status, String msg) { |
| | | return JSON.toJSONString(new ResponseMsg<String>(status, msg)); |
| | | } |
| | | |
| | | /** |
| | | * 获取随机整数 |
| | | */ |
| | | public static int getRandomInt(int min, int max) { |
| | | return new Random().nextInt(max) % (max - min + 1) + min; |
| | | } |
| | | } |