| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- package com.zhixinghe1.ots.service.controller;
- import com.zhixinghe1.ots.atomic.service.IAttachmentService;
- import com.zhixinghe1.ots.config.BizConfig;
- import com.zhixinghe1.ots.domain.dto.AttachmentDto;
- import com.zhixinghe1.ots.domain.dto.WaterMarkRequest;
- import com.zhixinghe1.ots.service.manager.IWaterMarkManager;
- import io.swagger.v3.oas.annotations.tags.Tag;
- 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 java.io.UnsupportedEncodingException;
- @Tag(name = "水印")
- @RestController
- @RequestMapping("/watermark")
- public class WaterMarkController {
- @Autowired
- private BizConfig bizConfig;
- @Autowired
- private IWaterMarkManager waterMarkManager;
- @Autowired
- private IAttachmentService attachmentService;
- @GetMapping(value = "/make")
- public WaterMarkRequest make(WaterMarkRequest request) throws UnsupportedEncodingException {
- waterMarkManager.make(request);
- return null;
- }
- @GetMapping("test2")
- public AttachmentDto test2(Long id) {
- System.out.println(("----- selectAll method test ------"));
- AttachmentDto attachmentDto = attachmentService.selectById(id);
- return attachmentDto;
- }
- @GetMapping("test3")
- public Integer test3() {
- AttachmentDto attachmentDto = new AttachmentDto();
- attachmentDto.setPath("/12342");
- attachmentDto.setStatus(true);
- attachmentDto.setName("测试.jpg");
- return attachmentService.addAttachment(attachmentDto);
- }
- }
|