| | |
| | | @PostMapping("/userpush") |
| | | public Object userPush(@RequestBody ApiPushDTO apiPushDTO, HttpServletRequest request) { |
| | | System.out.println("请求参数:" + JSON.toJSONString(apiPushDTO)); |
| | | System.out.println("request:" + request.getParameter("url")); |
| | | System.out.println("request rui:" + request.getRequestURI()); |
| | | System.out.println("clientId:" + request.getParameter("clientId")); |
| | | System.out.println("timestamp:" + request.getParameter("timestamp")); |
| | | System.out.println("sign:" + request.getParameter("sign")); |
| | | System.out.println("salt:" + request.getParameter("salt")); |
| | | System.out.println("request rui:" + request.getRequestURL()); |
| | | System.out.println("request.getQueryString():" + request.getQueryString()); |
| | | // String queryStr = request.getQueryString(); |
| | | String syncData = SecurityUtil.decryptAES(apiPushDTO.getSyncData(), MD5Util.getMD5String(appSecret)); |
| | | List<AccountBean> accountBeanList = JSONArray.parseArray(syncData, AccountBean.class); |
| | | |
| | |
| | | } |
| | | |
| | | // public static void main(String[] args) { |
| | | // Map<String,String> attributes = new HashMap<>(); |
| | | // // "staffCode": "15563378977", |
| | | // // "realName": "zhliu", |
| | | // // "email": null, |
| | | // // "phone": "15563378977", |
| | | // // "employeeNum": "zhliu", |
| | | // // "idCard": null, |
| | | // // "employeeStatus": "1", |
| | | // // "userType": "0", |
| | | // // "sort": "1" |
| | | // attributes.put("staffCode","15563378977"); |
| | | // attributes.put("realName","zhliu"); |
| | | // attributes.put("email",null); |
| | | // attributes.put("phone","15563378977"); |
| | | // attributes.put("employeeNum","zhliu"); |
| | | // attributes.put("idCard", null); |
| | | // attributes.put("employeeStatus","1"); |
| | | // attributes.put("userType","0"); |
| | | // attributes.put("sort","1"); |
| | | //// Map<String,String> attributes = new HashMap<>(); |
| | | //// // "staffCode": "15563378977", |
| | | //// // "realName": "zhliu", |
| | | //// // "email": null, |
| | | //// // "phone": "15563378977", |
| | | //// // "employeeNum": "zhliu", |
| | | //// // "idCard": null, |
| | | //// // "employeeStatus": "1", |
| | | //// // "userType": "0", |
| | | //// // "sort": "1" |
| | | //// attributes.put("staffCode","15563378977"); |
| | | //// attributes.put("realName","zhliu"); |
| | | //// attributes.put("email",null); |
| | | //// attributes.put("phone","15563378977"); |
| | | //// attributes.put("employeeNum","zhliu"); |
| | | //// attributes.put("idCard", null); |
| | | //// attributes.put("employeeStatus","1"); |
| | | //// attributes.put("userType","0"); |
| | | //// attributes.put("sort","1"); |
| | | //// String syncData = SecurityUtil.encryptAES(JSON.toJSONString(attributes), MD5Util.getMD5String(appSecret)); |
| | | //// System.out.println("加密后:" + syncData); |
| | | //// String jiemi = SecurityUtil.decryptAES(syncData, MD5Util.getMD5String(appSecret)); |
| | |
| | | //// System.out.printf("解密后:" + jiemi2); |
| | | // |
| | | // |
| | | // System.out.println("sign:" + SignBuilder.create(appId,appSecret).sign()); |
| | | // String sign = SignBuilder.create(appId, MD5Util.getMD5String(appSecret)) |
| | | // .requestPath("/api/blade-user/sync/userpush") |
| | | // .requestMethod("POST") |
| | | // .salt("0.9719235633868601") |
| | | // .timestamp(1691574410682l) |
| | | // .sign(); |
| | | // |
| | | // |
| | | // System.out.println("sign:" + sign); |
| | | // |
| | | // } |
| | | |