Commit 05fde149 by wangling

20190522---wangling---passWord解密

parent ee2db447
......@@ -13,6 +13,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import sun.misc.BASE64Decoder;
import java.io.UnsupportedEncodingException;
import java.util.*;
......@@ -27,6 +28,18 @@ public class GwdqfxtjController {
@RequestMapping(value = "/toGwdq", method = {RequestMethod.GET, RequestMethod.POST})
public ModelAndView getGwdq(String asjfsjssj, String asjbh, String userName, String passWord, String sfzh, String userCode) {
//passWord解密
byte[] b = null;
if (!"".equals(passWord)) {
BASE64Decoder decoder = new BASE64Decoder();
try {
b = decoder.decodeBuffer(passWord);
passWord = new String(b, "utf-8");
} catch (Exception e) {
e.printStackTrace();
}
}
CloseableHttpClient httpclient = gwdqService.getCjxm(userName, passWord, sfzh, userCode);
//response返回的相应实体
UrlEncodedFormEntity reqEntity = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment