Explorar el Código

fix bug

release_toaliyun_real
xiaohanzi hace 4 años
padre
commit
2216c522bf
Se han modificado 2 ficheros con 142 adiciones y 1 borrados
  1. +3
    -1
      mallinkCallback/src/main/java/com/iformall/controller/callback/AliPayController.java
  2. +139
    -0
      mallinkCallback/src/main/java/com/iformall/utils/AlipayMsgPage.java

+ 3
- 1
mallinkCallback/src/main/java/com/iformall/controller/callback/AliPayController.java Ver fichero

@@ -9,6 +9,7 @@ import com.iformall.service.*;
import com.iformall.service.pay.alipay.AliPayUtil;
import com.iformall.service.pay.alipay.api.enums.EnumMemberCardConfig;
import com.iformall.service.pay.alipay.api.result.UserAuthData;
import com.iformall.utils.AlipayMsgPage;

import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@@ -58,8 +59,9 @@ public class AliPayController extends BaseController {
private void writeResponse(HttpServletResponse response,String msg) {
PrintWriter out;
try {
response.setContentType("text/html");
out = response.getWriter();
out.print(msg);
out.print(AlipayMsgPage.getPageContent(msg));
out.close();
} catch (IOException e) {
logger.error(" alipayCallback writeResponse error.",e);


+ 139
- 0
mallinkCallback/src/main/java/com/iformall/utils/AlipayMsgPage.java Ver fichero

@@ -0,0 +1,139 @@
package com.iformall.utils;

public class AlipayMsgPage {

public final static String page_content = "<!DOCTYPE html>\r\n" +
"<html lang=\"en\">\r\n" +
"\r\n" +
"<head>\r\n" +
" <meta charset=\"UTF-8\">\r\n" +
" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n" +
" <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\r\n" +
"\r\n" +
"</head>\r\n" +
"\r\n" +
"<body>\r\n" +
" <div class=\"tisBox\">%s</div>\r\n" +
"</body>\r\n" +
"\r\n" +
"</html>\r\n" +
"<style>\r\n" +
" @charset \"utf-8\";\r\n" +
" body,\r\n" +
" p,\r\n" +
" h1,\r\n" +
" h2,\r\n" +
" h3,\r\n" +
" h4,\r\n" +
" h5,\r\n" +
" h6,\r\n" +
" dl,\r\n" +
" ol,\r\n" +
" li,\r\n" +
" ul,\r\n" +
" dd,\r\n" +
" input,\r\n" +
" textarea,\r\n" +
" button {\r\n" +
" padding: 0;\r\n" +
" margin: 0;\r\n" +
" }\r\n" +
" \r\n" +
" html {\r\n" +
" font-size: calc(100vw/7.5);\r\n" +
" }\r\n" +
" \r\n" +
" body {\r\n" +
" font-size: .24rem;\r\n" +
" }\r\n" +
" \r\n" +
" img {\r\n" +
" vertical-align: top;\r\n" +
" border: 0;\r\n" +
" }\r\n" +
" \r\n" +
" a {\r\n" +
" color: inherit;\r\n" +
" text-decoration: none;\r\n" +
" }\r\n" +
" \r\n" +
" li {\r\n" +
" list-style: none;\r\n" +
" }\r\n" +
" \r\n" +
" body {\r\n" +
" font-family: \"微软雅黑\", \"宋体\", Arial;\r\n" +
" font-size: 12px;\r\n" +
" color: #666;\r\n" +
" }\r\n" +
" \r\n" +
" input {\r\n" +
" color: inherit;\r\n" +
" font-size: inherit;\r\n" +
" font-family: inherit;\r\n" +
" }\r\n" +
" \r\n" +
" textarea {\r\n" +
" resize: none;\r\n" +
" }\r\n" +
" \r\n" +
" input:focus,\r\n" +
" button:focus,\r\n" +
" textarea:focus,\r\n" +
" select:focus {\r\n" +
" outline: none;\r\n" +
" }\r\n" +
" /*input,button,textarea,select{\r\n" +
" outline: none;\r\n" +
"}*/\r\n" +
" \r\n" +
" input[type=\"button\"],\r\n" +
" input[type=\"reset\"],\r\n" +
" input[type=\"submit\"] {\r\n" +
" cursor: pointer;\r\n" +
" }\r\n" +
" \r\n" +
" a:hover {\r\n" +
" color: #53cac3 !important;\r\n" +
" }\r\n" +
" \r\n" +
" .sl {\r\n" +
" white-space: nowrap;\r\n" +
" overflow: hidden;\r\n" +
" text-overflow: ellipsis;\r\n" +
" }\r\n" +
" \r\n" +
" .w {\r\n" +
" width: 1170px;\r\n" +
" margin-left: auto;\r\n" +
" margin-right: auto;\r\n" +
" }\r\n" +
" \r\n" +
" .cl:after {\r\n" +
" content: \"\";\r\n" +
" display: block;\r\n" +
" clear: both;\r\n" +
" height: 0;\r\n" +
" overflow: hidden;\r\n" +
" visibility: hidden;\r\n" +
" }\r\n" +
" \r\n" +
" .cl {\r\n" +
" zoom: 1;\r\n" +
" }\r\n" +
" \r\n" +
" .tisBox {\r\n" +
" position: fixed;\r\n" +
" top: 30%;\r\n" +
" left: 40%;\r\n" +
" padding: 0.2rem;\r\n" +
" border-radius: 0.12rem;\r\n" +
" background-color: #409eff;\r\n" +
" color: #fff;\r\n" +
" }\r\n" +
"</style>";
public static String getPageContent(String msg) {
return String.format(page_content, msg);
}
}

Cargando…
Cancelar
Guardar