fei.wang
2024-05-09 871d4095b07cedacb7fbef4c38d64982f539c404
src/main/java/com/flow/controller/ChongZhiController.java
对比新文件
@@ -0,0 +1,75 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.flow.controller;
import com.flow.pojo.Chongzhi;
import com.flow.service.ChongZhiService;
import com.flow.util.DESUtil;
import com.flow.util.result;
import com.flow.util.resultutil;
import com.github.pagehelper.PageInfo;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
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;
@RestController
@RequestMapping({"/hxzk"})
public class ChongZhiController {
    @Autowired
    ChongZhiService chongZhiService;
    public ChongZhiController() {
    }
    @GetMapping({"FindChongzhi"})
    public result<List<Chongzhi>> FindChongzhi(Integer page, Integer limit) throws Exception {
        PageInfo<Chongzhi> cz = this.chongZhiService.FindChongZhi(page, limit);
        return resultutil.returnSuccess(cz.getTotal(), cz.getList());
    }
    @GetMapping({"FindChongzhiZi"})
    public result<List<Chongzhi>> FindChongzhiZi(String Zong, Integer page, Integer limit) throws Exception {
        PageInfo<Chongzhi> cz = this.chongZhiService.FindChongzhiZi(DESUtil.decrypt(Zong, DESUtil.key), page, limit);
        return resultutil.returnSuccess(cz.getTotal(), cz.getList());
    }
    @GetMapping({"czl"})
    public List czl(String Zong) throws Exception {
        return this.chongZhiService.czl(Zong);
    }
    @PostMapping({"upstatus"})
    public int upstatus(Chongzhi chongzhi) {
        int p = 0;
        String str = chongzhi.getJynum();
        String[] result = str.split(",");
        for(int i = 0; i < result.length; ++i) {
            chongzhi.setJynum(result[i]);
            p += this.chongZhiService.upstatus(chongzhi);
        }
        return p;
    }
    @PostMapping({"DeleteChongZhi"})
    public int DeleteChongZhi(String chongZhiId) {
        return this.chongZhiService.DeleteChongZhi(chongZhiId);
    }
    @PostMapping({"findChongZhiJine"})
    public String findChongZhiJine() {
        return this.chongZhiService.findChongZhiJine();
    }
    @PostMapping({"findChongZhiJine1"})
    public String findChongZhiJine1(Chongzhi chongzhi) {
        return this.chongZhiService.findChongZhiJine1(chongzhi);
    }
}