|
@@ -0,0 +1,43 @@
|
|
|
+package com.factory.controller.web;
|
|
|
+
|
|
|
+import com.factory.web.service.impl.TestEntry;
|
|
|
+import com.factory.web.service.impl.TestServiceImpl;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import java.nio.charset.StandardCharsets;
|
|
|
+
|
|
|
+
|
|
|
+@Api(tags = "本特勒 - blob测试")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/benteler/testblob")
|
|
|
+public class TestBlobController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private TestServiceImpl testService;
|
|
|
+
|
|
|
+
|
|
|
+ @GetMapping("/addIniPlan")
|
|
|
+ @ApiOperation(value = "testItem")
|
|
|
+ public void addIniPlan(HttpServletRequest request) {
|
|
|
+ TestEntry testEntry=TestEntry.builder().bentelerPlanId(Long.parseLong("1"))
|
|
|
+ .titleContent("test.asgajsd".getBytes(StandardCharsets.UTF_8)).build();
|
|
|
+ testService.save(testEntry);
|
|
|
+ System.out.println("11111111111111111111111111111111111111111");
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/getIniPlan")
|
|
|
+ public void getIniPlan(HttpServletRequest request) {
|
|
|
+ Long versionId = Long.valueOf(2);
|
|
|
+ TestEntry pp= testService.getById(versionId);
|
|
|
+ pp.setTitleContentStr(new String(pp.getTitleContent(),StandardCharsets.UTF_8));
|
|
|
+ System.out.println(pp.getTitleContentStr());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|