kongdeqiang
2023-06-09 f5b953a5f3415784a41cd12b60cc8d7574e4b7aa
提交更新
3个文件已修改
1个文件已添加
72 ■■■■■ 已修改文件
src/main/java/com/boying/controller/FileInfo2Controller.java 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/boying/controller/StreetController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/boying/controller/phone/PayController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/boying/controller/phone/TicketController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/boying/controller/FileInfo2Controller.java
New file
@@ -0,0 +1,64 @@
package com.boying.controller;
import com.boying.entity.FileInfo;
import com.boying.service.FileInfoService;
import io.lettuce.core.dynamic.annotation.Param;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
@RestController
@RequestMapping("ffzf/fileInfo")
@RequiredArgsConstructor
public class FileInfo2Controller {
    private final FileInfoService fileInfoService;
    /**
     * @Description:下载
     * @Param downloadPath 文件路径
     */
    @GetMapping("/download/downloadZip")
    public void downloadZip(@Param("downloadPath") String downloadPath, HttpServletRequest request, HttpServletResponse response) {
        //下载图片
        String down = fileInfoService.downloadPathFile(downloadPath, request, response);
    }
    @PostMapping("/download/downloadZips")
    public void downloadZips(String fileIds, HttpServletRequest request, HttpServletResponse response) {
        List<FileInfo> fileInfoList = new ArrayList<>();
        if(fileIds.contains(",")){
            String[] split = fileIds.split(",");
            for (String s : split) {
                FileInfo byId = fileInfoService.getById(Integer.parseInt(s));
                fileInfoList.add(byId);
            }
        }else {
            FileInfo byId = fileInfoService.getById(Integer.parseInt(fileIds));
            fileInfoList.add(byId);
        }
        //下载压缩包
        fileInfoService.downForZip(fileInfoList, request, response);
    }
    @PostMapping("/download/downloadPng")
    public void downloadPng(String fileId, HttpServletRequest request, HttpServletResponse response) {
        FileInfo byId = fileInfoService.getById(Integer.parseInt(fileId));
        fileInfoService.downloadPng(byId,request,response);
    }
    @GetMapping("/showImg")
    public void showImg( String path,HttpServletResponse response) {
        fileInfoService.getFile(path,response);
    }
    @GetMapping("/showImgById/{fileId}")
    public void showImgById(@PathVariable Long fileId,HttpServletResponse response) {
        fileInfoService.getFileById(fileId,response);
    }
}
src/main/java/com/boying/controller/StreetController.java
@@ -12,6 +12,7 @@
import com.boying.service.StreetService;
import com.boying.util.LngLatUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -80,7 +81,7 @@
        return R.ok();
    }
    @PostMapping("/findById")
    @GetMapping("/findById")
    public Object findById(Long id,int type) {
        if(type==0){
            QueryWrapper<StreetReRoad> roadQueryWrapper = new QueryWrapper<>();
@@ -108,7 +109,7 @@
        }
    }
    @PostMapping("/findList")
    @GetMapping("/findList")
    public Object findAll() {
        Map<String,Object> map = new HashMap<>();
        QueryWrapper<Street> wrapper = new QueryWrapper<>();
src/main/java/com/boying/controller/phone/PayController.java
@@ -406,6 +406,7 @@
     */
    @PostMapping("zhifa")
    public Object zhifa(Long id){
        System.out.println(id+"开始缴费");
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss");
        String logs = sdf.format(new Date())+"开始扫码缴费------》\n";
        logs += "罚单表id为:"+id+",\n";
@@ -482,6 +483,7 @@
            addOrderRecord2(ticket);
            return payurl+eticketnum;
        }else {
            System.out.println("支付申请缴款码返回为:"+entity);
            return null;
        }
    }
src/main/java/com/boying/controller/phone/TicketController.java
@@ -119,6 +119,7 @@
        }
        ticket.setStatus(1);//已处理
        ticket.setPayStatus(0);
        ticketService.saveOrUpdate(ticket);
        if(StringUtils.isBlank(ticket.getQrUrl())){