Просмотр исходного кода

/、.optimize

release_toaliyun_real
xhxu 4 лет назад
Родитель
Сommit
9f68d599fe
2 измененных файлов: 21 добавлений и 12 удалений
  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 Просмотреть файл

@@ -24,10 +24,7 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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.ServletRequestAttributes;

@@ -521,4 +518,19 @@ public class WxInfoController extends BaseController {
}
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 Просмотреть файл

@@ -23,10 +23,7 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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 java.util.HashMap;
@@ -73,15 +70,15 @@ public class TtPayController extends BaseController {
*/
@PostMapping(value = "/orderPay")
@ResponseBody
public Map<String,Object> createOrder( HttpServletRequest request){
public Map<String,Object> createOrder( @RequestBody Map<String, Object> parameterMap){
logger.debug("[" + getIpAddr() + "] TtOrderCallbackController::createOrder");
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 {

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 nonce = (String) parameterMap.get("nonce");


Загрузка…
Отмена
Сохранить