| | |
| | | package com.zy.asrs.utils; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.core.common.Cools; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.util.DigestUtils; |
| | | |
| | |
| | | public static Map<String,Object> getRequestParamMap(){ |
| | | Date date = new Date(); |
| | | String ts = date.getTime() + ""; |
| | | String key = DigestUtils.md5DigestAsHex((appkey + ts).getBytes(StandardCharsets.UTF_8)); |
| | | String key = DigestUtils.md5DigestAsHex(("SX3WMS20230725" + ts).getBytes(StandardCharsets.UTF_8)); |
| | | Map<String,Object> requestParamMap = new HashMap<>(); |
| | | requestParamMap.put("ts",ts); |
| | | requestParamMap.put("key",key); |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println(appkey); |
| | | System.out.println(MesSyncUtil.getRequestParamMap()); |
| | | |
| | | String jsonString = "{\"msg\":\"操作成功\",\"code\":200,\"data\":\"[]\"}"; |
| | | JSONObject jsonObject = JSONObject.parseObject(jsonString); |
| | | String data = jsonObject.getString("data"); |
| | | |
| | | System.out.println(data); |
| | | if(!Cools.isEmpty(data)){ |
| | | System.out.println(data); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |