Sfoglia il codice sorgente

/、.optimize

release_toaliyun_real
xhxu 4 anni fa
parent
commit
9f68d599fe
2 ha cambiato i file con 21 aggiunte e 12 eliminazioni
  1. +16
    -4
      mallinkBApi/src/main/java/com/iformall/controller/WxInfoController.java
  2. +5
    -8
      mallinkCallback/src/main/java/com/iformall/controller/callback/TtPayController.java

+ 16
- 4
mallinkBApi/src/main/java/com/iformall/controller/WxInfoController.java Vedi File

@@ -24,10 +24,7 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.context.request.ServletRequestAttributes;


@@ -521,4 +518,19 @@ public class WxInfoController extends BaseController {
} }
return new ResultData(); return new ResultData();
} }

@ApiOperation("查询c小程序首页风格")
@GetMapping("/getAppMouldType")
public ResultData getAppMouldType(Integer plat) {
logger.debug("[" + getIpAddr() + "] WxAppinfoController::getAppMouldType");
// if(plat == null){
// plat = EnumAppPlat.WX.getCode();
// }
// EnumAppPlat byCode = EnumAppPlat.getByCode(plat);
// if(byCode == null){
// return new ResultData(ErrorCode.SYS_PARAMETER_ERROR);
// }
WxAppinfo cAppInfo = wxAppinfoService.getCAppInfoFromRedis(getTenantInfo().getTenantId(), null);
return new ResultData(cAppInfo);
}
} }

+ 5
- 8
mallinkCallback/src/main/java/com/iformall/controller/callback/TtPayController.java Vedi File

@@ -23,10 +23,7 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;


import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.HashMap; import java.util.HashMap;
@@ -73,15 +70,15 @@ public class TtPayController extends BaseController {
*/ */
@PostMapping(value = "/orderPay") @PostMapping(value = "/orderPay")
@ResponseBody @ResponseBody
public Map<String,Object> createOrder( HttpServletRequest request){
public Map<String,Object> createOrder( @RequestBody Map<String, Object> parameterMap){
logger.debug("[" + getIpAddr() + "] TtOrderCallbackController::createOrder"); logger.debug("[" + getIpAddr() + "] TtOrderCallbackController::createOrder");
Map<String,Object> resultMap = new HashMap<>(); Map<String,Object> resultMap = new HashMap<>();


String body = ((BodyReaderHttpServletRequestWrapper) request).getBody();
logger.info("抖音支付通知-----body{}"+body);
// String body = ((BodyReaderHttpServletRequestWrapper) request).getBody();
logger.info("抖音支付通知-----body{}"+parameterMap);
try { try {


Map<String, Object> parameterMap = JSONObject.parseObject(body, Map.class);
// Map<String, Object> parameterMap = JSONObject.parseObject(body, Map.class);


String timestamp = (String) parameterMap.get("timestamp"); String timestamp = (String) parameterMap.get("timestamp");
String nonce = (String) parameterMap.get("nonce"); String nonce = (String) parameterMap.get("nonce");


Caricamento…
Annulla
Salva