添加封装远程调用 导师二维码
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package org.jiayunet.controller;
|
package org.jiayunet.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.jiayunet.remote.jsxq.JsxqClient;
|
import org.jiayunet.remote.jsxq.JsxqClient;
|
||||||
import org.jiayunet.remote.jsxq.pojo.JsxqPage;
|
import org.jiayunet.remote.jsxq.pojo.JsxqPage;
|
||||||
@@ -12,6 +13,7 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导师接口(对接简史星球开放平台,公开免鉴权)
|
* 导师接口(对接简史星球开放平台,公开免鉴权)
|
||||||
@@ -58,4 +60,12 @@ public class MentorController {
|
|||||||
public List<ChatEvaluateDto> selectChatEvaluate(@RequestParam Long teacherId) {
|
public List<ChatEvaluateDto> selectChatEvaluate(@RequestParam Long teacherId) {
|
||||||
return jsxqClient.selectChatEvaluate(teacherId);
|
return jsxqClient.selectChatEvaluate(teacherId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取二维码
|
||||||
|
*/
|
||||||
|
@PostMapping("/getQrCode")
|
||||||
|
public Map<String, Object> getQrCode(@RequestBody JSONObject data) {
|
||||||
|
return jsxqClient.getQrCode(data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.jiayunet.remote.jsxq;
|
package org.jiayunet.remote.jsxq;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.fasterxml.jackson.databind.JavaType;
|
import com.fasterxml.jackson.databind.JavaType;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -81,6 +82,23 @@ public class JsxqClient {
|
|||||||
return get("/public/website/selectChatEvaluate", Map.of("teacherId", teacherId), type);
|
return get("/public/website/selectChatEvaluate", Map.of("teacherId", teacherId), type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取二维码
|
||||||
|
* <p>POST /getQrCode</p>
|
||||||
|
*/
|
||||||
|
public Map<String, Object> getQrCode(JSONObject data) {
|
||||||
|
JavaType type = HttpTool.objectMapper.getTypeFactory()
|
||||||
|
.constructMapType(Map.class, String.class, Object.class);
|
||||||
|
return post("/getQrCode", data, type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ============================ 底层通用调用 ============================
|
// ============================ 底层通用调用 ============================
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user