压缩下载

This commit is contained in:
cwchen 2025-04-08 14:11:56 +08:00
parent 942ecfc8f0
commit ccf0278bd6
2 changed files with 64 additions and 1 deletions

View File

@ -0,0 +1,63 @@
package com.bonus.imgTool.app.controller;
import com.bonus.imgTool.annotation.DecryptAndVerify;
import com.bonus.imgTool.annotation.LogAnnotation;
import com.bonus.imgTool.backstage.entity.QueryParamDto;
import com.bonus.imgTool.backstage.entity.SynthesisQueryVo;
import com.bonus.imgTool.backstage.service.SynthesisQueryService;
import com.bonus.imgTool.system.vo.EncryptedReq;
import com.bonus.imgTool.utils.ServerResponse;
import com.github.pagehelper.PageHelper;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
/**
* @className:AppSynthesisQueryController
* @author:cwchen
* @date:2025-03-31-10:30
* @version:1.0
* @description:app-照片统计
*/
@RestController
@RequestMapping("/app/synthesisQuery/")
@Slf4j
public class AppSynthesisQueryController {
@Resource(name = "SynthesisQueryService")
private SynthesisQueryService synthesisQueryService;
@ApiOperation("综合查询-照片综合查询-照片数量")
@PostMapping(value = "getImgNum")
@DecryptAndVerify(decryptedClass = QueryParamDto.class)
public ServerResponse getImgNum(EncryptedReq<QueryParamDto> data) {
return synthesisQueryService.getImgNum(data.getData());
}
@PostMapping(value = "getImgList")
@DecryptAndVerify(decryptedClass = QueryParamDto.class)
@LogAnnotation(operModul = "综合查询-照片综合查询", operation = "查询照片", operDesc = "系统级事件",operType="查询")
public ServerResponse getImgList(EncryptedReq<QueryParamDto> data) {
return synthesisQueryService.getImgList(data.getData());
}
@ApiOperation("收藏/取消收藏图片")
@PostMapping(value = "collectData")
@DecryptAndVerify(decryptedClass = QueryParamDto.class)
public ServerResponse collectData(EncryptedReq<QueryParamDto> data) {
return synthesisQueryService.collectData(data.getData());
}
@ApiOperation("生成水印")
@PostMapping(value = "generateWatermark")
@DecryptAndVerify(decryptedClass = SynthesisQueryVo.class)
public ServerResponse generateWatermark(EncryptedReq<SynthesisQueryVo> data) {
return synthesisQueryService.generateWatermark(data.getData());
}
}

View File

@ -88,7 +88,7 @@ public class SynthesisQueryServiceImpl implements SynthesisQueryService {
} catch (Exception e) {
log.error(e.toString(), e);
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ServerResponse.createErroe("操作失败");
return ServerResponse.createErroe("请勿重复收藏");
}
}