|
@@ -1,8 +1,10 @@
|
|
|
package com.main.caller;
|
|
|
|
|
|
import com.main.config.RPCApiConfig;
|
|
|
+import com.main.entity.Task;
|
|
|
import com.main.tag.caller.RPCConsumer;
|
|
|
import com.main.transfer.rpc.bo.GoResult;
|
|
|
+import com.main.transfer.rpc.bo.PlagExec;
|
|
|
import com.main.transfer.rpc.bo.QueryTextResult;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.brynhild.common.transfer.util.HttpURLBuilder;
|
|
@@ -31,4 +33,14 @@ public class GoServiceCaller {
|
|
|
String url=rpcApiConfig.getDeleteFile()+fileId;
|
|
|
restTemplate.delete(url);
|
|
|
}
|
|
|
+
|
|
|
+ public GoResult plagExec(Task task){
|
|
|
+ final PlagExec plagExec = new PlagExec(task);
|
|
|
+ if(plagExec.getHomeworkType()==null){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ final GoResult result = restTemplate.postForObject(rpcApiConfig.getPlagExec(), plagExec, GoResult.class);
|
|
|
+ System.out.println(result);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|