|
@@ -1,20 +1,23 @@
|
|
|
package com.qmth.teachcloud.report.api;
|
|
|
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.qmth.boot.api.annotation.Aac;
|
|
|
+import com.qmth.boot.api.annotation.BOOL;
|
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
|
+import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
|
import com.qmth.teachcloud.common.util.Result;
|
|
|
import com.qmth.teachcloud.common.util.ResultUtil;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-import io.swagger.annotations.ApiResponse;
|
|
|
-import io.swagger.annotations.ApiResponses;
|
|
|
+import io.swagger.annotations.*;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.io.UnsupportedEncodingException;
|
|
|
+import java.net.URLDecoder;
|
|
|
+
|
|
|
/**
|
|
|
* <p>
|
|
|
* 开放接口前端控制器
|
|
@@ -27,14 +30,17 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
@RestController
|
|
|
@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/${prefix.url.open}")
|
|
|
@Validated
|
|
|
+@Aac(auth = BOOL.FALSE)
|
|
|
public class OpenApiController {
|
|
|
private final static Logger log = LoggerFactory.getLogger(OpenApiController.class);
|
|
|
|
|
|
@ApiOperation(value = "接收基础考务数据")
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "推送基础考务数据", response = Object.class)})
|
|
|
@RequestMapping(value = "/basic/examination/data", method = RequestMethod.POST)
|
|
|
- public Result basicExaminationData(JSONObject jsonObject) {
|
|
|
- log.info("basicExaminationData进来了,jsonObject:{}", jsonObject.toJSONString());
|
|
|
+ public Result basicExaminationData(@ApiParam(value = "接收基础考务数据信息", required = true) @RequestBody String result) throws UnsupportedEncodingException {
|
|
|
+ log.info("basicExaminationData进来了,result:{}", result);
|
|
|
+ String decodeJson = URLDecoder.decode(result, SystemConstant.CHARSET_NAME);
|
|
|
+ log.info("decodeJson:{}", decodeJson);
|
|
|
return ResultUtil.ok(true);
|
|
|
}
|
|
|
}
|