|
@@ -1,47 +0,0 @@
|
|
|
-package com.fdkankan.contro.controller;
|
|
|
-
|
|
|
-
|
|
|
-import cn.hutool.crypto.digest.MD5;
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
-import com.fdkankan.contro.common.Result;
|
|
|
-import com.fdkankan.contro.entity.SceneOrigBd;
|
|
|
-import com.fdkankan.web.response.ResultData;
|
|
|
-import com.github.brainlag.nsq.NSQProducer;
|
|
|
-import com.github.brainlag.nsq.exceptions.NSQException;
|
|
|
-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 java.io.File;
|
|
|
-import java.nio.charset.StandardCharsets;
|
|
|
-import java.util.concurrent.TimeoutException;
|
|
|
-
|
|
|
-/**
|
|
|
- * <p>
|
|
|
- * 前端控制器
|
|
|
- * </p>
|
|
|
- *
|
|
|
- * @author
|
|
|
- * @since 2025-05-07
|
|
|
- */
|
|
|
-@RestController
|
|
|
-@RequestMapping("/api/scene/file/bd")
|
|
|
-public class SceneFilenameController {
|
|
|
-
|
|
|
- @PostMapping
|
|
|
- public ResultData testNsq(@RequestBody SceneOrigBd sceneOrigBd) throws NSQException, TimeoutException {
|
|
|
- Result success = Result.success(sceneOrigBd);
|
|
|
- NSQProducer producer = new NSQProducer().addAddress("192.168.0.127", 4150).start();
|
|
|
- producer.produce("topic-bd", JSON.toJSONString(success).getBytes(StandardCharsets.UTF_8));
|
|
|
- producer.shutdown();
|
|
|
- return ResultData.ok();
|
|
|
- }
|
|
|
-
|
|
|
- public static void main(String[] args) {
|
|
|
- System.out.println(MD5.create().digestHex(new File("D:\\Downloads\\bpvt00010_202504161042512540\\bpvt00010_202504161042512540.zip")));
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-}
|
|
|
-
|