|
@@ -16,8 +16,8 @@ import com.qunzhixinxi.hnqz.common.security.annotation.Inner;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
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.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.Map;
|
|
@@ -58,21 +58,19 @@ public class GigThirdApiController {
|
|
|
@Inner(value = false)
|
|
|
@SysLog("自由职家统一请求地址")
|
|
|
@PostMapping("/olading")
|
|
|
- public R<?> oladingRequest(@RequestBody OladingCommonRequest oladingRequest) {
|
|
|
+ public R<?> oladingRequest(@RequestParam(value = "req", required = false) String reqStr, @RequestParam(required = false) String sign) {
|
|
|
|
|
|
- log.info("自由职家请求方法参数:" + JSONUtil.toJsonStr(oladingRequest));
|
|
|
+ log.info("自由职家请求方法参数:req={}, sign={}", reqStr, sign);
|
|
|
|
|
|
// 请求数据
|
|
|
- OladingCommonRequest.Req req = oladingRequest.getReq();
|
|
|
- // 签名数据
|
|
|
- String sign = oladingRequest.getSign();
|
|
|
+ OladingCommonRequest.Req req = JSONUtil.toBean(reqStr, OladingCommonRequest.Req.class);
|
|
|
// 请求接口名称
|
|
|
String interfaceName = req.getName();
|
|
|
|
|
|
// 1.请求记录
|
|
|
OladingInputRecord record = new OladingInputRecord();
|
|
|
record.setInterfaceName(interfaceName);
|
|
|
- record.setReqBody(JSONUtil.toJsonStr(oladingRequest));
|
|
|
+ record.setReqBody(String.format("%s,%s", reqStr, sign));
|
|
|
record.setPrivateKey("");
|
|
|
record.setPublicKey("");
|
|
|
oladingInputRecordService.save(record);
|
|
@@ -108,6 +106,7 @@ public class GigThirdApiController {
|
|
|
}
|
|
|
return R.failed("处理失败");
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|