| | |
| | | String callback = request.getParameter("callback"); |
| | | |
| | | String sign = request.getParameter("sign"); |
| | | Map<String, String> parameterMap = request.getParameterMap(); |
| | | Map<String, String[]> parameterMap = request.getParameterMap(); |
| | | // 参数-、sign 均不能为空 |
| | | if (parameterMap == null || StringUtil.isNullOrEmpty(sign)) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("签名错误")); |
| | | return null; |
| | | } |
| | | |
| | | boolean isRight = signIsRight(sign, parameterMap, acceptData.getSystem()); |
| | | boolean isRight = signIsRight(sign, parameterMap, acceptData != null ? acceptData.getSystem() : null); |
| | | |
| | | // 签名是否正确 |
| | | if (isRight) { |
| | | |
| | | if (acceptData != null) { |
| | | acceptData.setSystem(SystemInfoUtil.getSystem(acceptData)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | private boolean signIsRight(String sign, Map<String, String> map, SystemEnum system) { |
| | | private boolean signIsRight(String sign, Map<String, String[]> map, SystemEnum system) { |
| | | int i = 0; |
| | | |
| | | List<String> list = new ArrayList<>(); |
| | |
| | | } |
| | | |
| | | String md5 = StringUtil.Md5(sb.toString() + KEY); |
| | | if (system != null && system == SystemEnum.yhqjx) { |
| | | if (system != null && (system == SystemEnum.yhqjx||system == SystemEnum.hsb)) { |
| | | md5 = StringUtil.Md5(sb.toString() + KEY_TEJIA); |
| | | } |
| | | |