Pu Zhibing
2025-05-09 60c025ed5a9974a1a8ddb508ca76467da9d46361
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TPubWithdrawalController.java
@@ -3,24 +3,26 @@
import com.baomidou.mybatisplus.plugins.Page;
import com.stylefeng.guns.core.base.controller.BaseController;
import com.stylefeng.guns.core.common.constant.factory.PageFactory;
import com.stylefeng.guns.core.log.LogObjectHolder;
import com.stylefeng.guns.core.shiro.ShiroKit;
import com.stylefeng.guns.core.util.SinataUtil;
import com.stylefeng.guns.modular.system.model.TComplaint;
import com.stylefeng.guns.modular.system.model.TPubWithdrawal;
import com.stylefeng.guns.modular.system.model.TSystemNotice;
import com.stylefeng.guns.modular.system.model.TWithdrawal;
import com.stylefeng.guns.modular.system.service.ITPubWithdrawalService;
import com.stylefeng.guns.modular.system.service.ITSystemNoticeService;
import com.stylefeng.guns.modular.system.service.ITWithdrawalService;
import com.stylefeng.guns.modular.system.util.HttpRequestUtil;
import com.stylefeng.guns.modular.system.util.PushURL;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.beans.factory.annotation.Autowired;
import com.stylefeng.guns.core.log.LogObjectHolder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.stylefeng.guns.modular.system.model.TPubWithdrawal;
import com.stylefeng.guns.modular.system.service.ITPubWithdrawalService;
import org.springframework.web.bind.annotation.ResponseBody;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@@ -35,20 +37,23 @@
@RequestMapping("/tPubWithdrawal")
public class TPubWithdrawalController extends BaseController {
    private String PREFIX = "/system/tPubWithdrawal/";
    private String PREFIX = "/system/tWithdrawal/";
    @Autowired
    private ITPubWithdrawalService tPubWithdrawalService;
    @Autowired
    private ITSystemNoticeService tSystemNoticeService;
    @Autowired
    private ITWithdrawalService withdrawalService;
    /**
     * 跳转到提现列表首页
     */
    @RequestMapping("")
    public String index() {
        return PREFIX + "tPubWithdrawal.html";
        return PREFIX + "tWithdrawal.html";
    }
    /**
@@ -70,8 +75,16 @@
     */
    @RequestMapping("/tPubWithdrawal_immediately/{tPubWithdrawalId}")
    public String tPubWithdrawalUpdate(@PathVariable Integer tPubWithdrawalId, Model model) {
        model.addAttribute("tPubWithdrawalId",tPubWithdrawalId);
        return PREFIX + "tPubWithdrawal_immediately.html";
        TWithdrawal tWithdrawal = withdrawalService.selectById(tPubWithdrawalId);
        tWithdrawal.setWithdrawalTimeStr(new SimpleDateFormat("yyyy-MM-dd HH:mm").format(tWithdrawal.getWithdrawalTime()));
        tWithdrawal.setWithdrawalTypeStr(tWithdrawal.getWithdrawalType()==1?"支付宝":"银行卡");
        model.addAttribute("item",tWithdrawal);
        LogObjectHolder.me().set(tWithdrawal);
        if(tWithdrawal.getStatus() == 1){
            return PREFIX + "tWithdrawal_edit.html";
        }else {
            return PREFIX + "tWithdrawal_detail.html";
        }
    }
    /**
@@ -81,7 +94,7 @@
    @ResponseBody
    public Object list(String insertTime,
                       String name,
                       Integer withdrawalType) {
                       Integer status) {
        String beginTime = null;
        String endTime = null;
        if (SinataUtil.isNotEmpty(insertTime)){
@@ -93,7 +106,7 @@
        if (ShiroKit.getUser().getRoleType() != 1){
            page.setRecords(null);
        }else{
            page.setRecords(tPubWithdrawalService.getWithdrawalList(page,beginTime,endTime,name,withdrawalType));
            page.setRecords(tPubWithdrawalService.getWithdrawalList(page,beginTime,endTime,name,status));
        }
        return super.packForBT(page);
    }