| | |
| | | return null; |
| | | } |
| | | |
| | | log.info("接口地址:"+addServiceOrederAPI); |
| | | // log.info("接口地址:"+addServiceOrederAPI); |
| | | |
| | | //计算时间戳和签名 |
| | | long unixTime = System.currentTimeMillis() / 1000; // 获取当前时间戳(秒) Long.valueOf("1746444543") ;// |
| | |
| | | try { |
| | | Object value = field.get(model); |
| | | if (value != null) { |
| | | params.put(field.getName(),URLEncoder.encode(value.toString(), StandardCharsets.UTF_8.toString())); |
| | | |
| | | // 将字段名首字母大写 |
| | | String fieldName = field.getName(); |
| | | |
| | | String capitalizedFieldName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); |
| | | if(fieldName.contains("method")) |
| | | { |
| | | capitalizedFieldName = fieldName; |
| | | } |
| | | |
| | | params.put(capitalizedFieldName,URLEncoder.encode(value.toString(), StandardCharsets.UTF_8.toString())); |
| | | } |
| | | } catch (IllegalAccessException e) { |
| | | // log.error("获取对象属性值时出错", e); |
| | |
| | | } |
| | | // 将字段名首字母大写 |
| | | String fieldName = field.getName(); |
| | | |
| | | String capitalizedFieldName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); |
| | | |
| | | if(fieldName.contains("method")) |
| | | { |
| | | capitalizedFieldName = fieldName; |
| | | } |
| | | |
| | | formData.append(capitalizedFieldName) |
| | | .append("=") |
| | |
| | | try { |
| | | Object value = field.get(model); |
| | | if (value != null) { |
| | | params.put(field.getName(),URLEncoder.encode(value.toString(), StandardCharsets.UTF_8.toString())); |
| | | // 将字段名首字母大写 |
| | | String fieldName = field.getName(); |
| | | String capitalizedFieldName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); |
| | | if(fieldName.contains("method")) |
| | | { |
| | | capitalizedFieldName = fieldName; |
| | | } |
| | | params.put(capitalizedFieldName,URLEncoder.encode(value.toString(), StandardCharsets.UTF_8.toString())); |
| | | } |
| | | } catch (IllegalAccessException e) { |
| | | // log.error("获取对象属性值时出错", e); |
| | |
| | | // 将字段名首字母大写 |
| | | String fieldName = field.getName(); |
| | | String capitalizedFieldName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); |
| | | |
| | | if(fieldName.contains("method")) |
| | | { |
| | | capitalizedFieldName = fieldName; |
| | | } |
| | | formData.append(capitalizedFieldName) |
| | | .append("=") |
| | | .append(URLEncoder.encode(value.toString(), StandardCharsets.UTF_8.toString())); |