Browse Source

Merge branch 'dev' of trick9191/patient-co-management into dev

trick9191 7 years ago
parent
commit
b0720b7051

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/interceptors/EncodingFilter.java

@ -38,6 +38,7 @@ public class EncodingFilter implements Filter {
            for (int i = 0; i < values.length; i++) {
                String value = values[i];
                newRequest.removeAttribute(key);
                System.out.println("key:"+key+"value:"+value+" reqURL:"+request.getRequestURI());
//                解决%、+后中文以英文编码传入URLDecoder异常
                value = CodeFomat.dateToChinese(value);
                newRequest.addParameter(key, URLDecoder.decode((value),"utf-8"));

+ 4 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/RSAUtils.java

@ -376,4 +376,8 @@ public class RSAUtils {
            e.printStackTrace();
        }
    }
    public void setBaseService(BaseService baseService) {
        this.baseService = baseService;
    }
}

+ 6 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/LoginController.java

@ -69,6 +69,8 @@ public class LoginController extends BaseController {
    private RoleService roleService;
    @Autowired
    private LoginLogService loginLogService;
    @Autowired
    private RSAUtils rsaUtils;
    /**
     * 公钥生成并返回接口
@ -79,8 +81,10 @@ public class LoginController extends BaseController {
    @ResponseBody
    public String publicKey() {
        try {
            String modulus = RSAUtils.getInstance(smsService).getModulus();
            String exponent = RSAUtils.getInstance(smsService).getExponent();
            //String modulus = RSAUtils.getInstance(smsService).getModulus();
            rsaUtils.setBaseService(smsService);
            String modulus = rsaUtils.getModulus();
            String exponent = rsaUtils.getExponent();
            if (StringUtils.isEmpty(modulus) || StringUtils.isEmpty(exponent)) {
                return error(-1, "公钥获取失败!");
            } else {

+ 4 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/WechatController.java

@ -70,6 +70,8 @@ public class WechatController extends WeixinBaseController {
    private PushMsgTask pushMsgTask;
    @Autowired
    private WeiXinTagUtil weiXinTagUtil;
    @Autowired
    private RSAUtils rsaUtils;
    /**
@ -360,7 +362,8 @@ public class WechatController extends WeixinBaseController {
                }
                loginLog.setUserCode(p.getCode());
                //解密
                password = RSAUtils.getInstance(patientService).decryptString(password);
                rsaUtils.setBaseService(patientService);
                password = rsaUtils.decryptString(password);
                password = StringUtils.reverse(password);
                //生成MD5
                String loginPassword = MD5.GetMD5Code(password + p.getSalt());